oauth2-client 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/Gemfile.lock +1 -1
- data/README.md +12 -6
- data/lib/oauth2/version.rb +1 -1
- data/spec/examples/google_client_spec.rb +3 -3
- metadata +1 -1
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# OAuth2 Ruby
|
1
|
+
# OAuth2 Client Ruby
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/oauth2-client.png)][gem]
|
4
4
|
[![Build Status](https://secure.travis-ci.org/tiabas/oauth2-client.png?branch=master)][travis]
|
@@ -10,11 +10,17 @@
|
|
10
10
|
[gemnasium]: https://gemnasium.com/tiabas/oauth2-client
|
11
11
|
[coveralls]: https://coveralls.io/r/tiabas/oauth2-client
|
12
12
|
|
13
|
-
A Ruby wrapper
|
14
|
-
|
15
|
-
[RFC]( http://tools.ietf.org/html/rfc6749).
|
16
|
-
|
17
|
-
|
13
|
+
A Ruby wrapper based on the OAuth 2.0 specification for build oauth2 clients. It is designed with the philosophy that
|
14
|
+
many oauth2 providers implement OAuth 2.0 differently and not exactly according to the
|
15
|
+
[RFC]( http://tools.ietf.org/html/rfc6749). With this gem, a developer has some degree of flexibilty in creating a
|
16
|
+
client that will work with different OAuth2 providers. This flexibilty comes at the same price of having to implement
|
17
|
+
a few things yourself. To that effect, an access token response is returned as an HTTPResponse from which the response
|
18
|
+
body can be extracted. It turns out that not every oauth2 providers returns tokens in the same format. Therefore, rather
|
19
|
+
than make assumptions about the token response, this gem leaves that responsiblity to the developer.
|
20
|
+
|
21
|
+
Bundled with the gem are working sample clients for Google, Yammer and Github. The structure of the clients is easy to
|
22
|
+
follow thus making it possible to simply copy code from one client and simply substitute the rights credentials and request
|
23
|
+
URL paths.
|
18
24
|
|
19
25
|
For more about the standard checkout: http://tools.ietf.org/html/rfc6749
|
20
26
|
|
data/lib/oauth2/version.rb
CHANGED
@@ -2,7 +2,7 @@ module OAuth2
|
|
2
2
|
class Version
|
3
3
|
MAJOR = 1 unless defined? OAuth2::Version::MAJOR
|
4
4
|
MINOR = 1 unless defined? OAuth2::Version::MINOR
|
5
|
-
PATCH =
|
5
|
+
PATCH = 2 unless defined? OAuth2::Version::PATCH
|
6
6
|
|
7
7
|
def self.to_s
|
8
8
|
[MAJOR, MINOR, PATCH].compact.join('.')
|
@@ -141,7 +141,7 @@ describe GoogleClient do
|
|
141
141
|
},
|
142
142
|
:headers => {
|
143
143
|
'Accept' => 'application/json',
|
144
|
-
'User-Agent' =>
|
144
|
+
'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
|
145
145
|
'Content-Type' => 'application/x-www-form-urlencoded'
|
146
146
|
}
|
147
147
|
)
|
@@ -162,7 +162,7 @@ describe GoogleClient do
|
|
162
162
|
},
|
163
163
|
:headers => {
|
164
164
|
'Accept' => 'application/json',
|
165
|
-
'User-Agent' =>
|
165
|
+
'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
|
166
166
|
'Content-Type' => 'application/x-www-form-urlencoded'
|
167
167
|
}
|
168
168
|
)
|
@@ -184,7 +184,7 @@ describe GoogleClient do
|
|
184
184
|
},
|
185
185
|
:headers => {
|
186
186
|
'Accept' => 'application/json',
|
187
|
-
'User-Agent' =>
|
187
|
+
'User-Agent' => "OAuth2 Ruby Gem #{OAuth2::Version}",
|
188
188
|
'Content-Type' => 'application/x-www-form-urlencoded'
|
189
189
|
}
|
190
190
|
)
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|