Documentation
¶
Index ¶
- Constants
- func GenerateAccessToken(refreshToken *jwt.Token, privateKey string) (string, error)
- func GenerateRefreshToken(claims jwt.MapClaims, secret string) (*jwt.Token, string, error)
- func ParseAccessToken(tokenString string, publicKey string) (*jwt.Token, error)
- func ParseRefreshToken(tokenString string, secretGenerator func(string) (string, error)) (*jwt.Token, error)
- type RedisUserModel
- type UserModel
Constants ¶
View Source
const AccessTokenExpireTime = 360
Variables ¶
This section is empty.
Functions ¶
func GenerateAccessToken ¶
func GenerateRefreshToken ¶
func ParseAccessToken ¶
Types ¶
type RedisUserModel ¶
UserModel is the model for user
func NewUserModel ¶
func NewUserModel(redis *redis.Client, prefix string, expiry time.Duration) *RedisUserModel
func (*RedisUserModel) GetVersion ¶
GetVersion returns the version of the user and updates the expiry of the version
func (*RedisUserModel) UpdateVersion ¶
Click to show internal directories.
Click to hide internal directories.