diff options
| author | James Elliott <james-d-elliott@users.noreply.github.com> | 2022-07-26 15:43:39 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-26 15:43:39 +1000 |
| commit | b2cbcf3913c1a322ab85af9567938fc0356acba8 (patch) | |
| tree | e4c3329b9b06be38e38110c20319571db2098653 /internal/handlers/handler_oidc_authorization.go | |
| parent | efe1facc353e8edb359e9591706d72b26d0943c9 (diff) | |
fix(handlers): consent session prevents standard flow (#3668)
This fixes an issue where consent sessions prevent the standard workflow.
Diffstat (limited to 'internal/handlers/handler_oidc_authorization.go')
| -rw-r--r-- | internal/handlers/handler_oidc_authorization.go | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/internal/handlers/handler_oidc_authorization.go b/internal/handlers/handler_oidc_authorization.go index 9e7470ce9..8d16146a5 100644 --- a/internal/handlers/handler_oidc_authorization.go +++ b/internal/handlers/handler_oidc_authorization.go @@ -61,26 +61,12 @@ func OpenIDConnectAuthorizationGET(ctx *middlewares.AutheliaCtx, rw http.Respons userSession := ctx.GetSession() - var subject model.NullUUID - - if userSession.Username != "" { - if subject.UUID, err = ctx.Providers.OpenIDConnect.Store.GetSubject(ctx, client.GetSectorIdentifier(), userSession.Username); err != nil { - ctx.Logger.Errorf("Authorization Request with id '%s' on client with id '%s' could not be processed: error occurred retrieving subject for user '%s': %+v", requester.GetID(), client.GetID(), userSession.Username, err) - - ctx.Providers.OpenIDConnect.Fosite.WriteAuthorizeError(rw, requester, fosite.ErrServerError.WithHint("Could not retrieve the subject.")) - - return - } - - subject.Valid = true - } - var ( consent *model.OAuth2ConsentSession handled bool ) - if consent, handled = handleOIDCAuthorizationConsent(ctx, issuer, client, userSession, subject, rw, r, requester); handled { + if consent, handled = handleOIDCAuthorizationConsent(ctx, issuer, client, userSession, rw, r, requester); handled { return } |
