Documentation
¶
Index ¶
- type Config
- func (c *Config) GetAuthorizationUrl() string
- func (c *Config) GetToken(vars url.Values) (interface{}, error)
- func (c *Config) GetUserInfo(tokenSource interface{}) (map[string]interface{}, error)
- func (c *Config) SetAdditionalScope(scopes []string) *Config
- func (c *Config) SetApplicationKey(applicationKey string) *Config
- func (c *Config) SetCredentials(clientId, clientSecret string) *Config
- func (c *Config) SetRedirectUrl(xhost string) *Config
- func (c *Config) SetState(state string) *Config
- func (c *Config) SetTokenAuthType(authType string) *Config
- type SocialDriver
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { ClientID string ClientSecret string ApplicationKey string State string RedirectURI string // contains filtered or unexported fields }
func Driver ¶
func Driver(d *SocialDriver) *Config
func (*Config) GetAuthorizationUrl ¶
func (*Config) GetUserInfo ¶
func (*Config) SetAdditionalScope ¶
func (*Config) SetApplicationKey ¶
func (*Config) SetCredentials ¶
func (*Config) SetRedirectUrl ¶
func (*Config) SetTokenAuthType ¶
type SocialDriver ¶
type SocialDriver struct { Name *string `bson:"Name"` OAuthVersion string `bson:"OAuthVersion` Scope []string `bson:"Scope"` AuthExtras map[string]string `bson:"AuthExtras` RequestTokenEndpoint *string `bson:"RequestTokenEndpoint` AuthorizationEndpoint *string `bson:"AuthorizationEndpoint` AuthorizationExtra map[string]string `bson:"AuthorizationExtra` TokenEndpoint *string `bson:"TokenEndpoint` TokenAuthType *string `bson:"TokenAuthType` TokenExtraQueryString map[string]string `bson:"TokenExtraQueryString` UserInfoMethod *string `bson:"UserInfoMethod` UserInfoEndpoint string `bson:"UserInfoEndpoint` UserInfoQueryString map[string]string `bson:"UserInfoQueryString` UserInfoHeader map[string]string `bson:"UserInfoHeader` UserInfoPayload map[string]string `bson:"UserInfoPayload` UserInfoExtraMethod *string `bson:"UserInfoExtraMethod` UserInfoExtraEndpoint *string `bson:"UserInfoExtraEndpoint` UserInfoExtraQueryString map[string]string `bson:"UserInfoExtraQueryString` UserInfoExtraHeader map[string]string `bson:"UserInfoExtraHeader` UserInfoExtraPayload map[string]string `bson:"UserInfoExtraPayload` Mapping map[string]string `bson:"Mapping` }
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
oauth2
Package oauth2 provides support for making OAuth2 authorized and authenticated HTTP requests, as specified in RFC 6749.
|
Package oauth2 provides support for making OAuth2 authorized and authenticated HTTP requests, as specified in RFC 6749. |
oauth2/clientcredentials
Package clientcredentials implements the OAuth2.0 "client credentials" token flow, also known as the "two-legged OAuth 2.0".
|
Package clientcredentials implements the OAuth2.0 "client credentials" token flow, also known as the "two-legged OAuth 2.0". |
oauth2/endpoints
Package endpoints provides constants for using OAuth2 to access various services.
|
Package endpoints provides constants for using OAuth2 to access various services. |
oauth2/jws
Package jws provides a partial implementation of JSON Web Signature encoding and decoding.
|
Package jws provides a partial implementation of JSON Web Signature encoding and decoding. |
oauth2/jwt
Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly known as "two-legged OAuth 2.0".
|
Package jwt implements the OAuth 2.0 JSON Web Token flow, commonly known as "two-legged OAuth 2.0". |
Click to show internal directories.
Click to hide internal directories.