Documentation
¶
Index ¶
- Constants
- func GetTokenIdKey(id int64) string
- func GetTokenKey(session string) string
- func Tokens() kid.Middleware
- type Option
- type Options
- type RedisStore
- type Store
- type Token
- func (guard *Token) Cancellation(license string) error
- func (guard *Token) ExpiresAt(license string) int64
- func (guard *Token) IssuerAt(license string) int64
- func (guard *Token) License(user *guard.User) (string, error)
- func (guard *Token) Provide() interface{}
- func (guard *Token) Verify(license string) (*guard.User, error)
Constants ¶
View Source
const ( Key = "auth.token.%s" IDKey = "auth.id.%d" )
Variables ¶
This section is empty.
Functions ¶
func GetTokenIdKey ¶ added in v1.0.0
func GetTokenKey ¶ added in v1.0.0
func Tokens ¶ added in v1.0.0
func Tokens() kid.Middleware
Types ¶
type RedisStore ¶ added in v1.0.0
type RedisStore struct {
// contains filtered or unexported fields
}
func (*RedisStore) Expired ¶ added in v1.0.0
func (rs *RedisStore) Expired(license string) error
func (*RedisStore) Get ¶ added in v1.0.0
func (rs *RedisStore) Get(token string) (*tokenInfo, error)
func (*RedisStore) Provide ¶ added in v1.0.0
func (rs *RedisStore) Provide() interface{}
func (*RedisStore) Save ¶ added in v1.0.0
func (rs *RedisStore) Save(token string, session *tokenInfo) error
type Token ¶
type Token struct { Store Store `inject:""` // contains filtered or unexported fields }
func (*Token) Cancellation ¶
Click to show internal directories.
Click to hide internal directories.