Documentation ¶
Index ¶
- func CreateWithAccessToken(tokenStorage *TokenStore, info oauth2.TokenInfo, id string) (err error)
- func CreateWithAccessTokenV4(tokenStorage *TokenStoreV4, info oauth2.TokenInfo, id string) (err error)
- func CreateWithAuthorizationCode(tokenStorage *TokenStore, info oauth2.TokenInfo, id string) (err error)
- func CreateWithAuthorizationCodeV4(tokenStorage *TokenStoreV4, info oauth2.TokenInfo, id string) (err error)
- func CreateWithRefreshToken(tokenStorage *TokenStore, info oauth2.TokenInfo) (err error)
- func CreateWithRefreshTokenV4(tokenStorage *TokenStoreV4, info oauth2.TokenInfo) (err error)
- func NewTokenStore(config *Config) (store oauth2.TokenStore)
- func NewTokenStoreV4(config *Config) (store oauth2.TokenStore)
- type Config
- type TableConfig
- type TokenStore
- func (tokenStorage *TokenStore) Create(info oauth2.TokenInfo) (err error)
- func (tokenStorage *TokenStore) GetByAccess(access string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStore) GetByCode(code string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStore) GetByRefresh(refresh string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStore) RemoveByAccess(access string) (err error)
- func (tokenStorage *TokenStore) RemoveByCode(code string) (err error)
- func (tokenStorage *TokenStore) RemoveByRefresh(refresh string) (err error)
- type TokenStoreV4
- func (tokenStorage *TokenStoreV4) Create(ctx context.Context, info oauth2.TokenInfo) (err error)
- func (tokenStorage *TokenStoreV4) GetByAccess(ctx context.Context, access string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStoreV4) GetByCode(ctx context.Context, code string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStoreV4) GetByRefresh(ctx context.Context, refresh string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStoreV4) RemoveByAccess(ctx context.Context, access string) (err error)
- func (tokenStorage *TokenStoreV4) RemoveByCode(ctx context.Context, code string) (err error)
- func (tokenStorage *TokenStoreV4) RemoveByRefresh(ctx context.Context, refresh string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWithAccessToken ¶
func CreateWithAccessToken(tokenStorage *TokenStore, info oauth2.TokenInfo, id string) (err error)
func CreateWithAccessTokenV4 ¶
func CreateWithAccessTokenV4(tokenStorage *TokenStoreV4, info oauth2.TokenInfo, id string) (err error)
func CreateWithAuthorizationCode ¶
func CreateWithAuthorizationCode(tokenStorage *TokenStore, info oauth2.TokenInfo, id string) (err error)
func CreateWithAuthorizationCodeV4 ¶
func CreateWithAuthorizationCodeV4(tokenStorage *TokenStoreV4, info oauth2.TokenInfo, id string) (err error)
func CreateWithRefreshToken ¶
func CreateWithRefreshToken(tokenStorage *TokenStore, info oauth2.TokenInfo) (err error)
func CreateWithRefreshTokenV4 ¶
func CreateWithRefreshTokenV4(tokenStorage *TokenStoreV4, info oauth2.TokenInfo) (err error)
func NewTokenStore ¶
func NewTokenStore(config *Config) (store oauth2.TokenStore)
func NewTokenStoreV4 ¶
func NewTokenStoreV4(config *Config) (store oauth2.TokenStore)
Types ¶
type Config ¶
type Config struct { SESSION *session.Session TABLE *TableConfig ENDPOINT string }
Config dynamodb configuration parameters
type TableConfig ¶
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
func (*TokenStore) Create ¶
func (tokenStorage *TokenStore) Create(info oauth2.TokenInfo) (err error)
Create and store the new token information
func (*TokenStore) GetByAccess ¶
func (tokenStorage *TokenStore) GetByAccess(access string) (to oauth2.TokenInfo, err error)
GetByAccess use the access token for token information data
func (*TokenStore) GetByCode ¶
func (tokenStorage *TokenStore) GetByCode(code string) (to oauth2.TokenInfo, err error)
GetByCode use the authorization code for token information data
func (*TokenStore) GetByRefresh ¶
func (tokenStorage *TokenStore) GetByRefresh(refresh string) (to oauth2.TokenInfo, err error)
GetByRefresh use the refresh token for token information data
func (*TokenStore) RemoveByAccess ¶
func (tokenStorage *TokenStore) RemoveByAccess(access string) (err error)
RemoveByAccess use the access token to delete the token information
func (*TokenStore) RemoveByCode ¶
func (tokenStorage *TokenStore) RemoveByCode(code string) (err error)
RemoveByCode use the authorization code to delete the token information
func (*TokenStore) RemoveByRefresh ¶
func (tokenStorage *TokenStore) RemoveByRefresh(refresh string) (err error)
RemoveByRefresh use the refresh token to delete the token information
type TokenStoreV4 ¶
type TokenStoreV4 struct {
// contains filtered or unexported fields
}
func (*TokenStoreV4) Create ¶
func (tokenStorage *TokenStoreV4) Create(ctx context.Context, info oauth2.TokenInfo) (err error)
Create and store the new token information
func (*TokenStoreV4) GetByAccess ¶
func (tokenStorage *TokenStoreV4) GetByAccess(ctx context.Context, access string) (to oauth2.TokenInfo, err error)
GetByAccess use the access token for token information data
func (*TokenStoreV4) GetByCode ¶
func (tokenStorage *TokenStoreV4) GetByCode(ctx context.Context, code string) (to oauth2.TokenInfo, err error)
GetByCode use the authorization code for token information data
func (*TokenStoreV4) GetByRefresh ¶
func (tokenStorage *TokenStoreV4) GetByRefresh(ctx context.Context, refresh string) (to oauth2.TokenInfo, err error)
GetByRefresh use the refresh token for token information data
func (*TokenStoreV4) RemoveByAccess ¶
func (tokenStorage *TokenStoreV4) RemoveByAccess(ctx context.Context, access string) (err error)
RemoveByAccess use the access token to delete the token information
func (*TokenStoreV4) RemoveByCode ¶
func (tokenStorage *TokenStoreV4) RemoveByCode(ctx context.Context, code string) (err error)
RemoveByCode use the authorization code to delete the token information
func (*TokenStoreV4) RemoveByRefresh ¶
func (tokenStorage *TokenStoreV4) RemoveByRefresh(ctx context.Context, refresh string) (err error)
RemoveByRefresh use the refresh token to delete the token information