fb_graph 1.5.4 → 1.5.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/fb_graph.gemspec +2 -2
- data/lib/fb_graph/auth.rb +9 -0
- data/lib/fb_graph/auth/signed_request.rb +2 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.5.
|
1
|
+
1.5.5
|
data/fb_graph.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{fb_graph}
|
8
|
-
s.version = "1.5.
|
8
|
+
s.version = "1.5.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["nov matake"]
|
12
|
-
s.date = %q{2011-03-
|
12
|
+
s.date = %q{2011-03-19}
|
13
13
|
s.description = %q{A full-stack Facebook Graph API wrapper in Ruby.}
|
14
14
|
s.email = %q{nov@matake.jp}
|
15
15
|
s.extra_rdoc_files = [
|
data/lib/fb_graph/auth.rb
CHANGED
@@ -34,6 +34,15 @@ module FbGraph
|
|
34
34
|
self.access_token.present?
|
35
35
|
end
|
36
36
|
|
37
|
+
def authorize_uri(canvas_uri)
|
38
|
+
endpoint = URI.parse SignedRequest::OAUTH_DIALOG_ENDPOINT
|
39
|
+
endpoint.query = {
|
40
|
+
:client_id => self.client.id,
|
41
|
+
:redirect_uri => canvas_uri
|
42
|
+
}.to_query
|
43
|
+
endpoint.to_s
|
44
|
+
end
|
45
|
+
|
37
46
|
def from_cookie(cookie)
|
38
47
|
data = Cookie.parse(self.client, cookie)
|
39
48
|
self.access_token = build_access_token(data)
|
@@ -4,6 +4,8 @@ require 'openssl'
|
|
4
4
|
module FbGraph
|
5
5
|
class Auth
|
6
6
|
class SignedRequest
|
7
|
+
OAUTH_DIALOG_ENDPOINT = 'https://www.facebook.com/dialog/oauth'
|
8
|
+
|
7
9
|
def self.verify(client, signed_request)
|
8
10
|
signature, payload = signed_request.split('.')
|
9
11
|
raise VerificationFailed.new(401, 'No Signature') if signature.blank?
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fb_graph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 1.5.
|
9
|
+
- 5
|
10
|
+
version: 1.5.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- nov matake
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-19 00:00:00 +09:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|