Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Aggregator ¶
type Aggregator struct {
// contains filtered or unexported fields
}
Aggregator aggregates authenticators
func NewAggregator ¶
func NewAggregator(authenticators ...Authenticator) Aggregator
NewAggregator receives list of authenticators order of passed authenticator determines in which order they will be queried
func (Aggregator) Authenticate ¶
func (a Aggregator) Authenticate(token string) (*unversioned.UserInfo, error)
Authenticate try all providers until first error or success hit
type Authenticator ¶
type Authenticator interface {
Authenticate(token string) (*unversioned.UserInfo, error)
}
Authenticator is the general concept providing authentication information Authenticate method should return error only if internal error happened if user could not be identified returned value should be nil, nil
type Noop ¶
type Noop struct{}
Noop is the default authenticator which only returns empty user
func (Noop) Authenticate ¶
func (n Noop) Authenticate(token string) (*unversioned.UserInfo, error)
Authenticate return empty userinfo
type Static ¶
type Static map[string]*unversioned.UserInfo
Static represents authentication mechanism via hardcoded token - user pair passed with a csv file
func (Static) Authenticate ¶
func (tokens Static) Authenticate(token string) (*unversioned.UserInfo, error)
Authenticate looks up a user for the provided token and returns UID