feature: Huge JWT improvements for CloudFlare, etc (#269)

This commit is contained in:
James Read
2024-04-14 23:59:45 +01:00
committed by GitHub
parent dd11961a11
commit 8341b1d6d0
5 changed files with 66 additions and 88 deletions

View File

@@ -49,10 +49,6 @@ func parseRequestMetadata(ctx context.Context, req *http.Request) metadata.MD {
username := ""
usergroup := ""
if cfg.AuthJwtHeaderName != "" {
username, usergroup = parseJwtHeader(req.Header.Get(cfg.AuthJwtHeaderName))
}
if cfg.AuthJwtCookieName != "" {
username, usergroup = parseJwtCookie(req)
}
@@ -66,7 +62,7 @@ func parseRequestMetadata(ctx context.Context, req *http.Request) metadata.MD {
"usergroup", usergroup,
)
log.Debugf("api request metadata: %+v", md)
log.Tracef("api request metadata: %+v", md)
return md
}