Documentation
¶
Index ¶
- type Client
- type ClientStore
- type Config
- type DBType
- type Token
- type TokenStore
- func (ts *TokenStore) Close()
- 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
- func (ts *TokenStore) SetStdout(stdout io.Writer) *TokenStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientStore ¶
type ClientStore struct {
// contains filtered or unexported fields
}
func NewClientStore ¶
func NewClientStore(cfg *Config, table string) *ClientStore
func NewClientStoreWithDB ¶
func NewClientStoreWithDB(cfg *Config, db *gorm.DB, table string) *ClientStore
func (*ClientStore) Create ¶
func (cs *ClientStore) Create(ctx context.Context, info oauth2.ClientInfo) error
Create create oauth2 client
func (*ClientStore) GetByID ¶
func (cs *ClientStore) GetByID(ctx context.Context, id string) (oauth2.ClientInfo, error)
GetByID retrieves and returns client information by id
func (*ClientStore) RemoveByID ¶
func (ts *ClientStore) RemoveByID(ctx context.Context, id string) error
RemoveByID delete the client by id
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
func NewTokenStore ¶
func NewTokenStore(cfg *Config, table string, gcInterval int) *TokenStore
func NewTokenStoreWithDB ¶
func (TokenStore) Create ¶
func (ts TokenStore) Create(ctx context.Context, info oauth2.TokenInfo) error
func (*TokenStore) GetByAccess ¶
func (ts *TokenStore) GetByAccess(ctx context.Context, access string) (oauth2.TokenInfo, error)
GetByAccess 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)
GetByRefresh 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
func (*TokenStore) SetStdout ¶
func (ts *TokenStore) SetStdout(stdout io.Writer) *TokenStore
SetStdout set error output
Click to show internal directories.
Click to hide internal directories.