mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-12 09:05:39 +00:00
feature: JWT Validation wip for Cloudflare (#264)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user