auth

package
v0.0.0-...-87bbeb5 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthController

type AuthController struct {
}

func (AuthController) Login

func (controller AuthController) Login(ctx echo.Context) error

func (AuthController) Profile

func (controller AuthController) Profile(c echo.Context) error

func (AuthController) Register

func (controller AuthController) Register(ctx echo.Context) error

func (AuthController) Routes

func (controller AuthController) Routes() []common.Route

type AuthService

type AuthService interface {
	GetAccessToken(user *UserModels.User) (string, error)
}

func GetAuthService

func GetAuthService() AuthService

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" form:"email" query:"email" validate:"email,required"`
	Password string `json:"password" validate:"required"`
}

type RegisterUserRequest

type RegisterUserRequest struct {
	Email    string `json:"email" form:"email" query:"email" validate:"email,required"`
	Name     string `json:"name" validate:"required"`
	Password string `json:"password" validate:"required"`
}

Jump to

Keyboard shortcuts

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