Dev release#3
Conversation
There was a problem hiding this comment.
Code Review
This pull request removes the RBAC JWT strategy and its associated components, including the RbacAuthGuard, RbacJwtStrategy, and related configuration settings, to simplify the authentication flow. A review comment suggests improving the JwtStrategy by using namespaced configuration keys and adding type safety when retrieving the Keycloak public key.
| @Injectable() | ||
| export class JwtStrategy extends PassportStrategy(Strategy, 'jwt-keycloak') { | ||
| constructor(configService: ConfigService) { | ||
| const publicKey = configService.get('KEYCLOAK_REALM_RSA_PUBLIC_KEY'); |
There was a problem hiding this comment.
The ConfigService should access the configuration using the namespaced key 'auth.keycloakRsaPublicKey' as defined in src/config/auth.config.ts. This ensures consistency with the application's configuration pattern and leverages the default values or transformations defined in the configuration file. Additionally, providing the type parameter <string> improves type safety.
| const publicKey = configService.get('KEYCLOAK_REALM_RSA_PUBLIC_KEY'); | |
| const publicKey = configService.get<string>('auth.keycloakRsaPublicKey'); |
No description provided.