authentication

package
v0.0.0-...-6d13c91 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 8 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"
	TenantKey                  ContextKey = "TenantKey"
	ConsumerType               ContextKey = "ConsumerType"
	ClientIdFromTokenKey       ContextKey = "ClientIdFromToken"
	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