omniauth-linkedin-jsapi 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/omniauth/strategies/linkedin.rb +21 -0
- data/lib/omniauth-linkedin-jsapi/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZTJhNTcwZTE1ZmJiNzViZGQ4ODcyNGYyNjUxMDAyZTc0MjFiNzM5NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDQwMzg0MjI1NWExMmUzOWMwZGY0NzM2ZDZjMGYxN2ZjNmYwNDk4NQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGExYzQ3ZGQzMmY2YjNlYjgxM2Y2ZjdjZjVmYzAwYThkMDFhM2RjZDJkY2Mz
|
10
|
+
ZGRiYTk5NWFmMDRmZmQzZjNkNTRlMjBjMDFjNzFlZmFiMjExMDRmMDA0ZjAz
|
11
|
+
NDBjZWM5ZjQ3NjA2OTMzY2Q5ZjY5MDg4ZjRhN2I4ZDM5ODdhNWQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
M2RjMmY1YTU2ODE4ZTljNjlkNjBiZTc0MDAxYTJjOTkxOTk1NDE1M2NkMzJl
|
14
|
+
MmE2YjVhNjFhNTFlMWJlZDIyNDFlMzdlZWM0MDIyZjUzN2Y1NDQ0MmI2MGMw
|
15
|
+
YjdkZDAxNTJmMzY4ZDAyZDk4NTJhNDdjMjgxY2JhMzRiY2IyNzE=
|
@@ -48,6 +48,13 @@ module OmniAuth
|
|
48
48
|
}
|
49
49
|
end
|
50
50
|
|
51
|
+
credentials do
|
52
|
+
{
|
53
|
+
:token => access_token.token,
|
54
|
+
:secret => access_token.secret
|
55
|
+
}
|
56
|
+
end
|
57
|
+
|
51
58
|
extra do
|
52
59
|
{ 'raw_info' => raw_info }
|
53
60
|
end
|
@@ -64,6 +71,10 @@ module OmniAuth
|
|
64
71
|
url << "&" unless url.match(/[\&\?]$/)
|
65
72
|
url << Rack::Utils.build_query(request.params)
|
66
73
|
redirect url
|
74
|
+
rescue ::Timeout::Error => e
|
75
|
+
fail!(:timeout, e)
|
76
|
+
rescue ::Net::HTTPFatalError, ::OpenSSL::SSL::SSLError => e
|
77
|
+
fail!(:service_unavailable, e)
|
67
78
|
end
|
68
79
|
|
69
80
|
def callback_phase
|
@@ -75,6 +86,16 @@ module OmniAuth
|
|
75
86
|
else
|
76
87
|
raise NoSecureCookieError, 'must pass a `linkedin_oauth_XXX` cookie'
|
77
88
|
end
|
89
|
+
rescue ::Timeout::Error => e
|
90
|
+
fail!(:timeout, e)
|
91
|
+
rescue ::Net::HTTPFatalError, ::OpenSSL::SSL::SSLError => e
|
92
|
+
fail!(:service_unavailable, e)
|
93
|
+
rescue ::OAuth::Unauthorized => e
|
94
|
+
fail!(:invalid_credentials, e)
|
95
|
+
rescue ::MultiJson::DecodeError => e
|
96
|
+
fail!(:invalid_response, e)
|
97
|
+
rescue ::OmniAuth::NoSessionError => e
|
98
|
+
fail!(:session_expired, e)
|
78
99
|
end
|
79
100
|
|
80
101
|
def client
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-linkedin-jsapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Gong
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth
|