auth

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2016 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Authenticator

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

The authenticator authenticate user via http protocol.

func NewAuthenticator

func NewAuthenticator(userdb *userdb.UserDatabase) (*Authenticator, error)

func (*Authenticator) Authenticate

func (auth *Authenticator) Authenticate(username, password string) (*userdb.BasicUser, string, error)

Authenticate user with name and password. Returns the User object and a token.

func (*Authenticator) Verify

func (auth *Authenticator) Verify(r *http.Request) (*userdb.BasicUser, error)

Verify the current http request is authorized.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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