auth

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 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.Result

User sign in

func (*Controller) SignOutHandler

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

User sign out

func (*Controller) SignUpHandler

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

User register

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