Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TokenAuthenticator ¶
type TokenAuthenticator struct { Enabled bool `envconfig:"AUTH_ENABLED"` Tokens []string `envconfig:"AUTH_TOKENS"` }
TokenAuthenticator will process authentication against a static set of tokens.
func NewTokenAuthenticator ¶
func NewTokenAuthenticator(enabled bool, tokens []string) *TokenAuthenticator
NewTokenAuthenticator will return an authenticator that will validate using a whitelisted set of tokens.
func (TokenAuthenticator) IsEnabled ¶
func (authenticator TokenAuthenticator) IsEnabled() bool
IsEnabled will return if enabled.
Click to show internal directories.
Click to hide internal directories.