auth

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2019 License: MIT Imports: 5 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("No password provided")

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("Password cannot be blank")

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

Functions

func ChangePassword

func ChangePassword(r *http.Request) error

ChangePassword verifies the current password provided in the request and, if it's valid, changes the password for the authenticated user.

func Login

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

Login attempts to login 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