summaryrefslogtreecommitdiff
path: root/internal/handlers/handler_oidc_userinfo.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/handlers/handler_oidc_userinfo.go')
-rw-r--r--internal/handlers/handler_oidc_userinfo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/handlers/handler_oidc_userinfo.go b/internal/handlers/handler_oidc_userinfo.go
index 34ca1291a..bd83bc6e2 100644
--- a/internal/handlers/handler_oidc_userinfo.go
+++ b/internal/handlers/handler_oidc_userinfo.go
@@ -44,7 +44,7 @@ func OpenIDConnectUserinfo(ctx *middlewares.AutheliaCtx, rw http.ResponseWriter,
ctx.Logger.Errorf("UserInfo Request with id '%s' failed with error: %s", requestID, oidc.ErrorToDebugRFC6749Error(err))
if rfc := fosite.ErrorToRFC6749Error(err); rfc.StatusCode() == http.StatusUnauthorized {
- rw.Header().Set(fasthttp.HeaderWWWAuthenticate, fmt.Sprintf(`Bearer error="%s",error_description="%s"`, rfc.ErrorField, rfc.GetDescription()))
+ rw.Header().Set(fasthttp.HeaderWWWAuthenticate, fmt.Sprintf(`Bearer %s`, oidc.RFC6750Header("", "", rfc)))
}
ctx.Providers.OpenIDConnect.WriteError(rw, req, err)