Skip to content

Commit

Permalink
use response_uri instead of redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
woutslakhorst committed Dec 6, 2023
1 parent b211f46 commit 0574925
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion auth/api/iam/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ func TestWrapper_HandleAuthorizeRequest(t *testing.T) {
assert.Contains(t, location, "client_id=did%3Aweb%3Aexample.com%3Aiam%3Averifier")
assert.Contains(t, location, "nonce=")
assert.Contains(t, location, "presentation_definition_uri=https%3A%2F%2Fexample.com%2Fiam%2Fverifier%2Fpresentation_definition%3Fscope%3Dtest")
assert.Contains(t, location, "redirect_uri=https%3A%2F%2Fexample.com%2Fiam%2Fverifier%2Fresponse")
assert.Contains(t, location, "response_uri=https%3A%2F%2Fexample.com%2Fiam%2Fverifier%2Fresponse")
assert.Contains(t, location, "response_mode=direct_post")
assert.Contains(t, location, "response_type=vp_token")

Expand Down
2 changes: 1 addition & 1 deletion auth/api/iam/openid4vp.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (r Wrapper) handleAuthorizeRequestFromHolder(ctx context.Context, verifier
redirectURL := AddQueryParams(*walletURL, map[string]string{
responseTypeParam: responseTypeVPToken,
clientIDParam: verifier.String(),
redirectURIParam: callbackURL.String(),
responseURIParam: callbackURL.String(),
presentationDefUriParam: presentationDefinitionURI.String(),
responseModeParam: responseModeDirectPost,
nonceParam: nonce,
Expand Down
3 changes: 3 additions & 0 deletions auth/api/iam/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ const stateParam = "state"
// Specified by https://datatracker.ietf.org/doc/html/rfc6749#section-3.1.2
const redirectURIParam = "redirect_uri"

// responseURIParam is the name of the OpenID4VP response_uri parameter.
const responseURIParam = "response_uri"

// presentationDefParam is the name of the OpenID4VP presentation_definition parameter.
// Specified by https://openid.bitbucket.io/connect/openid-4-verifiable-presentations-1_0.html#name-presentation_definition-par
const presentationDefParam = "presentation_definition"
Expand Down

0 comments on commit 0574925

Please sign in to comment.