Versions in this module Expand all Collapse all v12 v12.1.9 Aug 12, 2022 Changes in this version + var PathLogin = mvc.Response + var PathLogout = mvc.Response + func GeneratePassword(userPassword string) ([]byte, error) + func ValidatePassword(userPassword string, hashed []byte) (bool, error) + type AuthController struct + Session *sessions.Session + Source *DataSource + UserID int64 + func (c *AuthController) BeginRequest(ctx iris.Context) + func (c *AuthController) EndRequest(ctx iris.Context) + type Controller struct + func (c *Controller) AnyLogout() + func (c *Controller) BeforeActivation(b mvc.BeforeActivation) + func (c *Controller) GetBy(userID int64) mvc.Result + func (c *Controller) GetLogin() mvc.Result + func (c *Controller) GetMe() mvc.Result + func (c *Controller) GetRegister() mvc.Result + func (c *Controller) PostLogin(form formValue) mvc.Result + func (c *Controller) PostRegister(form formValue) mvc.Result + type DataSource struct + Users map[int64]Model + func NewDataSource() *DataSource + func (d *DataSource) GetBy(query func(Model) bool) (user Model, found bool) + func (d *DataSource) GetByID(id int64) (Model, bool) + func (d *DataSource) GetByUsername(username string) (Model, bool) + func (d *DataSource) InsertOrUpdate(user Model) (Model, error) + type Model struct + CreatedAt time.Time + Firstname string + HashedPassword []byte + ID int64 + Username string + func (u Model) Dispatch(ctx iris.Context)