mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 08:50:42 +02:00
cli: fix some confusing comments (#602)
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
parent
ae4204d42b
commit
6337377ad6
1 changed files with 3 additions and 5 deletions
|
@ -66,7 +66,6 @@ func run() error {
|
|||
expiry time.Duration
|
||||
)
|
||||
|
||||
// set our JWT claims from the supplied CLI flags
|
||||
flags = flag.NewFlagSet(os.Args[0], flag.ExitOnError)
|
||||
flags.StringVar(&sa.Email, "email", "", "Email")
|
||||
flags.StringVar(&sa.ImpersonateEmail, "impersonate_email", "", "Impersonation Email (optional)")
|
||||
|
@ -77,20 +76,19 @@ func run() error {
|
|||
flags.Var(&groups, "groups", "Groups (e.g. admins@pomerium.io,users@pomerium.io)")
|
||||
flags.Var(&impersonateGroups, "impersonate_groups", "Impersonation Groups (optional)")
|
||||
flags.DurationVar(&expiry, "expiry", time.Hour, "Expiry")
|
||||
|
||||
// hydrate the sessions non-primate types
|
||||
if err := flags.Parse(os.Args[1:]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// hydrate our session
|
||||
sa.Audience = jwt.Audience(aud)
|
||||
sa.Groups = []string(groups)
|
||||
sa.ImpersonateGroups = []string(impersonateGroups)
|
||||
sa.Expiry = jwt.NewNumericDate(time.Now().Add(expiry))
|
||||
sa.IssuedAt = jwt.NewNumericDate(time.Now())
|
||||
sa.NotBefore = jwt.NewNumericDate(time.Now())
|
||||
// why not be pretty?
|
||||
|
||||
c := color.New(color.FgGreen)
|
||||
// check that we've got our shared key to sign our jwt
|
||||
var sharedKey string
|
||||
args := flags.Args()
|
||||
if len(args) == 1 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue