UsernameClaim instead of Claim

This commit is contained in:
Travis Johnson 2023-08-30 23:35:17 -07:00
parent 627b733440
commit 56f08f7468
2 changed files with 12 additions and 12 deletions

View File

@ -18,13 +18,13 @@ const MethodJWTAuth settings.AuthMethod = "jwt-header"
// JWTAuth is a JWTAuth implementation of an auther. // JWTAuth is a JWTAuth implementation of an auther.
type JWTAuth struct { type JWTAuth struct {
CertsURL string `json:"certsurl"` CertsURL string `json:"certsurl"`
Aud string `json:"aud"` Aud string `json:"aud"`
Iss string `json:"iss"` Iss string `json:"iss"`
Claim string `json:"claim"` UsernameClaim string `json:"usernameClaim"`
Header string `json:"header"` Header string `json:"header"`
remoteKeySet *oidc.RemoteKeySet remoteKeySet *oidc.RemoteKeySet
init sync.Once init sync.Once
} }
// Auth authenticates the user via a JWT token in an HTTP header. // Auth authenticates the user via a JWT token in an HTTP header.

View File

@ -112,11 +112,11 @@ func getAuthentication(flags *pflag.FlagSet, defaults ...interface{}) (settings.
} }
auther = &auth.JWTAuth{ auther = &auth.JWTAuth{
Header: header, Header: header,
Aud: aud, Aud: aud,
Iss: iss, Iss: iss,
CertsURL: certsurl, CertsURL: certsurl,
Claim: claim, UsernameClaim: claim,
} }
} }