Documentation ¶
Index ¶
- func CreateWithAccessToken(ctx context.Context, tokenStorage *TokenStore, info oauth2.TokenInfo, ...) (err error)
- func CreateWithAuthorizationCode(ctx context.Context, tokenStorage *TokenStore, info oauth2.TokenInfo, ...) (err error)
- func CreateWithRefreshToken(ctx context.Context, tokenStorage *TokenStore, info oauth2.TokenInfo) (err error)
- func NewClientStore(config *Config) (store oauth2.ClientStore)
- func NewTokenStore(config *Config) (store oauth2.TokenStore)
- type ClientData
- func (cd ClientData) GetDomain() string
- func (cd ClientData) GetID() string
- func (cd ClientData) GetSecret() string
- func (cd ClientData) GetUserID() string
- func (cd *ClientData) SetDomain(v string)
- func (cd *ClientData) SetID(v string)
- func (cd *ClientData) SetSecret(v string)
- func (cd *ClientData) SetUserID(v string)
- type ClientStore
- type Config
- func NewClientStoreConfig(region string, endpoint string, access_key string, secret string, ...) (config *Config, err error)
- func NewConfig(region string, endpoint string, access_key string, secret string, ...) (config *Config, err error)
- func NewTokenStoreConfig(region string, endpoint string, access_key string, secret string, ...) (config *Config, err error)
- type TableClientStoreConfig
- type TableTokenStoreConfig
- type TokenStore
- func (tokenStorage *TokenStore) Create(ctx context.Context, info oauth2.TokenInfo) (err error)
- func (tokenStorage *TokenStore) GetByAccess(ctx context.Context, access string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStore) GetByCode(ctx context.Context, code string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStore) GetByRefresh(ctx context.Context, refresh string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *TokenStore) RemoveByAccess(ctx context.Context, access string) (err error)
- func (tokenStorage *TokenStore) RemoveByCode(ctx context.Context, code string) (err error)
- func (tokenStorage *TokenStore) RemoveByRefresh(ctx context.Context, refresh string) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWithAccessToken ¶
func CreateWithAccessToken(ctx context.Context, tokenStorage *TokenStore, info oauth2.TokenInfo, id string) (err error)
func CreateWithAuthorizationCode ¶
func CreateWithAuthorizationCode(ctx context.Context, tokenStorage *TokenStore, info oauth2.TokenInfo, id string) (err error)
func CreateWithRefreshToken ¶
func CreateWithRefreshToken(ctx context.Context, tokenStorage *TokenStore, info oauth2.TokenInfo) (err error)
func NewClientStore ¶
func NewClientStore(config *Config) (store oauth2.ClientStore)
func NewTokenStore ¶
func NewTokenStore(config *Config) (store oauth2.TokenStore)
Types ¶
type ClientData ¶
func (ClientData) GetDomain ¶
func (cd ClientData) GetDomain() string
func (ClientData) GetID ¶
func (cd ClientData) GetID() string
func (ClientData) GetSecret ¶
func (cd ClientData) GetSecret() string
func (ClientData) GetUserID ¶
func (cd ClientData) GetUserID() string
func (*ClientData) SetDomain ¶
func (cd *ClientData) SetDomain(v string)
func (*ClientData) SetID ¶
func (cd *ClientData) SetID(v string)
func (*ClientData) SetSecret ¶
func (cd *ClientData) SetSecret(v string)
func (*ClientData) SetUserID ¶
func (cd *ClientData) SetUserID(v string)
type ClientStore ¶
type ClientStore struct {
// contains filtered or unexported fields
}
type Config ¶
type Config struct { SESSION *session.Session TokenTable *TableTokenStoreConfig ClientTable *TableClientStoreConfig ENDPOINT string }
Config dynamodb configuration parameters
func NewClientStoreConfig ¶
func NewClientStoreConfig(region string, endpoint string, access_key string, secret string, client_table_name string) (config *Config, err error)
NewClientStoreConfig create dynamodb configuration
type TableClientStoreConfig ¶
type TableClientStoreConfig struct {
ClientCname string
}
type TableTokenStoreConfig ¶
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
func (*TokenStore) Create ¶
func (tokenStorage *TokenStore) Create(ctx context.Context, info oauth2.TokenInfo) (err error)
Create and store the new token information
func (*TokenStore) GetByAccess ¶
func (tokenStorage *TokenStore) GetByAccess(ctx context.Context, access string) (to oauth2.TokenInfo, err error)
GetByAccess use the access token for token information data
func (*TokenStore) GetByCode ¶
func (tokenStorage *TokenStore) GetByCode(ctx context.Context, code string) (to oauth2.TokenInfo, err error)
GetByCode use the authorization code for token information data
func (*TokenStore) GetByRefresh ¶
func (tokenStorage *TokenStore) GetByRefresh(ctx context.Context, refresh string) (to oauth2.TokenInfo, err error)
GetByRefresh use the refresh token for token information data
func (*TokenStore) RemoveByAccess ¶
func (tokenStorage *TokenStore) RemoveByAccess(ctx context.Context, access string) (err error)
RemoveByAccess use the access token to delete the token information
func (*TokenStore) RemoveByCode ¶
func (tokenStorage *TokenStore) RemoveByCode(ctx context.Context, code string) (err error)
RemoveByCode use the authorization code to delete the token information
func (*TokenStore) RemoveByRefresh ¶
func (tokenStorage *TokenStore) RemoveByRefresh(ctx context.Context, refresh string) (err error)
RemoveByRefresh use the refresh token to delete the token information
Click to show internal directories.
Click to hide internal directories.