From 25e694d217ca463fed8bb51aed5baa661a6e843f Mon Sep 17 00:00:00 2001 From: sanderPostma Date: Thu, 3 Oct 2024 15:32:33 +0200 Subject: [PATCH] chore: getResponseRedirectUri mappings optional --- packages/siop-oid4vp/lib/rp/RP.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/siop-oid4vp/lib/rp/RP.ts b/packages/siop-oid4vp/lib/rp/RP.ts index d876c29d..d3d75e9a 100644 --- a/packages/siop-oid4vp/lib/rp/RP.ts +++ b/packages/siop-oid4vp/lib/rp/RP.ts @@ -197,11 +197,13 @@ export class RP { return this._verifyResponseOptions } - public getResponseRedirectUri(mappings: Record): string | undefined { + public getResponseRedirectUri(mappings?: Record): string | undefined { if (this._responseRedirectUri === undefined) { return undefined } - + if(mappings === undefined) { + return this._responseRedirectUri + } return Object.entries(mappings).reduce( (uri, [key, value]) => uri.replace(`:${key}`, value), this._responseRedirectUri