You've already forked step-ca-cli
mirror of
https://github.com/smallstep/cli.git
synced 2025-08-09 03:22:43 +03:00
Clarify comment for OIDC tokens.
This commit is contained in:
@@ -198,9 +198,9 @@ func loginAction(ctx *cli.Context) error {
|
|||||||
identityKey = key
|
identityKey = key
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: For OIDC token the principals should be completely empty. The OIDC
|
// NOTE: For OIDC tokens the subject should be always the email. The
|
||||||
// provisioner is responsible for setting default principals by using an
|
// provisioner is responsible to setting the principals by using an identity
|
||||||
// identity function.
|
// function.
|
||||||
if email, ok := tokenHasEmail(token); ok {
|
if email, ok := tokenHasEmail(token); ok {
|
||||||
subject = email
|
subject = email
|
||||||
}
|
}
|
||||||
|
@@ -143,9 +143,9 @@ func doLoginIfNeeded(ctx *cli.Context, subject string) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: For OIDC token the principals should be completely empty. The OIDC
|
// NOTE: For OIDC tokens the subject should be always the email. The
|
||||||
// provisioner is responsible for setting default principals by using an
|
// provisioner is responsible to setting the principals by using an identity
|
||||||
// identity function.
|
// function.
|
||||||
if email, ok := tokenHasEmail(token); ok {
|
if email, ok := tokenHasEmail(token); ok {
|
||||||
subject = email
|
subject = email
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user