in pkg/cmd/jwks/root.go [26:48]
func NewJWKSCmd() *cobra.Command {
jwksCmd := &jwksCmd{}
cmd := &cobra.Command{
Use: "jwks",
Short: "JSON Web Key Sets for the service account issuer keys",
Long: "This command provides the ability to generate a JSON Web Key Sets (JWKS) for the service account issuer keys",
PreRunE: func(cmd *cobra.Command, args []string) error {
return jwksCmd.validate()
},
RunE: func(cmd *cobra.Command, args []string) error {
return jwksCmd.run()
},
}
f := cmd.Flags()
f.StringSliceVar(&jwksCmd.publicKeys, "public-keys", nil, "List of public keys to include in the JWKS")
f.StringVar(&jwksCmd.outputFile, "output-file", "", "The name of the file to write the JWKS to. If not provided, the default output is stdout")
_ = cmd.MarkFlagRequired("public-keys")
return cmd
}