You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+38-9Lines changed: 38 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -153,6 +153,20 @@ This is a ruby library which is intended to be used in creating Ruby Consumer
153
153
and Service Provider applications. It is NOT a Rails plugin, but could easily
154
154
be used for the foundation for such a Rails plugin.
155
155
156
+
The main client entry point is `OAuth::Consumer.new(consumer_key, consumer_secret, options)`.
157
+
Common options include:
158
+
159
+
-`:site` - Provider origin, for example `https://provider.example`.
160
+
-`:request_token_path`, `:authorize_path`, `:authenticate_path`, `:access_token_path` - Provider endpoint paths. Defaults are `/oauth/request_token`, `/oauth/authorize`, `/oauth/authenticate`, and `/oauth/access_token`.
161
+
-`:request_token_url`, `:authorize_url`, `:access_token_url` - Full endpoint URLs. Use these when endpoints are not all under the same `:site` origin.
162
+
-`:scheme` - Where OAuth parameters are sent: `:header` by default, or `:body` / `:query_string`.
163
+
-`:http_method` - HTTP method for token endpoint requests, `:post` by default.
164
+
-`:signature_method` - Signature method, `HMAC-SHA1` by default.
165
+
-`:body_hash_enabled` - Whether request body hashes are signed where applicable. Defaults to `true`.
166
+
-`:ca_file`, `:proxy`, `:debug_output` - Net::HTTP transport options.
167
+
-`:token_request_max_redirects` - Maximum redirects followed while requesting OAuth tokens. Defaults to `10`.
168
+
-`:token_request_cross_origin_redirects` - Whether token requests may follow redirects to a different scheme, host, or effective port. Defaults to `false`; only enable this when the provider's token endpoints intentionally redirect across origins.
169
+
156
170
This gem was originally extracted from @pelle's [oauth-plugin](https://github.com/pelle/oauth-plugin)
157
171
gem. After extraction that gem was made to depend on this gem.
158
172
@@ -168,8 +182,10 @@ into a separate gem with the 1.x minor updates of this gem.
168
182
169
183
### Examples
170
184
171
-
We need to specify the `oauth_callback` url explicitly, otherwise it defaults to
172
-
"oob" (Out of Band)
185
+
For browser-based three-legged OAuth 1.0a flows, pass an explicit
186
+
`oauth_callback` URL when requesting the request token. If you do not pass
187
+
`oauth_callback`, this gem defaults it to `"oob"` (out of band), which is
0 commit comments