Skip to content

Commit

Permalink
added validation of grant type
Browse files Browse the repository at this point in the history
  • Loading branch information
varsha766 committed Mar 11, 2024
1 parent 9418c2a commit 8e148c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/middleware/cors.middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8e148c7

Please sign in to comment.