Skip to content

Commit

Permalink
Correct error handling in IAMClient AccessTokenOid4vci
Browse files Browse the repository at this point in the history
This commit adds an error check for the AccessTokenOid4vci method in the IAMClient.
  • Loading branch information
rolandgroen committed Mar 20, 2024
1 parent 18d66ca commit 1545d7e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions auth/api/iam/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -801,8 +801,9 @@ func (r Wrapper) CallbackOid4vciCredentialIssuance(ctx context.Context, request

tokenEndpoint := metadataFromUrl.TokenEndpoint
response, err := r.auth.IAMClient().AccessTokenOid4vci(ctx, holderDid.String(), tokenEndpoint, oid4vciSession.RedirectUri, code, &pkceParams.Verifier)
println(response.AccessToken)

if err != nil {
return nil, err
}
credentials, err := r.auth.IAMClient().VerifiableCredentials(ctx, metadata.CredentialEndpoint, response.AccessToken, *holderDid, *issuerDid)
if err != nil {
return nil, err
Expand Down

0 comments on commit 1545d7e

Please sign in to comment.