Documentation
¶
Index ¶
- type Native
- func (n *Native) ChangePassword(c controller.Interface) error
- func (n *Native) ForgotPassword(c controller.Interface) error
- func (n *Native) Login(c controller.Interface) (auth.Schema, error)
- func (n *Native) Logout(c controller.Interface) error
- func (n *Native) RegisterAccount(c controller.Interface) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Native ¶
type Native struct { }
Native is exported that it can get overwritten if needed.
func (*Native) ChangePassword ¶
func (n *Native) ChangePassword(c controller.Interface) error
ChangePassword is checking if the login,pw and token are given. If everything is valid, the password will be changed.
func (*Native) ForgotPassword ¶
func (n *Native) ForgotPassword(c controller.Interface) error
ForgotPassword will send an email to the user with a reset link. The password token will be valid for 15min.
func (*Native) Login ¶
Login will check if the ParamLogin and ParamPassword are provided. Then the user gets logged in and the password gets checked. If the password is wrong, the users IncreaseFailedLogin gets called. A auth.Schema will return with the users.Email address. Error will return if the user does not exist or the password is wrong.
func (*Native) Logout ¶
func (n *Native) Logout(c controller.Interface) error
Logout is doing absolutely nothing.
func (*Native) RegisterAccount ¶
func (n *Native) RegisterAccount(c controller.Interface) error
RegisterAccount