auth

package
v0.0.0-...-f20b4aa Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2017 License: GPL-3.0 Imports: 10 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
}

func NewAuthenticator

func NewAuthenticator(dal *db.DAL, cookieKey string) *Authenticator

func (*Authenticator) AuthMiddleware

func (auth *Authenticator) AuthMiddleware(h http.Handler) http.Handler

func (*Authenticator) Authorize

func (a *Authenticator) Authorize(rw http.ResponseWriter, req *http.Request) (*models.User, error)

func (*Authenticator) ConfirmUser

func (auth *Authenticator) ConfirmUser(email string, confirmationToken string) error

func (*Authenticator) CreatePasswordRecovery

func (auth *Authenticator) CreatePasswordRecovery(email string) (string, error)

func (*Authenticator) Login

func (a *Authenticator) Login(rw http.ResponseWriter, req *http.Request, email string, password string) error

func (*Authenticator) Logout

func (a *Authenticator) Logout(rw http.ResponseWriter, req *http.Request) error

func (*Authenticator) Register

func (a *Authenticator) Register(email string, password string, firstName string, lastName string) (string, error)

func (*Authenticator) UpdateUserPasswordFromRecovery

func (auth *Authenticator) UpdateUserPasswordFromRecovery(email string, token string, password string) error

Jump to

Keyboard shortcuts

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