omniauth-facebook-access-token 0.1.0 → 0.1.1
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/.gitignore
CHANGED
@@ -64,7 +64,7 @@ module OmniAuth
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def client
|
67
|
-
::OAuth2::Client.new(options.client_id, options.client_secret, options.client_options)
|
67
|
+
::OAuth2::Client.new(options.client_id, options.client_secret, deep_symbolize(options.client_options))
|
68
68
|
end
|
69
69
|
|
70
70
|
def request_phase
|
@@ -95,7 +95,7 @@ module OmniAuth
|
|
95
95
|
self.env['omniauth.auth'] = hash
|
96
96
|
call_app!
|
97
97
|
|
98
|
-
rescue ::OAuth2::Error
|
98
|
+
rescue ::OAuth2::Error => e
|
99
99
|
fail!(:invalid_credentials, e)
|
100
100
|
rescue ::MultiJson::DecodeError => e
|
101
101
|
fail!(:invalid_response, e)
|
@@ -107,6 +107,13 @@ module OmniAuth
|
|
107
107
|
|
108
108
|
protected
|
109
109
|
|
110
|
+
def deep_symbolize(hash)
|
111
|
+
hash.inject({}) do |h, (k,v)|
|
112
|
+
h[k.to_sym] = v.is_a?(Hash) ? deep_symbolize(v) : v
|
113
|
+
h
|
114
|
+
end
|
115
|
+
end
|
116
|
+
|
110
117
|
def build_access_token
|
111
118
|
::OAuth2::AccessToken.from_hash(
|
112
119
|
client,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-facebook-access-token
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,12 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-12-14 00:00:00.000000000 +02:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: omniauth
|
17
|
-
requirement: &
|
17
|
+
requirement: &18775500 !ruby/object:Gem::Requirement
|
18
18
|
none: false
|
19
19
|
requirements:
|
20
20
|
- - ~>
|
@@ -22,10 +22,10 @@ dependencies:
|
|
22
22
|
version: '1.0'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
|
-
version_requirements: *
|
25
|
+
version_requirements: *18775500
|
26
26
|
- !ruby/object:Gem::Dependency
|
27
27
|
name: oauth2
|
28
|
-
requirement: &
|
28
|
+
requirement: &18774920 !ruby/object:Gem::Requirement
|
29
29
|
none: false
|
30
30
|
requirements:
|
31
31
|
- - ~>
|
@@ -33,7 +33,7 @@ dependencies:
|
|
33
33
|
version: 0.8.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
|
-
version_requirements: *
|
36
|
+
version_requirements: *18774920
|
37
37
|
description: ! 'A Facebook using access-token strategy for OmniAuth. Can be used for
|
38
38
|
client side Facebook login. '
|
39
39
|
email:
|