authentication

package
v0.0.0-...-baf11bc Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetStringFromContext

func GetStringFromContext(ctx context.Context, key ContextKey) (string, error)

func NewAuthenticationContextMiddleware

func NewAuthenticationContextMiddleware() *authContextMiddleware

func PutIntoContext

func PutIntoContext(ctx context.Context, key ContextKey, value string) context.Context

Types

type Authenticator

type Authenticator interface {
	AuthenticateToken(context context.Context) (string, error)
	Authenticate(context context.Context) (string, error)
	AuthenticateCertificate(context context.Context) (string, string, error)
}

func NewAuthenticator

func NewAuthenticator() Authenticator

type ContextKey

type ContextKey string
const (
	ConnectorTokenKey          ContextKey = "ConnectorToken"
	ClientIdFromTokenKey       ContextKey = "ClientIdFromToken"
	TokenTypeKey               ContextKey = "TokenType"
	ClientIdFromCertificateKey ContextKey = "ClientIdFromCertificate"
	ClientCertificateHashKey   ContextKey = "ClientCertificateHash"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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