athenea-keycloak-validation
v1.3.0
Published
Middleware for validating Keycloak tokens in NestJS applications.
Downloads
74
Readme
Athenea Keycloak Validation
Middleware for validating Keycloak tokens in NestJS applications.
Installation
npm install athenea-keycloak-validation
Usage
import { MiddlewareConsumer, Module, NestModule, RequestMethod } from '@nestjs/common';
import { AppsModule } from './apps/apps.module';
import { AtheneaKeycloakValidationService } from 'athenea-keycloak-validation';
@Module({
imports: [
AppsModule
],
})
export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply(AtheneaKeycloakValidationService)
.forRoutes('*')
}
}
Configuration
Ensure to provide the OpenID Connect configuration URL in the openidConfigUrl
environment variable.
License
ISC