account

package
v0.0.0-...-263c4a3 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2017 License: LGPL-3.0 Imports: 8 Imported by: 1

Documentation

Overview

Package account provides route Handles for managing accounts.

Sign up, verify email address to activate account, resend activation email, reset password, log in, change email address verifying the new email address, suspend account through email confirmation.

The account details are kept in the database (model.Account). On log in, a copy of the account data is stored in an encrypted session cookie to authenticate requests for secured resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Activate

func Activate(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Activate activates the account with the given token.

func ActivateForm

func ActivateForm(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

ActivateForm renders a form to enter the activate token.

func ActivateToken

func ActivateToken(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

ActivateToken sends the new activate token.

func ChangeEmail

func ChangeEmail(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

ChangeEmail sets the new email address for the acoount if the given token is correct.

func ChangeEmailForm

func ChangeEmailForm(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

ChangeEmailForm accepts the token sent to the new email address to set for the account.

func ChangePassword

func ChangePassword(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func ChangePasswordForm

func ChangePasswordForm(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func EditAccount

func EditAccount(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

EditAccount renders a page with links and buttons to edit a logged-in client's account details.

func EmailToken

func EmailToken(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

EmailToken sends the token to change the account's email address.

func EmailTokenForm

func EmailTokenForm(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

EmailTokenForm renders a form to request a token to change the account's email address.

func LogIn

func LogOut

func LogOut(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func NewAccount

func NewAccount(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

NewAccount creates a new account in the database.

func PasswordToken

func PasswordToken(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func Suspend

func Suspend(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func SuspendForm

func SuspendForm(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

func SuspendToken

func SuspendToken(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

Types

This section is empty.

Jump to

Keyboard shortcuts

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