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 genericclioptions.IOStreams) *cobra.Command
- func NewCmdShow(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdSign(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdVerify(f cmdutil.Factory, ioStreams genericclioptions.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 genericclioptions.IOStreams }
ShowOptions is an options struct to support show subcommands.
func NewShowOptions ¶
func NewShowOptions(ioStreams genericclioptions.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 Audience string Issuer string Claims ArgList Head ArgList genericclioptions.IOStreams }
SignOptions is an options struct to support sign subcommands.
func NewSignOptions ¶
func NewSignOptions(ioStreams genericclioptions.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 genericclioptions.IOStreams }
VerifyOptions is an options struct to support verify subcommands.
func NewVerifyOptions ¶
func NewVerifyOptions(ioStreams genericclioptions.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.