Documentation ¶
Index ¶
- func GetUserLogoutKey(uid string) string
- type JwtTokenHolder
- func (j *JwtTokenHolder) CreateToken(ctx context.Context, uid string, perms string, expiresIn int64) (string, error)
- func (j *JwtTokenHolder) IsLogout(ctx context.Context, uid string, loginAt int64) bool
- func (j *JwtTokenHolder) SetLogout(ctx context.Context, uid string, loginOut int64) error
- func (j *JwtTokenHolder) VerifyToken(ctx context.Context, token string, uid string) (jwt.MapClaims, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetUserLogoutKey ¶
Types ¶
type JwtTokenHolder ¶
type JwtTokenHolder struct {
// contains filtered or unexported fields
}
func NewJwtTokenHolder ¶
func NewJwtTokenHolder(issuer string, secret string, cache *redis.Redis) *JwtTokenHolder
func (*JwtTokenHolder) CreateToken ¶
func (*JwtTokenHolder) VerifyToken ¶
Click to show internal directories.
Click to hide internal directories.