omniauth-fishbrain 0.11.1 → 0.11.2

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
  SHA256:
3
- metadata.gz: 3ee5230c915680459d90c59d2fdb65d1d8900d0879e5cda34059ed7259d34244
4
- data.tar.gz: d268e988af107e07224a227c946208a576a7a27dc3a01f62fd8ba046e70c103c
3
+ metadata.gz: bedfbaf6891f13e4fde627ca255cd69bd2fd662a68fcc0bdc929a81886cd33f6
4
+ data.tar.gz: c92b9f4458eda83cd28c7b30dbff8c59576584a9ec159963a9d9ea04b23a4a37
5
5
  SHA512:
6
- metadata.gz: 6f4e8d0306c776cfbcbc2f6c279a5688b7d9a1c233b1ea007234290791214e7cc55b75a3c8077fb002dc4d3ea1afc015a146781915d6a13663c75cedbb9e84fc
7
- data.tar.gz: dd4bc83c8dea35def62c26348c3f072572e4489fa50ccf8fbcbab30adb91859c4dc7bc28be4786b7a142415cb60ae4c826c18b49a6697648a238ed1b207a0be0
6
+ metadata.gz: 2a61f6e3c4a649bb40e03b992335191e742bd760f5a372f72711ed09ac58da1fa53116424e9f3ed75a869de4bb1210ea1a5f97626f14c4107ec62c5c0e41bc7c
7
+ data.tar.gz: bb2cfe13d12b9706b18739dfd967f63f770a68228bb12148285a26173383bd132660668d4fdd94ac9a3a6ec9daf25701a2cedbda30681f75730a79f2d30edf6a
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniAuth
4
4
  module Fishbrain
5
- VERSION = '0.11.1'
5
+ VERSION = '0.11.2'
6
6
  end
7
7
  end
@@ -7,11 +7,11 @@ module OmniAuth
7
7
  module Fishbrain
8
8
  module VerifiesIdToken
9
9
  def id_token
10
- @_id_token ||= begin
11
- return {} unless raw_id_token
12
-
13
- JWT.decode(raw_id_token, nil, true, decode_options).first
14
- end
10
+ @_id_token ||= if raw_id_token&.strip&.empty?
11
+ {}
12
+ else
13
+ JWT.decode(raw_id_token, nil, true, decode_options).first
14
+ end
15
15
  end
16
16
 
17
17
  def decode_options
@@ -37,11 +37,10 @@ module OmniAuth
37
37
  end
38
38
 
39
39
  def callback_phase
40
- if raw_id_token
41
- id_token
42
- super
43
- else
40
+ if id_token.empty?
44
41
  fail! :missing_id_token
42
+ else
43
+ super
45
44
  end
46
45
  rescue JWT::ExpiredSignature
47
46
  fail! :invalid_id_token
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-fishbrain
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.1
4
+ version: 0.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Dalen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-03-27 00:00:00.000000000 Z
12
+ date: 2020-04-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jwt
@@ -74,8 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
- rubyforge_project:
78
- rubygems_version: 2.7.6
77
+ rubygems_version: 3.1.2
79
78
  signing_key:
80
79
  specification_version: 4
81
80
  summary: OmniAuth strategy for Fishbrain