mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 22:46:12 +00:00
fix godoc for email_verified requirement when username contains claims.email
Using 'claims.?email_verified.orValue(true) == true' in the example validation rule. By explicitly comparing the value to true, we let type-checking see the result will be a boolean, and to make sure a non-boolean email_verified claim will be caught at runtime. Signed-off-by: Anish Ramasekar <anish.ramasekar@gmail.com>
This commit is contained in:
parent
917a556981
commit
916c7867f7
@ -352,7 +352,9 @@ type ClaimMappings struct {
|
||||
// If username.expression uses 'claims.email', then 'claims.email_verified' must be used in
|
||||
// username.expression or extra[*].valueExpression or claimValidationRules[*].expression.
|
||||
// An example claim validation rule expression that matches the validation automatically
|
||||
// applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true)'.
|
||||
// applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true) == true'. By explicitly comparing
|
||||
// the value to true, we let type-checking see the result will be a boolean, and to make sure a non-boolean email_verified
|
||||
// claim will be caught at runtime.
|
||||
//
|
||||
// In the flag based approach, the --oidc-username-claim and --oidc-username-prefix are optional. If --oidc-username-claim is not set,
|
||||
// the default value is "sub". For the authentication config, there is no defaulting for claim or prefix. The claim and prefix must be set explicitly.
|
||||
|
@ -323,7 +323,9 @@ type ClaimMappings struct {
|
||||
// If username.expression uses 'claims.email', then 'claims.email_verified' must be used in
|
||||
// username.expression or extra[*].valueExpression or claimValidationRules[*].expression.
|
||||
// An example claim validation rule expression that matches the validation automatically
|
||||
// applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true)'.
|
||||
// applied when username.claim is set to 'email' is 'claims.?email_verified.orValue(true) == true'. By explicitly comparing
|
||||
// the value to true, we let type-checking see the result will be a boolean, and to make sure a non-boolean email_verified
|
||||
// claim will be caught at runtime.
|
||||
//
|
||||
// In the flag based approach, the --oidc-username-claim and --oidc-username-prefix are optional. If --oidc-username-claim is not set,
|
||||
// the default value is "sub". For the authentication config, there is no defaulting for claim or prefix. The claim and prefix must be set explicitly.
|
||||
|
Loading…
Reference in New Issue
Block a user