authenticator

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2016 License: Apache-2.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Password

type Password interface {
	AuthenticatePassword(user, password string) (user.Info, bool, error)
}

Password checks a username and password against a backing authentication store and returns information about the user and true if successful, false if not successful, or an error if the username and password could not be checked

type PasswordFunc

type PasswordFunc func(user, password string) (user.Info, bool, error)

PasswordFunc is a function that implements the Password interface.

func (PasswordFunc) AuthenticatePassword

func (f PasswordFunc) AuthenticatePassword(user, password string) (user.Info, bool, error)

AuthenticatePassword implements authenticator.Password.

type Request

type Request interface {
	AuthenticateRequest(req *http.Request) (user.Info, bool, error)
}

Request attempts to extract authentication information from a request and returns information about the current user and true if successful, false if not successful, or an error if the request could not be checked.

type RequestFunc

type RequestFunc func(req *http.Request) (user.Info, bool, error)

RequestFunc is a function that implements the Request interface.

func (RequestFunc) AuthenticateRequest

func (f RequestFunc) AuthenticateRequest(req *http.Request) (user.Info, bool, error)

AuthenticateRequest implements authenticator.Request.

type Token

type Token interface {
	AuthenticateToken(token string) (user.Info, bool, error)
}

Token checks a string value against a backing authentication store and returns information about the current user and true if successful, false if not successful, or an error if the token could not be checked.

type TokenFunc

type TokenFunc func(token string) (user.Info, bool, error)

TokenFunc is a function that implements the Token interface.

func (TokenFunc) AuthenticateToken

func (f TokenFunc) AuthenticateToken(token string) (user.Info, bool, error)

AuthenticateToken implements authenticator.Token.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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