-
Notifications
You must be signed in to change notification settings - Fork 295
Expand file tree
/
Copy pathtoken.go
More file actions
37 lines (34 loc) · 936 Bytes
/
token.go
File metadata and controls
37 lines (34 loc) · 936 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package token
import (
"github.com/urfave/cli"
)
// Command returns the token subcommand.
func Command() cli.Command {
return cli.Command{
Name: "token",
Usage: "create tokens for connecting to the Smallstep API",
UsageText: "step api token <subcommand> [arguments] [global-flags] [subcommand-flags]",
Subcommands: cli.Commands{
createCommand(),
},
Description: `**step api token** command group provides commands for creating the
tokens required to connect to the Smallstep API.
`,
}
}
// common flags
var (
apiURLFlag = cli.StringFlag{
Name: "api-url",
Usage: "URL where the Smallstep API can be found",
Value: "https://gateway.smallstep.com",
}
audienceFlag = cli.StringFlag{
Name: "audience",
Usage: "Request a token for an audience other than the API Gateway",
}
tpmDeviceFlag = cli.StringFlag{
Name: "tpm-device",
Usage: "(Optional) path to TPM device (e.g. /dev/tpmrm0)",
}
)