Skip to content

Commit ec2e5ab

Browse files
committed
chore: apply prettier formatting
1 parent f52aec6 commit ec2e5ab

File tree

2 files changed

+26
-19
lines changed

2 files changed

+26
-19
lines changed

examples/clients/typescript/everything-client.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,9 @@ export async function runCrossAppAccessJwtBearer(
432432
): Promise<void> {
433433
const ctx = parseContext();
434434
if (ctx.name !== 'auth/cross-app-access-jwt-bearer') {
435-
throw new Error(`Expected cross-app-access-jwt-bearer context, got ${ctx.name}`);
435+
throw new Error(
436+
`Expected cross-app-access-jwt-bearer context, got ${ctx.name}`
437+
);
436438
}
437439

438440
logger.debug('Starting JWT bearer grant flow...');
@@ -485,7 +487,10 @@ export async function runCrossAppAccessJwtBearer(
485487
logger.debug('Connection closed successfully');
486488
}
487489

488-
registerScenario('auth/cross-app-access-jwt-bearer', runCrossAppAccessJwtBearer);
490+
registerScenario(
491+
'auth/cross-app-access-jwt-bearer',
492+
runCrossAppAccessJwtBearer
493+
);
489494

490495
/**
491496
* Cross-app access: Complete Flow (SEP-990)

src/scenarios/client/auth/cross-app-access.ts

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)