Documentation ¶
Index ¶
- type RedisStore
- func (r RedisStore) Close() error
- func (r RedisStore) Delete(ctx context.Context, key string) error
- func (r RedisStore) Exists(ctx context.Context, key string) (bool, error)
- func (r RedisStore) Get(ctx context.Context, key string) (string, error)
- func (r RedisStore) GetRefreshTokenFromStore(ctx context.Context, token string) (string, error)
- func (r RedisStore) Set(ctx context.Context, key, value string, expiration time.Duration) error
- type Storage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RedisStore ¶
func (RedisStore) Delete ¶
func (r RedisStore) Delete(ctx context.Context, key string) error
Delete remove the key.
func (RedisStore) GetRefreshTokenFromStore ¶
Get retrieves a token from the store, the key we are using here is the access token.
type Storage ¶
type Storage interface { // Set the token to the store Set(ctx context.Context, key string, value string, expiration time.Duration) error // Get retrieves a token from the store Get(ctx context.Context, key string) (string, error) // Exists checks if key exists in store Exists(ctx context.Context, key string) (bool, error) // Delete removes a key from the store Delete(ctx context.Context, key string) error // Close is used to close off any resources Close() error GetRefreshTokenFromStore(ctx context.Context, token string) (string, error) }
storage is used to hold the offline refresh token, assuming you don't want to use the default practice of a encrypted cookie.
func CreateStorage ¶
createStorage creates the store client for use.
Click to show internal directories.
Click to hide internal directories.