From dbe3333b4abe9a3e78579ea7760b58b0c8afa3a1 Mon Sep 17 00:00:00 2001 From: Nikos Date: Fri, 9 Feb 2024 17:38:47 +0200 Subject: [PATCH] chore: update tests --- internal/.hydra.yaml | 5 +++++ oauth2/oauth2_provider_mock_test.go | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/internal/.hydra.yaml b/internal/.hydra.yaml index bb02d986ad6..7442fe036f2 100644 --- a/internal/.hydra.yaml +++ b/internal/.hydra.yaml @@ -74,6 +74,7 @@ webfinger: auth_url: https://example.com/auth token_url: https://example.com/token client_registration_url: https://example.com + device_authorization_url: https://example.com/device_authorization supported_claims: - username supported_scope: @@ -100,6 +101,7 @@ urls: consent: https://consent logout: https://logout error: https://error + device_verification: https://device post_logout_redirect: https://post_logout strategies: @@ -112,12 +114,15 @@ ttl: refresh_token: 2h id_token: 2h auth_code: 2h + device_user_code: 2h oauth2: expose_internal_errors: true hashers: bcrypt: cost: 20 + device_authorization: + token_polling_interval: 2h pkce: enforced: true enforced_for_public_clients: true diff --git a/oauth2/oauth2_provider_mock_test.go b/oauth2/oauth2_provider_mock_test.go index e99c959fc4f..8149e206b28 100644 --- a/oauth2/oauth2_provider_mock_test.go +++ b/oauth2/oauth2_provider_mock_test.go @@ -133,18 +133,18 @@ func (mr *MockOAuth2ProviderMockRecorder) NewDeviceRequest(arg0, arg1 interface{ } // NewDeviceResponse mocks base method. -func (m *MockOAuth2Provider) NewDeviceResponse(arg0 context.Context, arg1 fosite.DeviceRequester) (fosite.DeviceResponder, error) { +func (m *MockOAuth2Provider) NewDeviceResponse(arg0 context.Context, arg1 fosite.DeviceRequester, arg2 fosite.Session) (fosite.DeviceResponder, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "NewDeviceResponse", arg0, arg1) + ret := m.ctrl.Call(m, "NewDeviceResponse", arg0, arg1, arg2) ret0, _ := ret[0].(fosite.DeviceResponder) ret1, _ := ret[1].(error) return ret0, ret1 } // NewDeviceResponse indicates an expected call of NewDeviceResponse. -func (mr *MockOAuth2ProviderMockRecorder) NewDeviceResponse(arg0, arg1 interface{}) *gomock.Call { +func (mr *MockOAuth2ProviderMockRecorder) NewDeviceResponse(arg0, arg1, arg2 interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewDeviceResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).NewDeviceResponse), arg0, arg1) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "NewDeviceResponse", reflect.TypeOf((*MockOAuth2Provider)(nil).NewDeviceResponse), arg0, arg1, arg2) } // NewIntrospectionRequest mocks base method. @@ -207,7 +207,7 @@ func (mr *MockOAuth2ProviderMockRecorder) NewRevocationRequest(arg0, arg1 interf } // WriteAccessError mocks base method. -func (m *MockOAuth2Provider) WriteAccessError(arg0 context.Context, arg1 http.ResponseWriter, arg2 fosite.AccessRequester, arg3 error) { +func (m *MockOAuth2Provider) WriteAccessError(arg0 context.Context, arg1 http.ResponseWriter, arg2 fosite.Requester, arg3 error) { m.ctrl.T.Helper() m.ctrl.Call(m, "WriteAccessError", arg0, arg1, arg2, arg3) }