Skip to content

Commit

Permalink
fix: remove scope check from response (#1450)
Browse files Browse the repository at this point in the history
Signed-off-by: Karim Stekelenburg <[email protected]>
  • Loading branch information
karimStekelenburg authored May 10, 2023
1 parent 61daf0c commit 7dd4061
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/openid4vc-client/src/OpenId4VcClientService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,11 @@ export class OpenId4VcClientService {

this.logger.debug('Full server metadata', serverMetadata)

if (!accessToken.scope) {
throw new AriesFrameworkError(
"Access token response doesn't contain a scope. Only scoped issuer URIs are supported at this time."
)
if (accessToken.scope) {
for (const credentialType of accessToken.scope.split(' ')) {
this.assertCredentialHasFormat(credentialFormat, credentialType, serverMetadata)
}
}
this.assertCredentialHasFormat(credentialFormat, accessToken.scope, serverMetadata)

// proof of possession
const callbacks = this.getSignCallback(agentContext)
Expand Down

0 comments on commit 7dd4061

Please sign in to comment.