From 6584215e9ab095670201f691001d376fc0ed08df Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Thu, 7 Mar 2024 18:48:44 +0100 Subject: [PATCH] feat(oidc-mock-provider): allow adding additional keys to issuer metadata (#257) --- packages/oidc-mock-provider/src/index.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/oidc-mock-provider/src/index.ts b/packages/oidc-mock-provider/src/index.ts index d3dc3eb2..76df4a26 100644 --- a/packages/oidc-mock-provider/src/index.ts +++ b/packages/oidc-mock-provider/src/index.ts @@ -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; } /** @@ -155,6 +160,7 @@ export class OIDCMockProvider { '/device', this.issuer ).toString(), + ...this.config.additionalIssuerMetadata?.(), }; break; case '/jwks':