From 56f08f74682e153c79c9db0d19a6693b751ba2c5 Mon Sep 17 00:00:00 2001 From: Travis Johnson Date: Wed, 30 Aug 2023 23:35:17 -0700 Subject: [PATCH] UsernameClaim instead of Claim --- auth/jwt.go | 14 +++++++------- cmd/config.go | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/auth/jwt.go b/auth/jwt.go index 0ee74c5f..b4770baf 100644 --- a/auth/jwt.go +++ b/auth/jwt.go @@ -18,13 +18,13 @@ const MethodJWTAuth settings.AuthMethod = "jwt-header" // JWTAuth is a JWTAuth implementation of an auther. type JWTAuth struct { - CertsURL string `json:"certsurl"` - Aud string `json:"aud"` - Iss string `json:"iss"` - Claim string `json:"claim"` - Header string `json:"header"` - remoteKeySet *oidc.RemoteKeySet - init sync.Once + CertsURL string `json:"certsurl"` + Aud string `json:"aud"` + Iss string `json:"iss"` + UsernameClaim string `json:"usernameClaim"` + Header string `json:"header"` + remoteKeySet *oidc.RemoteKeySet + init sync.Once } // Auth authenticates the user via a JWT token in an HTTP header. diff --git a/cmd/config.go b/cmd/config.go index da9631d2..f0e08227 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -112,11 +112,11 @@ func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings. } auther = &auth.JWTAuth{ - Header: header, - Aud: aud, - Iss: iss, - CertsURL: certsurl, - Claim: claim, + Header: header, + Aud: aud, + Iss: iss, + CertsURL: certsurl, + UsernameClaim: claim, } }