auth

package
v0.0.0-...-6c8972c Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(h *common.Server, r *mux.Router) (*mux.Router, error)

Types

type Login

type Login struct {
	Email    string
	Password string
}

func (Login) ValidateLoginForm

func (l Login) ValidateLoginForm(s *Svc, r *http.Request) error

type LoginTempData

type LoginTempData struct {
	CSRFField   template.HTML
	Form        Login
	FormAction  string
	GlobalURLs  map[string]string
	FormErrors  map[string]string
	FormMessage map[string]string
}

type Registration

type Registration struct {
	UserName        string
	Email           string
	Password        string
	ConfirmPassword string
}

func (Registration) ValidateRegistration

func (rg Registration) ValidateRegistration(server *Svc, r *http.Request, id string) error

type RegistrationTempData

type RegistrationTempData struct {
	CSRFField   template.HTML
	Form        Registration
	FormAction  string
	GlobalURLs  map[string]string
	FormErrors  map[string]string
	FormMessage map[string]string
}

type Svc

type Svc struct {
	*common.Server
}

Jump to

Keyboard shortcuts

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