Documentation ¶
Index ¶
- type ClientStore
- type ClientStoreConfig
- type ClientStoreItem
- type TokenStore
- func (ts *TokenStore) Close()
- func (ts *TokenStore) Create(info oauth2.TokenInfo) error
- func (ts *TokenStore) GetByAccess(access string) (oauth2.TokenInfo, error)
- func (ts *TokenStore) GetByCode(code string) (oauth2.TokenInfo, error)
- func (ts *TokenStore) GetByRefresh(refresh string) (oauth2.TokenInfo, error)
- func (ts *TokenStore) RemoveByAccess(access string) error
- func (ts *TokenStore) RemoveByRefresh(refresh string) error
- func (ts *TokenStore) RmoveByCode(code string) error
- type TokenStoreConfig
- type TokenStoreItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientStore ¶
type ClientStore struct { Config ClientStoreConfig DB *gorm.DB Ticker *time.Ticker }
func NewClientStore ¶
func NewClientStore(db *gorm.DB, config ClientStoreConfig) (*ClientStore, error)
Create a new client store
func (*ClientStore) Close ¶
func (cs *ClientStore) Close()
func (*ClientStore) Create ¶
func (cs *ClientStore) Create(info oauth2.ClientInfo) error
Create and store new client info
func (*ClientStore) GetByID ¶
func (cs *ClientStore) GetByID(id string) (oauth2.ClientInfo, error)
Get client info by ID
type ClientStoreConfig ¶
type ClientStoreItem ¶
type TokenStore ¶
type TokenStore struct { Config TokenStoreConfig DB *gorm.DB Ticker *time.Ticker }
func NewTokenStore ¶
func NewTokenStore(db *gorm.DB, config TokenStoreConfig) (*TokenStore, error)
Create a new token store
func (*TokenStore) Close ¶
func (ts *TokenStore) Close()
func (*TokenStore) Create ¶
func (ts *TokenStore) Create(info oauth2.TokenInfo) error
Create and store new token info
func (*TokenStore) GetByAccess ¶
func (ts *TokenStore) GetByAccess(access string) (oauth2.TokenInfo, error)
Get token info by Access
func (*TokenStore) GetByCode ¶
func (ts *TokenStore) GetByCode(code string) (oauth2.TokenInfo, error)
Get token info by Code
func (*TokenStore) GetByRefresh ¶
func (ts *TokenStore) GetByRefresh(refresh string) (oauth2.TokenInfo, error)
Get token info by Refresh
func (*TokenStore) RemoveByAccess ¶
func (ts *TokenStore) RemoveByAccess(access string) error
Remove token info by Access
func (*TokenStore) RemoveByRefresh ¶
func (ts *TokenStore) RemoveByRefresh(refresh string) error
Remove token info by Refresh
func (*TokenStore) RmoveByCode ¶
func (ts *TokenStore) RmoveByCode(code string) error
Remove token info by Code
type TokenStoreConfig ¶
Click to show internal directories.
Click to hide internal directories.