fix(oidc): show detailed error reasons (#3175)
parent
85a88de24d
commit
f97474f01b
|
@ -23,7 +23,7 @@ func OAuthIntrospectionPOST(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter
|
|||
if responder, err = ctx.Providers.OpenIDConnect.Fosite.NewIntrospectionRequest(ctx, req, oidcSession); err != nil {
|
||||
rfc := fosite.ErrorToRFC6749Error(err)
|
||||
|
||||
ctx.Logger.Errorf("Introspection Request failed with error: %+v", rfc)
|
||||
ctx.Logger.Errorf("Introspection Request failed with error: %s", rfc.GetDescription())
|
||||
|
||||
ctx.Providers.OpenIDConnect.Fosite.WriteIntrospectionError(rw, err)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ func OAuthRevocationPOST(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter, r
|
|||
if err = ctx.Providers.OpenIDConnect.Fosite.NewRevocationRequest(ctx, req); err != nil {
|
||||
rfc := fosite.ErrorToRFC6749Error(err)
|
||||
|
||||
ctx.Logger.Errorf("Revocation Request failed with error: %+v", rfc)
|
||||
ctx.Logger.Errorf("Revocation Request failed with error: %s", rfc.GetDescription())
|
||||
}
|
||||
|
||||
ctx.Providers.OpenIDConnect.Fosite.WriteRevocationResponse(rw, err)
|
||||
|
|
|
@ -29,7 +29,7 @@ func OpenIDConnectAuthorizationGET(ctx *middlewares.AutheliaCtx, rw http.Respons
|
|||
if requester, err = ctx.Providers.OpenIDConnect.Fosite.NewAuthorizeRequest(ctx, r); err != nil {
|
||||
rfc := fosite.ErrorToRFC6749Error(err)
|
||||
|
||||
ctx.Logger.Errorf("Authorization Request failed with error: %+v", rfc)
|
||||
ctx.Logger.Errorf("Authorization Request failed with error: %s", rfc.GetDescription())
|
||||
|
||||
ctx.Providers.OpenIDConnect.Fosite.WriteAuthorizeError(rw, requester, err)
|
||||
|
||||
|
@ -104,7 +104,7 @@ func OpenIDConnectAuthorizationGET(ctx *middlewares.AutheliaCtx, rw http.Respons
|
|||
if responder, err = ctx.Providers.OpenIDConnect.Fosite.NewAuthorizeResponse(ctx, requester, oidcSession); err != nil {
|
||||
rfc := fosite.ErrorToRFC6749Error(err)
|
||||
|
||||
ctx.Logger.Errorf("Authorization Response for Request with id '%s' on client with id '%s' could not be created: %+v", requester.GetID(), clientID, rfc)
|
||||
ctx.Logger.Errorf("Authorization Response for Request with id '%s' on client with id '%s' could not be created: %s", requester.GetID(), clientID, rfc.GetDescription())
|
||||
|
||||
ctx.Providers.OpenIDConnect.Fosite.WriteAuthorizeError(rw, requester, err)
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ func OpenIDConnectTokenPOST(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter
|
|||
if requester, err = ctx.Providers.OpenIDConnect.Fosite.NewAccessRequest(ctx, req, oidcSession); err != nil {
|
||||
rfc := fosite.ErrorToRFC6749Error(err)
|
||||
|
||||
ctx.Logger.Errorf("Access Request failed with error: %+v", rfc)
|
||||
ctx.Logger.Errorf("Access Request failed with error: %s", rfc.GetDescription())
|
||||
|
||||
ctx.Providers.OpenIDConnect.Fosite.WriteAccessError(rw, requester, err)
|
||||
|
||||
|
@ -47,7 +47,7 @@ func OpenIDConnectTokenPOST(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter
|
|||
if responder, err = ctx.Providers.OpenIDConnect.Fosite.NewAccessResponse(ctx, requester); err != nil {
|
||||
rfc := fosite.ErrorToRFC6749Error(err)
|
||||
|
||||
ctx.Logger.Errorf("Access Response for Request with id '%s' failed to be created with error: %+v", requester.GetID(), rfc)
|
||||
ctx.Logger.Errorf("Access Response for Request with id '%s' failed to be created with error: %s", requester.GetID(), rfc.GetDescription())
|
||||
|
||||
ctx.Providers.OpenIDConnect.Fosite.WriteAccessError(rw, requester, err)
|
||||
|
||||
|
|
Loading…
Reference in New Issue