Documentation
¶
Index ¶
- Constants
- func NewTokenStore(cfg *redis.Options) (ts oauth2.TokenStore, err error)
- type ClientValue
- type RedisCaptchaStore
- type RedisClientStore
- type RedisTokenStore
- func (rs *RedisTokenStore) Create(info oauth2.TokenInfo) (err error)
- func (rs *RedisTokenStore) GetByAccess(access string) (ti oauth2.TokenInfo, err error)
- func (rs *RedisTokenStore) GetByCode(code string) (ti oauth2.TokenInfo, err error)
- func (rs *RedisTokenStore) GetByRefresh(refresh string) (ti oauth2.TokenInfo, err error)
- func (rs *RedisTokenStore) RemoveByAccess(access string) (err error)
- func (rs *RedisTokenStore) RemoveByCode(code string) (err error)
- func (rs *RedisTokenStore) RemoveByRefresh(refresh string) (err error)
Constants ¶
View Source
const RedisKeyOauth2Client = "oauth2_client"
Variables ¶
This section is empty.
Functions ¶
func NewTokenStore ¶
NewTokenStore Create a token store instance based on redis
Types ¶
type ClientValue ¶
type RedisCaptchaStore ¶
type RedisCaptchaStore struct {
// contains filtered or unexported fields
}
func NewRedisCaptchaStore ¶
func (*RedisCaptchaStore) Remove ¶
func (cs *RedisCaptchaStore) Remove(mobile string) (err error)
func (*RedisCaptchaStore) Save ¶
func (cs *RedisCaptchaStore) Save(mobile, captcha string) (err error)
type RedisClientStore ¶
type RedisClientStore struct {
// contains filtered or unexported fields
}
RedisTokenStore redis token store
func NewClientStore ¶
func NewClientStore(cfg *redis.Options) (clientStore *RedisClientStore, err error)
func (*RedisClientStore) GetByID ¶
func (cs *RedisClientStore) GetByID(id string) (cli oauth2.ClientInfo, err error)
GetByID according to the ID for the client information
func (*RedisClientStore) Set ¶
func (cs *RedisClientStore) Set(id string, cli oauth2.ClientInfo) (err error)
Set set client information
type RedisTokenStore ¶
type RedisTokenStore struct {
// contains filtered or unexported fields
}
RedisTokenStore redis token store
func (*RedisTokenStore) Create ¶
func (rs *RedisTokenStore) Create(info oauth2.TokenInfo) (err error)
Create Create and store the new token information
func (*RedisTokenStore) GetByAccess ¶
func (rs *RedisTokenStore) GetByAccess(access string) (ti oauth2.TokenInfo, err error)
GetByAccess Use the access token for token information data
func (*RedisTokenStore) GetByCode ¶
func (rs *RedisTokenStore) GetByCode(code string) (ti oauth2.TokenInfo, err error)
GetByCode Use the authorization code for token information data
func (*RedisTokenStore) GetByRefresh ¶
func (rs *RedisTokenStore) GetByRefresh(refresh string) (ti oauth2.TokenInfo, err error)
GetByRefresh Use the refresh token for token information data
func (*RedisTokenStore) RemoveByAccess ¶
func (rs *RedisTokenStore) RemoveByAccess(access string) (err error)
RemoveByAccess Use the access token to delete the token information
func (*RedisTokenStore) RemoveByCode ¶
func (rs *RedisTokenStore) RemoveByCode(code string) (err error)
RemoveByCode Use the authorization code to delete the token information
func (*RedisTokenStore) RemoveByRefresh ¶
func (rs *RedisTokenStore) RemoveByRefresh(refresh string) (err error)
RemoveByRefresh Use the refresh token to delete the token information
Click to show internal directories.
Click to hide internal directories.