Documentation ¶
Index ¶
- type ClientItem
- type ClientRepository
- type ClientStore
- type TokenInfo
- type TokenItem
- type TokenRepository
- func (repo *TokenRepository) Close()
- func (repo *TokenRepository) GetTokenByAccess(access string) (oauth2.TokenInfo, error)
- func (repo *TokenRepository) GetTokenByCode(code string) (oauth2.TokenInfo, error)
- func (repo *TokenRepository) GetTokenByRefresh(refresh string) (oauth2.TokenInfo, error)
- func (repo *TokenRepository) Insert(item *TokenItem) error
- func (repo *TokenRepository) RemoveAccess(access string) error
- func (repo *TokenRepository) RemoveCode(code string) error
- func (repo *TokenRepository) RemoveRefresh(refresh string) error
- type TokenStore
- func (s *TokenStore) Close()
- func (s *TokenStore) Create(ctx context.Context, info TokenInfo) error
- func (s *TokenStore) GetByAccess(ctx context.Context, access string) (TokenInfo, error)
- func (s *TokenStore) GetByCode(ctx context.Context, code string) (TokenInfo, error)
- func (s *TokenStore) GetByRefresh(ctx context.Context, refresh string) (TokenInfo, error)
- func (s *TokenStore) RemoveByAccess(ctx context.Context, access string) error
- func (s *TokenStore) RemoveByCode(ctx context.Context, code string) error
- func (s *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 ClientRepository ¶
type ClientRepository struct {
// contains filtered or unexported fields
}
func NewClientRepository ¶
func NewClientRepository(filename string) (*ClientRepository, error)
func (*ClientRepository) Close ¶
func (repo *ClientRepository) Close()
func (*ClientRepository) GetById ¶
func (repo *ClientRepository) GetById(id string) (*ClientItem, error)
func (*ClientRepository) Insert ¶
func (repo *ClientRepository) Insert(item *ClientItem) error
func (*ClientRepository) RemoveById ¶
func (repo *ClientRepository) RemoveById(id string) error
type ClientStore ¶
type ClientStore struct {
// contains filtered or unexported fields
}
func NewClientStore ¶
func NewClientStore(filename string) (*ClientStore, error)
func (*ClientStore) GetByID ¶
func (c *ClientStore) GetByID(ctx context.Context, id string) (oauth2.ClientInfo, error)
func (*ClientStore) RemoveByID ¶
func (c *ClientStore) RemoveByID(ctx context.Context, id string) error
type TokenRepository ¶
type TokenRepository struct {
// contains filtered or unexported fields
}
func NewTokenRepository ¶
func NewTokenRepository(filename string) (*TokenRepository, error)
func (*TokenRepository) Close ¶
func (repo *TokenRepository) Close()
func (*TokenRepository) GetTokenByAccess ¶
func (repo *TokenRepository) GetTokenByAccess(access string) (oauth2.TokenInfo, error)
func (*TokenRepository) GetTokenByCode ¶
func (repo *TokenRepository) GetTokenByCode(code string) (oauth2.TokenInfo, error)
func (*TokenRepository) GetTokenByRefresh ¶
func (repo *TokenRepository) GetTokenByRefresh(refresh string) (oauth2.TokenInfo, error)
func (*TokenRepository) Insert ¶
func (repo *TokenRepository) Insert(item *TokenItem) error
func (*TokenRepository) RemoveAccess ¶
func (repo *TokenRepository) RemoveAccess(access string) error
func (*TokenRepository) RemoveCode ¶
func (repo *TokenRepository) RemoveCode(code string) error
func (*TokenRepository) RemoveRefresh ¶
func (repo *TokenRepository) RemoveRefresh(refresh string) error
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
func NewSqliteStore ¶
func NewSqliteStore(filename string) (*TokenStore, error)
func (*TokenStore) Close ¶
func (s *TokenStore) Close()
func (*TokenStore) GetByAccess ¶
use the access token for token information data
func (*TokenStore) GetByRefresh ¶
func (*TokenStore) RemoveByAccess ¶
func (s *TokenStore) RemoveByAccess(ctx context.Context, access string) error
use the access token to delete the token information
func (*TokenStore) RemoveByCode ¶
func (s *TokenStore) RemoveByCode(ctx context.Context, code string) error
func (*TokenStore) RemoveByRefresh ¶
func (s *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.