Documentation ¶
Index ¶
- Constants
- func CompareHashAndPassword(oldPassword, newPassword string) bool
- func CompareToken(tk string) bool
- func GenerateFromPassword(password string) (string, error)
- func GenerateToken(tu *model.TUser, role *model.TUserRole) (string, error)
- func GetRole(c *gin.Context) (*model.TUserRole, error)
- func GetUser(c *gin.Context) (*model.TUser, error)
Constants ¶
View Source
const TokenKey = "ginpro"
Variables ¶
This section is empty.
Functions ¶
func CompareHashAndPassword ¶
func CompareToken ¶
func GenerateFromPassword ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.