Documentation ¶
Overview ¶
Package tokens implements various user and admin tokens generation methods.
Index ¶
- Constants
- func NewAdminAuthToken(app core.App, admin *models.Admin) (string, error)
- func NewAdminFileToken(app core.App, admin *models.Admin) (string, error)
- func NewAdminResetPasswordToken(app core.App, admin *models.Admin) (string, error)
- func NewRecordAuthToken(app core.App, record *models.Record) (string, error)
- func NewRecordChangeEmailToken(app core.App, record *models.Record, newEmail string) (string, error)
- func NewRecordFileToken(app core.App, record *models.Record) (string, error)
- func NewRecordResetPasswordToken(app core.App, record *models.Record) (string, error)
- func NewRecordVerifyToken(app core.App, record *models.Record) (string, error)
Constants ¶
const ( TypeAdmin = "admin" TypeAuthRecord = "authRecord" )
Variables ¶
This section is empty.
Functions ¶
func NewAdminAuthToken ¶
NewAdminAuthToken generates and returns a new admin authentication token.
func NewAdminFileToken ¶ added in v0.15.0
NewAdminFileToken generates and returns a new admin private file access token.
func NewAdminResetPasswordToken ¶
NewAdminResetPasswordToken generates and returns a new admin password reset request token.
func NewRecordAuthToken ¶ added in v0.8.0
NewRecordAuthToken generates and returns a new auth record authentication token.
func NewRecordChangeEmailToken ¶ added in v0.8.0
func NewRecordChangeEmailToken(app core.App, record *models.Record, newEmail string) (string, error)
NewRecordChangeEmailToken generates and returns a new auth record change email request token.
func NewRecordFileToken ¶ added in v0.15.0
NewRecordFileToken generates and returns a new record private file access token.
func NewRecordResetPasswordToken ¶ added in v0.8.0
NewRecordResetPasswordToken generates and returns a new auth record password reset request token.
Types ¶
This section is empty.