omniauth-google-oauth2 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59c5cab2538c0fe1a8517e7c736c5bb654d9dbf1
|
4
|
+
data.tar.gz: 715e4b33d3e2591d632c2396034c7127575d3f44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80bb3af61b19376497e96b76750990e0e794259f2bd4d50f77d5bc6568f0265c3c501631afdeebd278f5062e6c7f1e63c07ac12196d176a6c92d9e179e03db96
|
7
|
+
data.tar.gz: 8d0bc3f12645bebe0547fdde67637b3d53eda190061673b91df3be447c21b864bdb52b36e596a61a7af5df70e2321ab64d6a6a48d4767e038fa31406d1b19a7b
|
data/CHANGELOG.md
CHANGED
@@ -1,7 +1,21 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
|
4
|
-
## 0.2.
|
4
|
+
## 0.2.8 - 2015-10-01
|
5
|
+
|
6
|
+
### Added
|
7
|
+
- Added skip_jwt option to bypass JWT decoding in case you get decoding errors.
|
8
|
+
|
9
|
+
### Deprecated
|
10
|
+
- Nothing.
|
11
|
+
|
12
|
+
### Removed
|
13
|
+
- Nothing.
|
14
|
+
|
15
|
+
### Fixed
|
16
|
+
- Resolved JWT::InvalidIatError. https://github.com/zquestz/omniauth-google-oauth2/issues/195
|
17
|
+
|
18
|
+
## 0.2.7 - 2015-09-25
|
5
19
|
|
6
20
|
### Added
|
7
21
|
- Now strips out the 'sz' parameter from profile image urls.
|
@@ -11,11 +11,9 @@ module OmniAuth
|
|
11
11
|
DEFAULT_SCOPE = "email,profile"
|
12
12
|
|
13
13
|
option :name, 'google_oauth2'
|
14
|
-
|
15
14
|
option :skip_friends, true
|
16
|
-
|
17
15
|
option :skip_image_info, true
|
18
|
-
|
16
|
+
option :skip_jwt, false
|
19
17
|
option :authorize_options, [:access_type, :hd, :login_hint, :prompt, :request_visible_actions, :scope, :state, :redirect_uri, :include_granted_scopes, :openid_realm]
|
20
18
|
|
21
19
|
option :client_options, {
|
@@ -59,7 +57,7 @@ module OmniAuth
|
|
59
57
|
extra do
|
60
58
|
hash = {}
|
61
59
|
hash[:id_token] = access_token['id_token']
|
62
|
-
if !access_token['id_token'].nil?
|
60
|
+
if !options[:skip_jwt] && !access_token['id_token'].nil?
|
63
61
|
hash[:id_info] = JWT.decode(
|
64
62
|
access_token['id_token'], nil, false, {
|
65
63
|
:verify_iss => true,
|
@@ -293,7 +293,17 @@ describe OmniAuth::Strategies::GoogleOauth2 do
|
|
293
293
|
expect(subject.extra).to include(:id_token => id_token)
|
294
294
|
end
|
295
295
|
|
296
|
-
it 'should include id_info when id_token set on the access_token' do
|
296
|
+
it 'should include id_info when id_token is set on the access_token and skip_jwt is false' do
|
297
|
+
subject.options[:skip_jwt] = false
|
298
|
+
expect(subject.extra).to include(:id_info => token_info)
|
299
|
+
end
|
300
|
+
|
301
|
+
it 'should not include id_info when id_token is set on the access_token and skip_jwt is true' do
|
302
|
+
subject.options[:skip_jwt] = true
|
303
|
+
expect(subject.extra).not_to have_key(:id_info)
|
304
|
+
end
|
305
|
+
|
306
|
+
it 'should include id_info when id_token is set on the access_token by default' do
|
297
307
|
expect(subject.extra).to include(:id_info => token_info)
|
298
308
|
end
|
299
309
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-google-oauth2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Ellithorpe
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-10-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|