auth

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 4, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package auth implements the authentication in use for gophish.

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptyPassword = errors.New("Password cannot be blank")

ErrEmptyPassword is thrown when a user provides a blank password to the register or change password functions

View Source
var ErrInvalidPassword = errors.New("Invalid Password")

ErrInvalidPassword is thrown when a user provides an incorrect password.

View Source
var ErrPasswordMismatch = errors.New("Passwords must match")

ErrPasswordMismatch is thrown when a user provides passwords that do not match

View Source
var ErrUsernameTaken = errors.New("Username already taken")

ErrUsernameTaken is thrown when a user attempts to register a username that is taken.

Store contains the session information for the request

Functions

func ChangePassword

func ChangePassword(r *http.Request) error

func GenerateSecureKey

func GenerateSecureKey() string

GenerateSecureKey creates a secure key to use as an API key

func Login

func Login(r *http.Request) (bool, models.User, error)

Login attempts to login the user given a request.

func Register

func Register(r *http.Request) (bool, error)

Register attempts to register the user given a request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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