authenticator

package
v3.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2017 License: Apache-2.0, Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnyUserAuthenticator

type AnyUserAuthenticator struct{}

AnyUserAuthenticator is an authenticator that can be used in tests to allow for test users to be added to the context. The user name used is from the Basic auth of the http request.

func (*AnyUserAuthenticator) AuthenticateRequest

func (a *AnyUserAuthenticator) AuthenticateRequest(req *http.Request) (user.Info, bool, error)

AuthenticateRequest gets the user name from the Basic auth. If there is no basic auth or it is not valid for any reason, then an empty username is used.

Jump to

Keyboard shortcuts

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