
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
@ghentcdh/authentication-api
Advanced tools
GhentCdh Keycloak libraries for authentication
pnpm add @ghentcdh/auth/vue @ghentcdh/auth/backend
Add following environment variables to the .env file.
- KEYCLOAK_HOST=$KEYCLOAK_HOST
- KEYCLOAK_REALM=$KEYCLOAK_REALM
Add the module to your module.ts imports
import {AuthenticationApiModule} from "@ghentcdh/authentication-api";
@Module({
imports: [AuthenticationApiModule],
})
export class MyModule {
}
Extend the GhentCdhGuard decorator to secure your routes
import { Injectable } from '@nestjs/common';
import { GhentCdhGuard } from '@ghentcdh/authentication-api';
import { HttpService } from '@nestjs/axios';
import { ConfigService } from '@nestjs/config';
@Injectable()
export class MyGuard extends GhentCdhGuard {
constructor(_httpService: HttpService, _configService: ConfigService) {
super(_httpService, _configService);
}
}
Use the guard in your controller
import {MyGuard} from "./my.guard";
@Controller()
export class MyController {
@UseGuards(MyGuard)
@Post('/secure')
async securePath(@User() user: any, @Request() req: any) {
return user;
}
}
The @User() decorator will give you the user object from the keycloak token.
TODO list
- Add roles decorator and implement logic
@GhentCdhRoles(['admin'])
Make sure the following is added to your hosts file, if you are running a local keycloak instance. Internally the docker containers cannot connect to the localhost:8080 port, so a hook is needed in terms of host rewrite.
echo "127.0.0.1 authentication\n" | sudo tee -a /etc/hosts
TODO describe me
FAQs
GhentCdh Keycloak libraries for authentication
We found that @ghentcdh/authentication-api demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.