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.
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.

View File

@ -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,
}
}