auth

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProviderHtpasswd  string = "Htpasswd"
	ProviderAnynymous string = "Anonymous"
	ProviderOIDC      string = "OIDC"
	ProviderToken     string = "Token"
)

Variables

This section is empty.

Functions

func CreateAuthFunction

func CreateAuthFunction(authProviders []Provider) grpc_auth.AuthFunc

func ExtractUserInfo

func ExtractUserInfo(ctx context.Context) (user.Info, error)

ExtractUserInfo extracts the user info from context

func RegisterAuthProvider

func RegisterAuthProvider(name string, provider Provider)

func RegisterPFlags

func RegisterPFlags(fs *pflag.FlagSet)

func RegisteredAuthProviders

func RegisteredAuthProviders() (out []string)

Types

type Provider

type Provider interface {
	AddFlags(fs *pflag.FlagSet)
	Init() error
	Authenticate(ctx context.Context) (user.Info, error)
}

func GetAuthProvider

func GetAuthProvider(name string) (Provider, error)

Jump to

Keyboard shortcuts

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