Documentation
¶
Index ¶
- Variables
- type JWT
- func (j *JWT) DelCacheToken(ctx context.Context, uid any) (err error)
- func (j *JWT) GenerateToken(ctx context.Context, uid any, claims jwt.MapClaims) (string, error)
- func (j *JWT) GetCacheToken(ctx context.Context, uid any) (token string, err error)
- func (j *JWT) ParseToken(r *http.Request) (uid any, claims jwt.MapClaims, err error)
- func (j *JWT) WithRdb(rdb redis.UniversalClient) *JWT
- func (j *JWT) WithScene(scene string) *JWT
- func (j *JWT) WithSecret(secret string) *JWT
- func (j *JWT) WithSso(sso bool) *JWT
- func (j *JWT) WithTTL(ttl int64) *JWT
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type JWT ¶
type JWT struct {
// contains filtered or unexported fields
}
func (*JWT) DelCacheToken ¶
DelCacheToken 删除缓存的token
func (*JWT) GenerateToken ¶
func (*JWT) GetCacheToken ¶ added in v0.0.2
GetCacheToken 获取缓存的token
func (*JWT) ParseToken ¶
func (*JWT) WithSecret ¶
Click to show internal directories.
Click to hide internal directories.