Skip to content

Commit

Permalink
SPHEREON-1157: remove unnecessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
sanderPostma committed Mar 6, 2024
1 parent e28f000 commit 9426648
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
5 changes: 1 addition & 4 deletions src/authorization-response/AuthorizationResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
});
}

Expand Down
2 changes: 0 additions & 2 deletions src/authorization-response/Payload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand Down

0 comments on commit 9426648

Please sign in to comment.