From 9426648420ec38aab61a296cae4d8e0d12864954 Mon Sep 17 00:00:00 2001 From: sander Date: Wed, 6 Mar 2024 17:28:27 +0100 Subject: [PATCH] SPHEREON-1157: remove unnecessary code --- src/authorization-response/AuthorizationResponse.ts | 5 +---- src/authorization-response/Payload.ts | 2 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/authorization-response/AuthorizationResponse.ts b/src/authorization-response/AuthorizationResponse.ts index ca882d9..7999098 100644 --- a/src/authorization-response/AuthorizationResponse.ts +++ b/src/authorization-response/AuthorizationResponse.ts @@ -120,10 +120,7 @@ export class AuthorizationResponse { presentationDefinitions, presentations: wrappedPresentations, verificationCallback: verifyOpts.verification.presentationVerificationCallback, - opts: { - ...responseOpts.presentationExchange, - hasher: verifyOpts.hasher, - }, + opts: { ...responseOpts.presentationExchange, hasher: verifyOpts.hasher }, }); } diff --git a/src/authorization-response/Payload.ts b/src/authorization-response/Payload.ts index 0f178b8..7e65300 100644 --- a/src/authorization-response/Payload.ts +++ b/src/authorization-response/Payload.ts @@ -19,13 +19,11 @@ export const createResponsePayload = async ( // If state was in request, it must be in response const state: string | undefined = await authorizationRequest.getMergedProperty('state'); - const payload = await authorizationRequest.requestObject?.getPayload(); const responsePayload: AuthorizationResponsePayload = { ...(responseOpts.accessToken && { access_token: responseOpts.accessToken }), ...(responseOpts.tokenType && { token_type: responseOpts.tokenType }), ...(responseOpts.refreshToken && { refresh_token: responseOpts.refreshToken }), - ...(payload?.nonce && { nonce: payload.nonce }), expires_in: responseOpts.expiresIn || 3600, state, };