authenticator

package
v0.0.0-...-c91eec7 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2014 License: 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 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 token 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