Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AccessTokenExpireInterval int64
View Source
var AccessTokenIss string
View Source
var AccessTokenKey string
Functions ¶
func InitAccessToken ¶
func InitAccessToken(accessTokenIss, accessTokenKey string)
func InitAccessTokenExpireInterval ¶
func InitAccessTokenExpireInterval(accessTokenExpireInterval int64)
Types ¶
type AccessTokenTicket ¶
type JwtTokenAccessor ¶
type JwtTokenAccessor struct{}
func (*JwtTokenAccessor) DecodeAccessToken ¶
func (g *JwtTokenAccessor) DecodeAccessToken(tokenStr string) (resp map[string]interface{}, err error)
func (*JwtTokenAccessor) EncodeAccessToken ¶
type TokenAccessor ¶
type TokenAccessor interface { CreateAccessToken(uid int, startTime int64) (resp AccessTokenTicket, err error) CheckAccessToken(tokenStr string) bool RefreshAccessToken(tokenStr string, startTime int64) (resp AccessTokenTicket, err error) DecodeAccessToken(tokenStr string) (resp map[string]interface{}, err error) }
Click to show internal directories.
Click to hide internal directories.