Skip to content

Commit

Permalink
chore: PR feedback (partly)
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Oct 10, 2024
1 parent d484513 commit 0603b43
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,10 @@ export class PresentationExchange {
} else if (!this.allVerifiableCredentials || this.allVerifiableCredentials.length == 0) {
throw new Error(`${SIOPErrors.COULD_NOT_FIND_VCS_MATCHING_PD}, no VCs were provided`)
}
const selectResults: SelectResults = this.pex.selectFrom(presentationDefinition, this.removeMDocCredentials(this.allVerifiableCredentials), {
// When there are MDoc credentials among the selected ones, filter those out as pex does not support mdoc credentials
const filteredCredentials = this.removeMDocCredentials(this.allVerifiableCredentials)
const selectResults: SelectResults = this.pex.selectFrom(presentationDefinition, filteredCredentials, {

...opts,
holderDIDs: opts?.holderDIDs ?? this.allDIDs,
// fixme limited disclosure
Expand Down
8 changes: 4 additions & 4 deletions packages/siop-oid4vp/lib/rp/RP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@ export class RP {
correlationId,
})
correlationId = verifyAuthenticationResponseOpts.correlationId ?? correlationId
await this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_RECEIVED_SUCCESS, {
void this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_RECEIVED_SUCCESS, {
correlationId,
subject: authorizationResponse,
})

const verifiedAuthorizationResponse = await authorizationResponse.verify(verifyAuthenticationResponseOpts)
await this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_VERIFIED_SUCCESS, {
void this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_VERIFIED_SUCCESS, {
correlationId,
subject: authorizationResponse,
})
Expand All @@ -228,10 +228,10 @@ export class RP {
}

public getResponseRedirectUri(mappings?: Record<string, string>): string | undefined {
if (this._responseRedirectUri === undefined) {
if (!this._responseRedirectUri) {
return undefined
}
if(mappings === undefined) {
if(!mappings) {
return this._responseRedirectUri
}
return Object.entries(mappings).reduce(
Expand Down

0 comments on commit 0603b43

Please sign in to comment.