Documentation ¶
Index ¶
- type MailUser
- type MailUserRequest
- type TokenRequest
- type TokenServerAPI
- type TokenStore
- func (c *TokenStore) CheckSSOError(characterID int32, tokenCharacterID int32, in error) bool
- func (c *TokenStore) GetToken(characterID int32, tokenCharacterID int32) (*oauth2.Token, error)
- func (c *TokenStore) GetTokenSource(characterID int32, tokenCharacterID int32) (oauth2.TokenSource, error)
- func (c *TokenStore) SetToken(characterID int32, tokenCharacterID int32, token *oauth2.Token) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MailUserRequest ¶
type TokenRequest ¶
type TokenServerAPI ¶
type TokenServerAPI struct {
// contains filtered or unexported fields
}
func NewTokenServerAPI ¶
func NewTokenServerAPI() (*TokenServerAPI, error)
func NewTokenServerInternalAPI ¶
func NewTokenServerInternalAPI() (*TokenServerAPI, error)
func (*TokenServerAPI) GetMailUser ¶
func (s *TokenServerAPI) GetMailUser(characterID int32, password string) (*MailUser, error)
type TokenStore ¶
type TokenStore struct {
// contains filtered or unexported fields
}
TokenStore provides storage and caching of OAuth2 Tokens
func NewTokenStore ¶
func NewTokenStore(redis *redis.Pool, db *sqlx.DB, auth *goesi.SSOAuthenticator) *TokenStore
NewTokenStore provides mechinism for caching and storing SSO Tokens If a refresh token changes, do remember to invalidate the cache
func (*TokenStore) CheckSSOError ¶
func (c *TokenStore) CheckSSOError(characterID int32, tokenCharacterID int32, in error) bool
CheckSSOError determines if the error was an oauth2 error, and updates the character in the database
func (*TokenStore) GetTokenSource ¶
func (c *TokenStore) GetTokenSource(characterID int32, tokenCharacterID int32) (oauth2.TokenSource, error)
GetTokenSource retreives a token from storage and returns a token source
Click to show internal directories.
Click to hide internal directories.