Skip to content

Commit

Permalink
chore: getResponseRedirectUri mappings optional
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Oct 3, 2024
1 parent 566f226 commit 25e694d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/siop-oid4vp/lib/rp/RP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,13 @@ export class RP {
return this._verifyResponseOptions
}

public getResponseRedirectUri(mappings: Record<string, string>): string | undefined {
public getResponseRedirectUri(mappings?: Record<string, string>): 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
Expand Down

0 comments on commit 25e694d

Please sign in to comment.