Skip to content

Commit

Permalink
feat(oidc-mock-provider): allow adding additional keys to issuer meta…
Browse files Browse the repository at this point in the history
…data (#257)
  • Loading branch information
addaleax authored Mar 7, 2024
1 parent df06b96 commit 6584215
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/oidc-mock-provider/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ export interface OIDCMockProviderConfig {
* Optional hostname for the server to listen on.
*/
hostname?: string;

/**
* Optional additional fields to be returned when the OIDC configuration is accessed.
*/
additionalIssuerMetadata?: () => Record<string, unknown>;
}

/**
Expand Down Expand Up @@ -155,6 +160,7 @@ export class OIDCMockProvider {
'/device',
this.issuer
).toString(),
...this.config.additionalIssuerMetadata?.(),
};
break;
case '/jwks':
Expand Down

0 comments on commit 6584215

Please sign in to comment.