token

package
v0.16.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	OrgType = "token-auth"
)

Variables

This section is empty.

Functions

func LoadTokenFile

func LoadTokenFile(file string) (map[string]authv1.UserInfo, error)

https://kubernetes.io/docs/admin/authentication/#static-token-file csv token file:

  • four field required (format : token,user,uid,"group1,group2,group3")
  • groups can be empty, others cannot be empty
  • token should be unique
  • one user can have multiple token

Types

type Authenticator

type Authenticator struct {
	// contains filtered or unexported fields
}

func New

func New(opts Options) *Authenticator

func (*Authenticator) Check

func (s *Authenticator) Check(token string) (*authv1.UserInfo, error)

func (*Authenticator) Configure

func (s *Authenticator) Configure() error

func (*Authenticator) UID

func (s *Authenticator) UID() string

type Options

type Options struct {
	AuthFile string
}

func NewOptions

func NewOptions() Options

func (*Options) AddFlags

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

func (Options) Apply

func (o Options) Apply(d *apps.Deployment) (extraObjs []runtime.Object, err error)

func (*Options) Validate

func (o *Options) Validate() []error

Jump to

Keyboard shortcuts

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