authenticator

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 24 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAPISigningKeyHookHandler

func NewAPISigningKeyHookHandler(authClient authinternalclient.AuthInterface) genericapiserver.PostStartHookProvider

NewAPISigningKeyHookHandler creates a new apiSigningKeysHookHandler object.

func NewAdminIdentityHookHandler

func NewAdminIdentityHookHandler(authClient authinternalclient.AuthInterface, tenantID, userName, password string) genericapiserver.PostStartHookProvider

NewAdminIdentityHookHandler creates a new adminIdentityHookHandler object.

func NewFakeAuthenticator

func NewFakeAuthenticator() genericauthenticator.Request

NewFakeAuthenticator creates new fake authenticator object.

Types

type APIKeyAuthenticator

type APIKeyAuthenticator struct {
	// contains filtered or unexported fields
}

APIKeyAuthenticator provides a function to generate and verify jwt-format api key.

func NewAPIKeyAuthenticator

func NewAPIKeyAuthenticator(authClient authinternalclient.AuthInterface) (*APIKeyAuthenticator, error)

NewAPIKeyAuthenticator creates new APIKeyAuthenticator object.

func (*APIKeyAuthenticator) AuthenticateToken

func (h *APIKeyAuthenticator) AuthenticateToken(ctx context.Context, token string) (*genericauthenticator.Response, bool, error)

AuthenticateToken verifies jwt-format api key and returns user info.

type TokenAuthenticator

type TokenAuthenticator struct {
	IDTokenVerifier *oidc.IDTokenVerifier
	// contains filtered or unexported fields
}

TokenAuthenticator provides a function to verify token.

func NewTokenAuthenticator

func NewTokenAuthenticator(authClient authinternalclient.AuthInterface) *TokenAuthenticator

NewTokenAuthenticator creates new TokenAuthenticator object.

func (*TokenAuthenticator) AuthenticateToken

func (h *TokenAuthenticator) AuthenticateToken(ctx context.Context, token string) (*genericauthenticator.Response, bool, error)

AuthenticateToken verifies oidc token and returns user info.

Jump to

Keyboard shortcuts

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