user

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrorLogin = errors.New("login error")

Functions

func Activate

func Activate(users njudge.Users) echo.HandlerFunc

func BeginOAuth

func BeginOAuth() echo.HandlerFunc

func GetForgotPassword added in v0.5.0

func GetForgotPassword() echo.HandlerFunc

func GetForgotPasswordForm added in v0.5.0

func GetForgotPasswordForm() echo.HandlerFunc

func GetLogin

func GetLogin(googleAuth bool) echo.HandlerFunc

func GetRegister

func GetRegister() echo.HandlerFunc

func Logout

func Logout() echo.HandlerFunc

func OAuthCallback

func OAuthCallback(us njudge.Users) echo.HandlerFunc

func PostForgotPassword added in v0.5.0

func PostForgotPassword(url string, users njudge.Users, mailService email.Service) echo.HandlerFunc

func PostForgotPasswordForm added in v0.5.0

func PostForgotPasswordForm(users njudge.Users) echo.HandlerFunc

func PostLogin

func PostLogin(us njudge.Users) echo.HandlerFunc

func PostRegister added in v0.5.0

func PostRegister(url string, users njudge.Users, mailService email.Service) echo.HandlerFunc

func RequireLoginMiddleware

func RequireLoginMiddleware() func(echo.HandlerFunc) echo.HandlerFunc

func SetUserMiddleware

func SetUserMiddleware(us njudge.Users) func(echo.HandlerFunc) echo.HandlerFunc

Types

type Authenticator

type Authenticator func(c echo.Context) (*njudge.User, error)

type GetForgotPasswordFormRequest added in v0.5.0

type GetForgotPasswordFormRequest struct {
	Name string `param:"name"`
	Key  string `param:"key"`
}

type LoginErrorWithMessage

type LoginErrorWithMessage struct {
	TranslatedMessage string
}

func (LoginErrorWithMessage) Error

func (LoginErrorWithMessage) Error() string

func (LoginErrorWithMessage) Is

func (LoginErrorWithMessage) Is(target error) bool

type PostForgotPasswordFormRequest added in v0.5.0

type PostForgotPasswordFormRequest struct {
	Password1 string `form:"password1"`
	Password2 string `form:"password1"`

	Name string `form:"name"`
	Key  string `form:"key"`
}

type PostLoginRequest added in v0.5.0

type PostLoginRequest struct {
	Name     string `form:"name"`
	Password string `form:"password"`
}

type PostRegisterRequest added in v0.5.0

type PostRegisterRequest struct {
	Name      string `form:"name"`
	Email     string `form:"email"`
	Password  string `form:"password"`
	Password2 string `form:"password2"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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