@@ -78,18 +78,15 @@ export class CrossAppAccessCompleteFlowScenario implements Scenario {
7878 // Start auth server with JWT bearer grant support only
7979 // Token exchange is handled by IdP
8080 const authApp = createAuthServer ( this . checks , this . authServer . getUrl , {
81- grantTypesSupported : [
82- 'urn:ietf:params:oauth:grant-type:jwt-bearer'
81+ grantTypesSupported : [ 'urn:ietf:params:oauth:grant-type:jwt-bearer' ] ,
82+ tokenEndpointAuthMethodsSupported : [
83+ 'client_secret_basic' ,
84+ 'private_key_jwt'
8385 ] ,
84- tokenEndpointAuthMethodsSupported : [ 'client_secret_basic' , 'private_key_jwt' ] ,
8586 onTokenRequest : async ( { grantType, body, timestamp, authBaseUrl } ) => {
8687 // Auth server only handles JWT bearer grant (ID-JAG -> access token)
8788 if ( grantType === 'urn:ietf:params:oauth:grant-type:jwt-bearer' ) {
88- return await this . handleJwtBearerGrant (
89- body ,
90- timestamp ,
91- authBaseUrl
92- ) ;
89+ return await this . handleJwtBearerGrant ( body , timestamp , authBaseUrl ) ;
9390 }
9491
9592 return {
@@ -136,15 +133,20 @@ export class CrossAppAccessCompleteFlowScenario implements Scenario {
136133 app . use ( express . urlencoded ( { extended : true } ) ) ;
137134
138135 // IDP metadata endpoint
139- app . get ( '/.well-known/openid-configuration' , ( req : Request , res : Response ) => {
140- res . json ( {
141- issuer : this . idpServer . getUrl ( ) ,
142- authorization_endpoint : `${ this . idpServer . getUrl ( ) } /authorize` ,
143- token_endpoint : `${ this . idpServer . getUrl ( ) } /token` ,
144- jwks_uri : `${ this . idpServer . getUrl ( ) } /.well-known/jwks.json` ,
145- grant_types_supported : [ 'urn:ietf:params:oauth:grant-type:token-exchange' ]
146- } ) ;
147- } ) ;
136+ app . get (
137+ '/.well-known/openid-configuration' ,
138+ ( req : Request , res : Response ) => {
139+ res . json ( {
140+ issuer : this . idpServer . getUrl ( ) ,
141+ authorization_endpoint : `${ this . idpServer . getUrl ( ) } /authorize` ,
142+ token_endpoint : `${ this . idpServer . getUrl ( ) } /token` ,
143+ jwks_uri : `${ this . idpServer . getUrl ( ) } /.well-known/jwks.json` ,
144+ grant_types_supported : [
145+ 'urn:ietf:params:oauth:grant-type:token-exchange'
146+ ]
147+ } ) ;
148+ }
149+ ) ;
148150
149151 // IDP token endpoint - handles token exchange (IDP ID token -> ID-JAG)
150152 app . post ( '/token' , async ( req : Request , res : Response ) => {
0 commit comments