auth

package
v0.9.12 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 13 Imported by: 1

Documentation

Overview

@doc type app @doc name auth @doc description authentication api @doc author reza @doc include github.com/getevo/evo/user.model.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthUserByPassword

func AuthUserByPassword(username, password string) (*evo.User, error)

func GetGroup

func GetGroup(v interface{}) *evo.UserGroup

func GetUserByEmail

func GetUserByEmail(email interface{}) *evo.User

func GetUserByID

func GetUserByID(id interface{}) *evo.User

func GetUserByUsername

func GetUserByUsername(username interface{}) *evo.User

func Register

func Register()

Register register app

Types

type App

type App struct{}

App settings app struct

func (App) Menus

func (App) Menus() []menu.Menu

Menus setup menus

func (App) Pack

func (App) Pack()

func (App) Permissions

func (App) Permissions() []evo.Permission

Permissions setup permissions of app

func (App) Register

func (App) Register()

Register register the auth in io apps

func (App) Router

func (App) Router()

Router setup routers

func (App) WhenReady

func (App) WhenReady()

WhenReady called after setup all apps

type AuthParams

type AuthParams struct {
	Username string `json:"username" form:"username" validate:"empty=false"`
	Password string `json:"password" form:"password" validate:"empty=false"`
	Remember bool   `json:"remember" form:"remember"`
	Return   string `json:"return" form:"return" validate:"empty=true | one_of=json,text,html"`
	Redirect string `json:"redirect" form:"redirect"`
}

@doc type model @doc description input parameters for login api

type Controller

type Controller struct{}

func (Controller) CreateGroup

func (c Controller) CreateGroup(r *evo.Request)

func (Controller) CreateRole

func (c Controller) CreateRole(r *evo.Request)

func (Controller) CreateUser

func (c Controller) CreateUser(r *evo.Request)

func (Controller) EditGroup

func (c Controller) EditGroup(r *evo.Request)

func (Controller) EditRole

func (c Controller) EditRole(r *evo.Request)

func (Controller) EditUser

func (c Controller) EditUser(r *evo.Request)

TODO: Password check and change

func (Controller) GetAllPermissions

func (c Controller) GetAllPermissions(r *evo.Request)

func (Controller) GetAllUsers

func (c Controller) GetAllUsers(r *evo.Request)

func (Controller) GetGroup

func (c Controller) GetGroup(r *evo.Request)

func (Controller) GetGroups

func (c Controller) GetGroups(r *evo.Request)

func (Controller) GetMe

func (c Controller) GetMe(r *evo.Request)

func (Controller) GetRole

func (c Controller) GetRole(r *evo.Request)

func (Controller) GetRoleGroups

func (c Controller) GetRoleGroups(r *evo.Request)

func (Controller) GetRoles

func (c Controller) GetRoles(r *evo.Request)

func (Controller) GetUser

func (c Controller) GetUser(r *evo.Request)

func (Controller) Login

func (c Controller) Login(r *evo.Request)

Jump to

Keyboard shortcuts

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