Documentation ¶
Index ¶
- func GenerateToken(c *fiber.Ctx, user *model.User, expiration time.Time, secret []byte) (string, error)
- type Config
- type Controller
- func (a *Controller) EditPassword(c *fiber.Ctx) error
- func (a *Controller) Login(c *fiber.Ctx) error
- func (a *Controller) Recover(c *fiber.Ctx) error
- func (a *Controller) Request(c *fiber.Ctx) error
- func (a *Controller) SignIn(c *fiber.Ctx) error
- func (a *Controller) SignOut(c *fiber.Ctx) error
- func (a *Controller) UpdatePassword(c *fiber.Ctx) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
func NewController ¶
func NewController(repository authRepository, sender recoveryEmail, cfg Config, printers map[string]*message.Printer) *Controller
func (*Controller) EditPassword ¶
func (a *Controller) EditPassword(c *fiber.Ctx) error
func (*Controller) Login ¶
func (a *Controller) Login(c *fiber.Ctx) error
func (*Controller) Recover ¶
func (a *Controller) Recover(c *fiber.Ctx) error
func (*Controller) Request ¶
func (a *Controller) Request(c *fiber.Ctx) error
func (*Controller) SignIn ¶
func (a *Controller) SignIn(c *fiber.Ctx) error
Signs in a user and gives them a JWT.
func (*Controller) SignOut ¶
func (a *Controller) SignOut(c *fiber.Ctx) error
Logs out user and removes their JWT.
func (*Controller) UpdatePassword ¶
func (a *Controller) UpdatePassword(c *fiber.Ctx) error
Click to show internal directories.
Click to hide internal directories.