Documentation ¶
Index ¶
- func CreateWithAccessToken(tokenStorage *DynamoDbTokenStore, info oauth2.TokenInfo, id string) (err error)
- func CreateWithAuthorizationCode(tokenStorage *DynamoDbTokenStore, info oauth2.TokenInfo, id string) (err error)
- func CreateWithRefreshToken(tokenStorage *DynamoDbTokenStore, info oauth2.TokenInfo) (err error)
- func NewTokenStore(config *Config) (store oauth2.TokenStore)
- type Config
- type DynamoDbTokenStore
- func (tokenStorage *DynamoDbTokenStore) Create(info oauth2.TokenInfo) (err error)
- func (tokenStorage *DynamoDbTokenStore) GetByAccess(access string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *DynamoDbTokenStore) GetByCode(code string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *DynamoDbTokenStore) GetByRefresh(refresh string) (to oauth2.TokenInfo, err error)
- func (tokenStorage *DynamoDbTokenStore) RemoveByAccess(access string) (err error)
- func (tokenStorage *DynamoDbTokenStore) RemoveByCode(code string) (err error)
- func (tokenStorage *DynamoDbTokenStore) RemoveByRefresh(refresh string) (err error)
- type TableConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateWithAccessToken ¶
func CreateWithAccessToken(tokenStorage *DynamoDbTokenStore, info oauth2.TokenInfo, id string) (err error)
func CreateWithAuthorizationCode ¶
func CreateWithAuthorizationCode(tokenStorage *DynamoDbTokenStore, info oauth2.TokenInfo, id string) (err error)
func CreateWithRefreshToken ¶
func CreateWithRefreshToken(tokenStorage *DynamoDbTokenStore, info oauth2.TokenInfo) (err error)
func NewTokenStore ¶
func NewTokenStore(config *Config) (store oauth2.TokenStore)
NewTokenStore returns an gopkg.in/oauth2.v3/store compatible wrapper
Types ¶
type Config ¶
type Config struct { SESSION *session.Session TABLE *TableConfig }
Config dynamodb configuration parameters
type DynamoDbTokenStore ¶
type DynamoDbTokenStore struct {
// contains filtered or unexported fields
}
DynamoDbTokenStore is our implementation of oauth2.TokenStore
func (*DynamoDbTokenStore) Create ¶
func (tokenStorage *DynamoDbTokenStore) Create(info oauth2.TokenInfo) (err error)
Create and store the new token information
func (*DynamoDbTokenStore) GetByAccess ¶
func (tokenStorage *DynamoDbTokenStore) GetByAccess(access string) (to oauth2.TokenInfo, err error)
GetByAccess use the access token for token information data
func (*DynamoDbTokenStore) GetByCode ¶
func (tokenStorage *DynamoDbTokenStore) GetByCode(code string) (to oauth2.TokenInfo, err error)
GetByCode use the authorization code for token information data
func (*DynamoDbTokenStore) GetByRefresh ¶
func (tokenStorage *DynamoDbTokenStore) GetByRefresh(refresh string) (to oauth2.TokenInfo, err error)
GetByRefresh use the refresh token for token information data
func (*DynamoDbTokenStore) RemoveByAccess ¶
func (tokenStorage *DynamoDbTokenStore) RemoveByAccess(access string) (err error)
RemoveByAccess use the access token to delete the token information
func (*DynamoDbTokenStore) RemoveByCode ¶
func (tokenStorage *DynamoDbTokenStore) RemoveByCode(code string) (err error)
RemoveByCode use the authorization code to delete the token information
func (*DynamoDbTokenStore) RemoveByRefresh ¶
func (tokenStorage *DynamoDbTokenStore) RemoveByRefresh(refresh string) (err error)
RemoveByRefresh use the refresh token to delete the token information
type TableConfig ¶
TableConfig internally stores the table names to use for dynamodb