auth

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: MPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

type Authenticator interface {
	IsEnabled() bool
	Validate(ctx context.Context, token string) (context.Context, bool)
}

Authenticator will process runtime authentication.

func NewTokenAuthenticator

func NewTokenAuthenticator(enabled bool, tokens []string) Authenticator

NewTokenAuthenticator will return an authenticator that will validate using a whitelisted set of tokens.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳