redis

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2023 License: GPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisClientStore

func NewRedisClientStore(key string, secretEncryptor security.ISecretEncryptor, config *sredis.RedisConfig) store.IClientStore

func NewRedisStateStore

func NewRedisStateStore(prefix string, secretEncryptor security.ISecretEncryptor, config *sredis.RedisConfig) store.ITokenStore

func NewRedisTokenStore

func NewRedisTokenStore(prefix string, secretEncryptor security.ISecretEncryptor, config *sredis.RedisConfig) store.ITokenStore

Types

type RedisClientStore

type RedisClientStore struct {
	Key             string
	SecretEncryptor security.ISecretEncryptor
	RedisClient     redis.UniversalClient
}

func (*RedisClientStore) GetClient

func (x *RedisClientStore) GetClient(clientID string) model.IClient

func (*RedisClientStore) GetClients

func (x *RedisClientStore) GetClients() map[string]model.IClient

func (*RedisClientStore) Verify

func (x *RedisClientStore) Verify(clientID, clientSecret string) model.IClient

type RedisStateStore

type RedisStateStore struct {
	Prefix          string
	SecretEncryptor security.ISecretEncryptor
	RedisClient     redis.UniversalClient
}

func (*RedisStateStore) GetThenRemove

func (x *RedisStateStore) GetThenRemove(key string) (r string)

func (*RedisStateStore) Save

func (x *RedisStateStore) Save(key, value string, expireSeconds int)

type RedisTokenStore

type RedisTokenStore struct {
	Prefix          string
	SecretEncryptor security.ISecretEncryptor
	RedisClient     redis.UniversalClient
}

func (*RedisTokenStore) GetThenRemoveTokenInfo

func (x *RedisTokenStore) GetThenRemoveTokenInfo(refreshToken string) *model.TokenInfo

func (*RedisTokenStore) RemoveRefreshToken

func (x *RedisTokenStore) RemoveRefreshToken(refreshToken string)

func (*RedisTokenStore) SaveRefreshToken

func (x *RedisTokenStore) SaveRefreshToken(refreshToken string, requestInfo *model.TokenInfo, expireSeconds int32)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL