feat(auth): implement OIDC JWT verification with dynamic identity provider support
- Added JwtService (azure-jwt.service.ts) to verify tokens from multiple IdPs (Microsoft Entra ID, Amazon Cognito) - Implemented dynamic provider configuration (issuer, audience, jwksUri) - Added JwtAuthGuard for NestJS to handle JWT validation via jose library - Integrated @Public() and @IdP() decorators for route-level control - Audience () and issuer () validation logic aligned with OIDC standards - Added clock tolerance and allowed algorithm checks for security hardening
This commit is contained in:
1 parent
02255d7240
commit
d6b9477094
14 files changed
+346
-47
No files matched your search
+3
-1
@@ -3,6 +3,7 @@ import { AppController } from './app.controller';
|
||||
import { AppService } from './app.service';
|
||||
import { GlobalModule } from './modules/global/global.module';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { AccountModule } from './modules/account/account.module';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -10,7 +11,8 @@ import { ConfigModule } from '@nestjs/config';
|
||||
isGlobal: true,
|
||||
envFilePath: process.env.NODE_ENV === 'prod' ? '.env.prod' : process.env.NODE_ENV === 'test' ? '.env.test' : '.env.dev',
|
||||
}),
|
||||
GlobalModule],
|
||||
GlobalModule,
|
||||
AccountModule],
|
||||
controllers: [AppController],
|
||||
providers: [AppService],
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user