authn

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicOption

type BasicOption struct {
	TTL   int        `json:"ttl" mapstructure:"ttl"`
	Users BasicUsers `json:"users" mapstructure:"users"`
}

func NewBasicOption

func NewBasicOption() *BasicOption

func (*BasicOption) AddFlags

func (o *BasicOption) AddFlags(fs *pflag.FlagSet)

func (*BasicOption) Enabled

func (o *BasicOption) Enabled() bool

func (*BasicOption) Validate

func (o *BasicOption) Validate() error

type BasicUser

type BasicUser struct {
	ID         string              `json:"ID" mapstructure:"ID"`
	Name       string              `json:"name" mapstructure:"name"`
	Password   string              `json:"password" mapstructure:"password"`
	Groups     []string            `json:"groups" mapstructure:"groups"`
	Extensions map[string][]string `json:"extensions" mapstructure:"extensions"`
}

func (*BasicUser) Set

func (u *BasicUser) Set(value string) error

func (*BasicUser) String

func (u *BasicUser) String() string

func (*BasicUser) Type

func (u *BasicUser) Type() string

type BasicUsers

type BasicUsers []BasicUser

func (*BasicUsers) Set

func (u *BasicUsers) Set(value string) error

func (*BasicUsers) String

func (u *BasicUsers) String() string

func (*BasicUsers) Type

func (u *BasicUsers) Type() string

type JWTOption

type JWTOption struct {
	ID        string `json:"id" mapstructure:"id"`
	Secret    string `json:"secret" mapstructure:"secret"`
	Algorithm string `json:"algorithm" mapstructure:"algorithm"`
}

func NewJWTOption

func NewJWTOption() *JWTOption

func (*JWTOption) AddFlags

func (o *JWTOption) AddFlags(fs *pflag.FlagSet)

func (*JWTOption) Enabled

func (o *JWTOption) Enabled() bool

func (*JWTOption) Validate

func (o *JWTOption) Validate() error

type Options

type Options struct {
	Basic *BasicOption `json:"basic,omitempty" mapstructure:"basic"`
	JWT   *JWTOption   `json:"jwt,omitempty" mapstructure:"jwt"`
}

Options stands for auth options.

func NewOptions

func NewOptions() *Options

NewOptions ...

func (*Options) AddFlags

func (o *Options) AddFlags(fs *pflag.FlagSet)

AddFlags ...

func (*Options) Validate

func (o *Options) Validate() error

Validate ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL