auth

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Controller

type Controller struct {
	Service services.UserService
}

func (*Controller) BeforeActivation

func (instance *Controller) BeforeActivation(request mvc.BeforeActivation)

路由分发

func (*Controller) SignInHandler

func (instance *Controller) SignInHandler(ctx iris.Context) mvc.Response

用户登录逻辑

func (*Controller) SignOutHandler

func (instance *Controller) SignOutHandler(ctx iris.Context) mvc.Response

用户注销逻辑

func (*Controller) SignUpHandler

func (instance *Controller) SignUpHandler(ctx iris.Context) mvc.Response

用户注册逻辑

type SignIn

type SignIn struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type SignInSuccess

type SignInSuccess struct {
	AccessToken string `json:"access_token"`
	TokenType   string `json:"token_type"`
	ExpiresIn   int64  `json:"expires_in"`
}

type SignUp

type SignUp struct {
	Name     string `json:"name" validate:"required"`
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
	Confirm  string `json:"confirm" validate:"required"`
}

Jump to

Keyboard shortcuts

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