Documentation ¶
Index ¶
- func CheckTku() bool
- func CreateDefaultTku(config *Config)
- func CreateDefaultTkuWithCache(config *Config)
- func NewStarter() *starter
- func NewTokenUtils(config *Config) *tokenUtils
- func NewTokenUtilsWithCache(config *Config) *tokenUtilsCache
- func XFTokenUtils(f func(t ITokenUtils) error) error
- type Config
- type CustomerClaim
- type ITokenUtils
- type UserClaim
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDefaultTkuWithCache ¶ added in v1.1.5
func CreateDefaultTkuWithCache(config *Config)
创建一个默认配置的带redis缓存的TokenUtils
func NewStarter ¶
func NewStarter() *starter
func NewTokenUtils ¶
func NewTokenUtils(config *Config) *tokenUtils
func NewTokenUtilsWithCache ¶ added in v1.1.5
func NewTokenUtilsWithCache(config *Config) *tokenUtilsCache
Types ¶
type Config ¶
type Config struct { UseCache bool // 是否打开redis缓存 PrivateKey string // jwt编码私钥 ExpSeconds int64 // jwt编码超时时间 TokenCacheKeyPrefix string // 缓存令牌键名前缀 }
func DefaultConfig ¶
func DefaultConfig() *Config
type ITokenUtils ¶
Click to show internal directories.
Click to hide internal directories.