Skip to content

Commit

Permalink
Fix test error
Browse files Browse the repository at this point in the history
  • Loading branch information
supercairos committed Nov 25, 2023
1 parent 3711af2 commit 662801a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions oauth2/oauth2_helper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,24 +54,24 @@ func (c *consentMock) HandleHeadlessLogout(ctx context.Context, w http.ResponseW
panic("not implemented")
}

func (c *consentMock) HandleOAuth2DeviceAuthorizationRequest(ctx context.Context, w http.ResponseWriter, r *http.Request, req fosite.DeviceAuthorizeRequester) (*consent.AcceptOAuth2ConsentRequest, error) {
func (c *consentMock) HandleOAuth2DeviceAuthorizationRequest(ctx context.Context, w http.ResponseWriter, r *http.Request, req fosite.DeviceAuthorizeRequester) (*flow.AcceptOAuth2ConsentRequest, *flow.Flow, error) {
if c.deny {
return nil, fosite.ErrRequestForbidden
return nil, nil, fosite.ErrRequestForbidden
}

return &consent.AcceptOAuth2ConsentRequest{
ConsentRequest: &consent.OAuth2ConsentRequest{
return &flow.AcceptOAuth2ConsentRequest{
ConsentRequest: &flow.OAuth2ConsentRequest{
Subject: "foo",
ACR: "1",
},
AuthenticatedAt: sqlxx.NullTime(c.authTime),
GrantedScope: []string{"offline", "openid", "hydra.*"},
Session: &consent.AcceptOAuth2ConsentRequestSession{
Session: &flow.AcceptOAuth2ConsentRequestSession{
AccessToken: map[string]interface{}{},
IDToken: map[string]interface{}{},
},
RequestedAt: c.requestTime,
}, nil
}, nil, nil
}

func (c *consentMock) ObfuscateSubjectIdentifier(ctx context.Context, cl fosite.Client, subject, forcedIdentifier string) (string, error) {
Expand Down

0 comments on commit 662801a

Please sign in to comment.