Documentation ¶
Overview ¶
Package authentication implements authentication mechanisms.
The Transparent Key Server is designed to be used by identity providers - IdP in OAuth parlance. OAuth2 Access Tokens may be provided as authentication information, which can be resolved to user information and associated scopes on the backend.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrMissingAuth occurs when authentication information is missing. ErrMissingAuth = errors.New("auth: missing authentication header") // ErrWrongUser occurs when the authenticated user does not match the owner of the requested resource. ErrWrongUser = errors.New("auth: email missmatch") )
Functions ¶
This section is empty.
Types ¶
type Authenticator ¶
type Authenticator interface { // ValidateCreds verifies that the requiredUserID, and any other // required authentication information is present in ctx. ValidateCreds(ctx context.Context, requiredUserID string) error }
Authenticator provides services to authenticate users.
type FakeAuth ¶
type FakeAuth struct{}
FakeAuth provides a fake authenticator for testing.
func (*FakeAuth) NewContext ¶
NewContext adds authentication details to a new background context.
Click to show internal directories.
Click to hide internal directories.