Skip to content

Commit

Permalink
chore: picks from conformance branch
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Sep 27, 2024
1 parent 9d73138 commit 6af9026
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ export class AuthorizationRequest {

const requestObjectArg =
opts.requestObject.passBy !== PassBy.NONE ? (requestObject ? requestObject : await RequestObject.fromOpts(opts)) : undefined
const requestPayload = await createAuthorizationRequestPayload(opts, requestObjectArg)
// opts?.payload was removed before, but it's not clear atm why opts?.payload was removed
const requestPayload = opts?.payload ? await createAuthorizationRequestPayload(opts, requestObjectArg) : undefined
return new AuthorizationRequest(requestPayload, requestObjectArg, opts)
}

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

const verifiedAuthorizationResponse = await authorizationResponse.verify(verifyAuthenticationResponseOpts)
void this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_VERIFIED_SUCCESS, {
await this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_VERIFIED_SUCCESS, {
correlationId,
subject: authorizationResponse,
})
Expand Down

0 comments on commit 6af9026

Please sign in to comment.