feature: JWT Validation wip for Cloudflare (#264)

This commit is contained in:
James Read
2024-04-10 23:14:33 +01:00
committed by GitHub
parent 9476d052b6
commit f13a5c070a
6 changed files with 99 additions and 4 deletions

View File

@@ -49,6 +49,10 @@ 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)
}