Documentation ¶
Overview ¶
Package jwt can be used to sign/show/verify jwt token with given secretID and secretKey.
Index ¶
- Variables
- func NewCmdJWT(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdShow(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdSign(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- func NewCmdVerify(f cmdutil.Factory, ioStreams genericiooptions.IOStreams) *cobra.Command
- type ArgList
- type ShowOptions
- type SignOptions
- type VerifyOptions
Constants ¶
This section is empty.
Variables ¶
var ErrSigningMethod = errors.New("invalid signing method")
ErrSigningMethod defines invalid signing method error.
Functions ¶
func NewCmdShow ¶
NewCmdShow returns new initialized instance of show sub command.
func NewCmdSign ¶
NewCmdSign returns new initialized instance of sign sub command.
func NewCmdVerify ¶
NewCmdVerify returns new initialized instance of verify sub command.
Types ¶
type ArgList ¶
ArgList defines a new pflag Value.
type ShowOptions ¶
type ShowOptions struct { Compact bool genericiooptions.IOStreams }
ShowOptions is an options struct to support show subcommands.
func NewShowOptions ¶
func NewShowOptions(ioStreams genericiooptions.IOStreams) *ShowOptions
NewShowOptions returns an initialized ShowOptions instance.
func (*ShowOptions) Run ¶
func (o *ShowOptions) Run(args []string) error
Run executes a show subcommand using the specified options.
type SignOptions ¶
type SignOptions struct { Timeout time.Duration NotBefore time.Duration Algorithm string Issuer string Header ArgList genericiooptions.IOStreams }
SignOptions is an options struct to support sign subcommands.
func NewSignOptions ¶
func NewSignOptions(ioStreams genericiooptions.IOStreams) *SignOptions
NewSignOptions returns an initialized SignOptions instance.
func (*SignOptions) Run ¶
func (o *SignOptions) Run(args []string) error
Run executes a sign subcommand using the specified options.
type VerifyOptions ¶
type VerifyOptions struct { Compact bool Debug bool genericiooptions.IOStreams }
VerifyOptions is an options struct to support verify subcommands.
func NewVerifyOptions ¶
func NewVerifyOptions(ioStreams genericiooptions.IOStreams) *VerifyOptions
NewVerifyOptions returns an initialized VerifyOptions instance.
func (*VerifyOptions) Run ¶
func (o *VerifyOptions) Run(args []string) error
Run executes a verify subcommand using the specified options.