users

package
v0.0.0-...-d43ff6f Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayWelcome

func DisplayWelcome(w http.ResponseWriter, r *http.Request)

func GetLogin

func GetLogin(cookie string) types.LoginRec

func LoggedIn

func LoggedIn(w http.ResponseWriter, r *http.Request, theUser *types.LoginRec) bool

LoggedIn checks to see if a user is already logged in

func OutputLoginForm

func OutputLoginForm(userName string, errorMessage string, remember bool, w http.ResponseWriter, r *http.Request)

func QRCode

func QRCode(w http.ResponseWriter, r *http.Request)

QRCode displays the totp image which can be scanned for the authenticator program

func Signup

func Signup(w http.ResponseWriter, r *http.Request)

Signup gets the email address and password, creates the cookie and goes to the QRCode page

func Validate

func Validate(w http.ResponseWriter, r *http.Request)

Validate asks for a code using the authenticator app

Types

type LoginFormRecord

type LoginFormRecord struct {
	Name     string `schema:"username"`
	Password string `schema:"password"`
	Remember bool   `schema:"remember"`
	Commit   string `schema:"commit"`
}

Jump to

Keyboard shortcuts

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