Documentation ¶
Index ¶
- type RedisTokenStorage
- func (r *RedisTokenStorage) CheckToken(ctx context.Context, token string) (bool, error)
- func (r *RedisTokenStorage) Close() error
- func (r *RedisTokenStorage) DeleteToken(ctx context.Context, token string) error
- func (r *RedisTokenStorage) SaveToken(ctx context.Context, token string, lifeDuration time.Duration) error
- type TokenStorage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisTokenStorage ¶
type RedisTokenStorage struct {
// contains filtered or unexported fields
}
Implementation of the TokenStorage interface for Redis.
func NewRedisTokenStorage ¶
func NewRedisTokenStorage(redis *redis.Client) *RedisTokenStorage
Get redis token storage.
func (*RedisTokenStorage) CheckToken ¶
Check for token existence in redis.
func (*RedisTokenStorage) DeleteToken ¶
func (r *RedisTokenStorage) DeleteToken(ctx context.Context, token string) error
Delete token in Redis.
Click to show internal directories.
Click to hide internal directories.