File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -169,6 +169,7 @@ export class SponsorOidcService {
169169 || header . alg !== "RS256"
170170 || typeof header . kid !== "string"
171171 || ! header . kid
172+ || ( header . typ !== undefined && header . typ !== "JWT" )
172173 || header . crit !== undefined
173174 || ! claims
174175 ) {
@@ -316,6 +317,7 @@ export class SponsorOidcService {
316317 ! header
317318 || header . alg !== "RS256"
318319 || header . kid !== expectedKid
320+ || ( header . typ !== undefined && header . typ !== "JWT" )
319321 || header . crit !== undefined
320322 || ! claims
321323 ) {
@@ -514,9 +516,6 @@ function normalizeAudience(value: unknown): string[] {
514516}
515517
516518function mapSponsorId ( claim : string , prefix : string ) : string {
517- if ( SPONSOR_ID_PATTERN . test ( claim ) ) {
518- return claim ;
519- }
520519 if ( ! / ^ u s e r _ [ A - Z a - z 0 - 9 _ - ] * $ / u. test ( prefix ) ) {
521520 throw configurationError ( "sponsorIdPrefix must begin with user_ and contain only token-safe characters" ) ;
522521 }
You can’t perform that action at this time.
0 commit comments