UsernameClaim instead of Claim
This commit is contained in:
parent
627b733440
commit
56f08f7468
14
auth/jwt.go
14
auth/jwt.go
@ -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.
|
||||||
|
|||||||
@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user