store

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: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultAuthorizationCodeStore

type DefaultAuthorizationCodeStore struct {
	// contains filtered or unexported fields
}

func (*DefaultAuthorizationCodeStore) GetThenRemove

func (x *DefaultAuthorizationCodeStore) GetThenRemove(code string) *model.TokenInfo

func (*DefaultAuthorizationCodeStore) Save

func (x *DefaultAuthorizationCodeStore) Save(code string, requestInfo *model.TokenInfo)

Save save request info to memory. This default in memory store doesn't encrypt request info. Encryption is an option for security enhancement, you can implement your own store to do that.

type DefaultStateStore

type DefaultStateStore struct {
	// contains filtered or unexported fields
}

func (*DefaultStateStore) GetThenRemove

func (x *DefaultStateStore) GetThenRemove(key string) string

func (*DefaultStateStore) Save

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

Save client state to memory. This default in memory store doesn't encrypt state. Encryption is an option for security enhancement, you can implement your own store to do that.

type IAuthorizationCodeStore

type IAuthorizationCodeStore interface {
	Save(code string, requestInfo *model.TokenInfo)
	GetThenRemove(code string) *model.TokenInfo
}

func NewDefaultAuthorizationCodeStore

func NewDefaultAuthorizationCodeStore(durationSecondes int) IAuthorizationCodeStore

type IClientStore

type IClientStore interface {
	GetClient(clientID string) model.IClient
}

type IStateStore

type IStateStore interface {
	Save(key, value string, expireSeconds int)
	GetThenRemove(key string) string
}

func NewDefaultStateStore

func NewDefaultStateStore() IStateStore

type ITokenStore

type ITokenStore interface {
	RemoveRefreshToken(refreshToken string)
	SaveRefreshToken(refreshToken string, requestInfo *model.TokenInfo, expireSeconds int32)
	GetThenRemoveTokenInfo(refreshToken string) *model.TokenInfo
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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