From 0574925b69c71f9936c782585b5b3f49fab01131 Mon Sep 17 00:00:00 2001 From: Wout Slakhorst Date: Wed, 6 Dec 2023 15:38:26 +0100 Subject: [PATCH] use response_uri instead of redirect --- auth/api/iam/api_test.go | 2 +- auth/api/iam/openid4vp.go | 2 +- auth/api/iam/types.go | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/auth/api/iam/api_test.go b/auth/api/iam/api_test.go index c661faa1e7..ecc47e4805 100644 --- a/auth/api/iam/api_test.go +++ b/auth/api/iam/api_test.go @@ -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") diff --git a/auth/api/iam/openid4vp.go b/auth/api/iam/openid4vp.go index 57d7c06e61..65e1630d40 100644 --- a/auth/api/iam/openid4vp.go +++ b/auth/api/iam/openid4vp.go @@ -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, diff --git a/auth/api/iam/types.go b/auth/api/iam/types.go index f03026d371..759894b01d 100644 --- a/auth/api/iam/types.go +++ b/auth/api/iam/types.go @@ -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"