Documentation ¶
Index ¶
- Variables
- type Handler
- type RedisJWTHandler
- func (h *RedisJWTHandler) CheckSession(ctx *gin.Context, ssid string) error
- func (h *RedisJWTHandler) ClearToken(ctx *gin.Context) error
- func (h *RedisJWTHandler) ExtractToken(ctx *gin.Context) string
- func (h *RedisJWTHandler) SetJWTToken(ctx *gin.Context, uid int64, ssid string) error
- func (h *RedisJWTHandler) SetLoginToken(ctx *gin.Context, uid int64) error
- type RefreshClaims
- type UserClaims
Constants ¶
This section is empty.
Variables ¶
View Source
var ( AtKey = []byte("95osj3fUD7fo0mlYdDbncXz4VD2igvf0") RtKey = []byte("95osj3fUD7fo0mlYdDbncXz4VD2igvfx") )
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface { SetLoginToken(ctx *gin.Context, uid int64) error SetJWTToken(ctx *gin.Context, uid int64, ssid string) error ClearToken(ctx *gin.Context) error CheckSession(ctx *gin.Context, ssid string) error ExtractToken(ctx *gin.Context) string }
func NewRedisJWTHandler ¶
func NewRedisJWTHandler(cmd redis.Cmdable) Handler
type RedisJWTHandler ¶
type RedisJWTHandler struct {
// contains filtered or unexported fields
}
func (*RedisJWTHandler) CheckSession ¶
func (h *RedisJWTHandler) CheckSession(ctx *gin.Context, ssid string) error
func (*RedisJWTHandler) ClearToken ¶
func (h *RedisJWTHandler) ClearToken(ctx *gin.Context) error
func (*RedisJWTHandler) ExtractToken ¶
func (h *RedisJWTHandler) ExtractToken(ctx *gin.Context) string
func (*RedisJWTHandler) SetJWTToken ¶
func (*RedisJWTHandler) SetLoginToken ¶
func (h *RedisJWTHandler) SetLoginToken(ctx *gin.Context, uid int64) error
type RefreshClaims ¶
type UserClaims ¶
Click to show internal directories.
Click to hide internal directories.