diff --git a/auth/api/iam/openid4vp_test.go b/auth/api/iam/openid4vp_test.go index f4a97b0751..874ee16073 100644 --- a/auth/api/iam/openid4vp_test.go +++ b/auth/api/iam/openid4vp_test.go @@ -33,8 +33,8 @@ import ( "github.com/nuts-foundation/go-did/vc" "github.com/nuts-foundation/nuts-node/auth" "github.com/nuts-foundation/nuts-node/auth/oauth" - "github.com/nuts-foundation/nuts-node/crypto" oauth2 "github.com/nuts-foundation/nuts-node/auth/services/oauth" + "github.com/nuts-foundation/nuts-node/crypto" "github.com/nuts-foundation/nuts-node/policy" "github.com/nuts-foundation/nuts-node/storage" "github.com/nuts-foundation/nuts-node/test" @@ -626,7 +626,7 @@ func TestWrapper_sendAndHandleDirectPostError(t *testing.T) { } func TestWrapper_sendPresentationRequest(t *testing.T) { - instance := New(nil, nil, nil, nil, nil) + instance := New(nil, nil, nil, nil, nil, nil) redirectURI, _ := url.Parse("https://example.com/redirect") verifierID, _ := url.Parse("https://example.com/verifier") @@ -702,28 +702,8 @@ func TestWrapper_handlePresentationRequest(t *testing.T) { require.Equal(t, http.StatusOK, httpResponse.statusCode) assert.Contains(t, httpResponse.body.String(), "") }) - t.Run("unsupported scope", func(t *testing.T) { - ctrl := gomock.NewController(t) - peStore := &pe.DefinitionResolver{} - _ = peStore.LoadFromFile("test/presentation_definition_mapping.json") - mockAuth := auth.NewMockAuthenticationServices(ctrl) - mockAuth.EXPECT().PresentationDefinitions().Return(peStore) - instance := New(mockAuth, nil, nil, nil, nil) - - params := map[string]string{ - "scope": "unsupported", - "response_type": "code", - "response_mode": "direct_post", - "client_metadata_uri": "https://example.com/client_metadata.xml", - } - - response, err := instance.handlePresentationRequest(params, createSession(params, holderDID)) - - requireOAuthError(t, err, oauth.InvalidRequest, "unsupported scope for presentation exchange: unsupported") - assert.Nil(t, response) - }) t.Run("invalid response_mode", func(t *testing.T) { - instance := New(nil, nil, nil, nil, nil) + instance := New(nil, nil, nil, nil, nil, nil) params := map[string]string{ "scope": "eOverdracht-overdrachtsbericht", "response_type": "code",