Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { // HTTP client used to communicate with the authorization // server. If nil, DefaultClient is used. Client *http.Client // A Signer signs messages to create signed OAuth1 Requests. // If nil, the HMAC signing algorithm is used. Signer Signer // A value used by the Consumer to identify itself // to the Service Provider. ConsumerKey string // A secret used by the Consumer to establish // ownership of the Consumer Key. ConsumerSecret string // An absolute URL to which the Service Provider will redirect // the User back when the Obtaining User Authorization step // is completed. // // If the Consumer is unable to receive callbacks or a callback // URL has been established via other means, the parameter // value MUST be set to oob (case sensitive), to indicate // an out-of-band configuration. CallbackURL string // The URL used to obtain an unauthorized // Request Token. RequestTokenURL string // The URL used to obtain User authorization // for Consumer access. AccessTokenURL string // The URL used to exchange the User-authorized // Request Token for an Access Token. AuthorizationURL string }
Config stores the application configuration.
type HMACSigner ¶
type HMACSigner struct {
ConsumerSecret string
}
HMACSigner signs messages with an HMAC SHA1 digest, using the concatenated consumer secret and token secret as the key.
type RSASigner ¶
type RSASigner struct {
PrivateKey *rsa.PrivateKey
}
RSASigner RSA PKCS1-v1_5 signs SHA1 digests of messages using the given RSA private key.
Click to show internal directories.
Click to hide internal directories.