Documentation ¶
Index ¶
- type Client
- type Config
- func (o *Config) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string
- func (o *Config) Exchange(code string) (*oauth2.Token, error)
- func (o *Config) ExchangeAppKeyForToken(appID, accessKey string) (*oauth2.Token, error)
- func (o *Config) ExchangeGatewayKeyForToken(gatewayID, gatewayKey string) (*oauth2.Token, error)
- func (o *Config) PasswordCredentialsToken(username, password string) (*oauth2.Token, error)
- func (o *Config) TokenSource(token *oauth2.Token) oauth2.TokenSource
- type OAuthError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
func OAuthWithCache ¶
OAuth creates a new 3-legged OAuth client that uses a cache to cache token exchanges
func (*Config) AuthCodeURL ¶
func (o *Config) AuthCodeURL(state string, opts ...oauth2.AuthCodeOption) string
AuthCodeURL returns a URL to OAuth 2.0 provider's consent page that asks for permissions for the required scopes explicitly.
func (*Config) ExchangeAppKeyForToken ¶
ExchangeAppKeyForToken exchanges an application Access Key for an equivalent
func (*Config) ExchangeGatewayKeyForToken ¶
ExchangeGatewayKeyForToken exchanges an application Access Key for an equivalent
func (*Config) PasswordCredentialsToken ¶
PasswordCredentialsToken gets an oauth2.Token from username and password
func (*Config) TokenSource ¶
func (o *Config) TokenSource(token *oauth2.Token) oauth2.TokenSource
TokenSource creates oauth2.TokenSource from an oauht2.Token
type OAuthError ¶
func (*OAuthError) Error ¶
func (e *OAuthError) Error() string
Click to show internal directories.
Click to hide internal directories.