diff --git a/src/utils/middleware/cors.middleware.ts b/src/utils/middleware/cors.middleware.ts index 3bff4d34..9f53162c 100644 --- a/src/utils/middleware/cors.middleware.ts +++ b/src/utils/middleware/cors.middleware.ts @@ -67,6 +67,9 @@ export class WhitelistSSICorsMiddleware implements NestMiddleware { throw new UnauthorizedException([e]); } + if (decoded.grantType != 'access_service_ssi') { + throw new BadRequestException(['Invalid grant type for this service']); + } type App = { appId?: string; kmsId?: string;