oauth2 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +3 -7
- data/VERSION +1 -1
- data/oauth2.gemspec +67 -0
- metadata +3 -2
data/README.rdoc
CHANGED
@@ -16,7 +16,7 @@ Below is a fully functional example of a Sinatra application that would authenti
|
|
16
16
|
require 'json'
|
17
17
|
|
18
18
|
def client
|
19
|
-
OAuth2::Client.new('
|
19
|
+
OAuth2::Client.new('api_key', 'api_secret', :site => 'https://graph.facebook.com')
|
20
20
|
end
|
21
21
|
|
22
22
|
get '/auth/facebook' do
|
@@ -27,12 +27,8 @@ Below is a fully functional example of a Sinatra application that would authenti
|
|
27
27
|
end
|
28
28
|
|
29
29
|
get '/auth/facebook/callback' do
|
30
|
-
|
31
|
-
|
32
|
-
user = JSON.parse(access_token.get('/me'))
|
33
|
-
rescue OAuth2::ErrorWithResponse => e
|
34
|
-
raise e.response.body
|
35
|
-
end
|
30
|
+
access_token = client.web_server.access_token(params[:code], :redirect_uri => redirect_uri)
|
31
|
+
user = JSON.parse(access_token.get('/me'))
|
36
32
|
|
37
33
|
user.inspect
|
38
34
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/oauth2.gemspec
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{oauth2}
|
8
|
+
s.version = "0.0.2"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Michael Bleigh"]
|
12
|
+
s.date = %q{2010-04-22}
|
13
|
+
s.description = %q{A Ruby wrapper for the OAuth 2.0 protocol built with a similar style to the original OAuth gem.}
|
14
|
+
s.email = %q{michael@intridea.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.rdoc"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".gitignore",
|
22
|
+
"LICENSE",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/oauth2.rb",
|
27
|
+
"lib/oauth2/access_token.rb",
|
28
|
+
"lib/oauth2/client.rb",
|
29
|
+
"lib/oauth2/strategy/base.rb",
|
30
|
+
"lib/oauth2/strategy/web_server.rb",
|
31
|
+
"lib/oauth2/uri.rb",
|
32
|
+
"oauth2.gemspec",
|
33
|
+
"spec/oauth2/client_spec.rb",
|
34
|
+
"spec/oauth2/strategy/base_spec.rb",
|
35
|
+
"spec/oauth2/strategy/web_server_spec.rb",
|
36
|
+
"spec/oauth2/uri_spec.rb",
|
37
|
+
"spec/spec.opts",
|
38
|
+
"spec/spec_helper.rb",
|
39
|
+
"specs.watchr"
|
40
|
+
]
|
41
|
+
s.homepage = %q{http://github.com/intridea/oauth2}
|
42
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
43
|
+
s.require_paths = ["lib"]
|
44
|
+
s.rubygems_version = %q{1.3.6}
|
45
|
+
s.summary = %q{A Ruby wrapper for the OAuth 2.0 protocol.}
|
46
|
+
s.test_files = [
|
47
|
+
"spec/oauth2/client_spec.rb",
|
48
|
+
"spec/oauth2/strategy/base_spec.rb",
|
49
|
+
"spec/oauth2/strategy/web_server_spec.rb",
|
50
|
+
"spec/oauth2/uri_spec.rb",
|
51
|
+
"spec/spec_helper.rb"
|
52
|
+
]
|
53
|
+
|
54
|
+
if s.respond_to? :specification_version then
|
55
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
56
|
+
s.specification_version = 3
|
57
|
+
|
58
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
59
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
60
|
+
else
|
61
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
62
|
+
end
|
63
|
+
else
|
64
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 2
|
9
|
+
version: 0.0.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Michael Bleigh
|
@@ -53,6 +53,7 @@ files:
|
|
53
53
|
- lib/oauth2/strategy/base.rb
|
54
54
|
- lib/oauth2/strategy/web_server.rb
|
55
55
|
- lib/oauth2/uri.rb
|
56
|
+
- oauth2.gemspec
|
56
57
|
- spec/oauth2/client_spec.rb
|
57
58
|
- spec/oauth2/strategy/base_spec.rb
|
58
59
|
- spec/oauth2/strategy/web_server_spec.rb
|