Documentation ¶
Index ¶
- type ClientStore
- type OauthClient
- type OauthToken
- type TokenStore
- func (ts *TokenStore) Create(ctx context.Context, info oauth2.TokenInfo) error
- func (ts *TokenStore) GetByAccess(ctx context.Context, access string) (oauth2.TokenInfo, error)
- func (ts *TokenStore) GetByCode(ctx context.Context, code string) (oauth2.TokenInfo, error)
- func (ts *TokenStore) GetByRefresh(ctx context.Context, refresh string) (oauth2.TokenInfo, error)
- func (ts *TokenStore) RemoveByAccess(ctx context.Context, access string) error
- func (ts *TokenStore) RemoveByCode(ctx context.Context, code string) error
- func (ts *TokenStore) RemoveByRefresh(ctx context.Context, refresh string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientStore ¶
func NewClientStore ¶
func NewClientStore(db *gorm.DB) *ClientStore
func (*ClientStore) Create ¶
func (s *ClientStore) Create(info oauth2.ClientInfo) error
type OauthClient ¶
type OauthToken ¶
type TokenStore ¶
func NewTokenStore ¶
func NewTokenStore(db *gorm.DB) (*TokenStore, error)
func (*TokenStore) Create ¶
func (ts *TokenStore) Create(ctx context.Context, info oauth2.TokenInfo) error
create and store the new token information
func (*TokenStore) GetByAccess ¶
func (ts *TokenStore) GetByAccess(ctx context.Context, access string) (oauth2.TokenInfo, error)
use the access token for token information data
func (*TokenStore) GetByCode ¶
func (ts *TokenStore) GetByCode(ctx context.Context, code string) (oauth2.TokenInfo, error)
use the authorization code for token information data
func (*TokenStore) GetByRefresh ¶
func (ts *TokenStore) GetByRefresh(ctx context.Context, refresh string) (oauth2.TokenInfo, error)
use the refresh token for token information data
func (*TokenStore) RemoveByAccess ¶
func (ts *TokenStore) RemoveByAccess(ctx context.Context, access string) error
use the access token to delete the token information
func (*TokenStore) RemoveByCode ¶
func (ts *TokenStore) RemoveByCode(ctx context.Context, code string) error
delete the authorization code
func (*TokenStore) RemoveByRefresh ¶
func (ts *TokenStore) RemoveByRefresh(ctx context.Context, refresh string) error
use the refresh token to delete the token information
Click to show internal directories.
Click to hide internal directories.