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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NTg1Y2E1NThmN2FhOWYzMTJiYzEzOTM3NzUwN2Y0NjJmMjU0MGZjMA==
4
+ ZTJhNTcwZTE1ZmJiNzViZGQ4ODcyNGYyNjUxMDAyZTc0MjFiNzM5NQ==
5
5
  data.tar.gz: !binary |-
6
- MmE5OTdmMmNhNjQ5ZjZjMjA2YTYwODI0MjI3YmYwNzcwZjg1MTljMA==
6
+ MDQwMzg0MjI1NWExMmUzOWMwZGY0NzM2ZDZjMGYxN2ZjNmYwNDk4NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NmI4ZmZlMTFhMzllNzgyNjAxNmI2MDYyYjE1MzAyNDU4MDM3NmZiMzdhMTA4
10
- Y2U4YjljNTc0NmIzM2IwYWI0MmI3NGM1MGI4OWU4MTdmMWIwM2EzYWI2NjE2
11
- YTY5NTE5MzA0YTY1MzZlOGY2NTM5YWMyMzliMDFiMDkwN2Q5MTI=
9
+ OGExYzQ3ZGQzMmY2YjNlYjgxM2Y2ZjdjZjVmYzAwYThkMDFhM2RjZDJkY2Mz
10
+ ZGRiYTk5NWFmMDRmZmQzZjNkNTRlMjBjMDFjNzFlZmFiMjExMDRmMDA0ZjAz
11
+ NDBjZWM5ZjQ3NjA2OTMzY2Q5ZjY5MDg4ZjRhN2I4ZDM5ODdhNWQ=
12
12
  data.tar.gz: !binary |-
13
- OWM4ODdjYjc3YTdhMWJmOGMyNTcwOWNlOGM0YmQ3NWFiMzNiMTcyM2Q1MTZj
14
- ZmQ4ODBjZjhkMWFmYTRkMTM4YWQ0Yzc0MDZlODJjZThjNjIxM2JkN2VmYWQ3
15
- MjQ3N2ZkOGU5ZjQ1YTRjMTdmOWFjMDRlOTZhMDUwMWM0N2RiNDQ=
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
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module LinkedInJsapi
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.1"
4
4
  end
5
5
  end
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.0
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-21 00:00:00.000000000 Z
11
+ date: 2013-12-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth