omniauth-authentiq 0.3.2 → 0.3.3

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: 2b117b9262c9666c13fedbbd28ff288c21e9888a
4
- data.tar.gz: baa4362bbafbf62e43805aed41c17cdacbd9b671
3
+ metadata.gz: 6f174843e97885e59bad322608c5c0de9e1bc080
4
+ data.tar.gz: 5bd0a95d0d872a803b57c770890855a16c4c97c1
5
5
  SHA512:
6
- metadata.gz: 0e4a159d773c3004297f5d7d503657c551a3a619cd690514245aa9a1dec5cfae0436f1bb980989fb568f4936d8bcb16d9bb4a4b4830932edd9db80cd3f85afa3
7
- data.tar.gz: f8164120ac7556274a5e3f52fc7e7ca15733c1232154ef7a7097222bfa136650f56ef4db45f705a31684cb1a3f94519b11cab57a4c56726405f18d655d3a43ec
6
+ metadata.gz: '08184dcf38134b84789087afec1ee301c967a527c9fdef1b38290ca3a3f1d134c626595dc77e8434ae316de22aaa1cfc4dc3095b1372760294f3b9c8e9d3b992'
7
+ data.tar.gz: d6e58028fe537d983746691f35a99d91fa8d30023d53c400109c4503b0c7198c0fe71294976b934e74a8db839d55d84042543eed59cb17dc7ff0a83e858dd860
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Authentiq
3
- VERSION = "0.3.2"
3
+ VERSION = "0.3.3"
4
4
  end
5
5
  end
@@ -72,7 +72,10 @@ module OmniAuth
72
72
  end
73
73
 
74
74
  def decode_idtoken(idtoken)
75
- (JWT.decode idtoken, @options.client_secret, true, {
75
+ ::JWT.decode(
76
+ idtoken,
77
+ @options.client_secret,
78
+ true,
76
79
  algorithm: helpers.algorithm(@options),
77
80
  iss: @options.client_options.site,
78
81
  verify_iss: true,
@@ -82,7 +85,7 @@ module OmniAuth
82
85
  verify_jti: false,
83
86
  verify_sub: true,
84
87
  leeway: 60
85
- })[0]
88
+ ).first
86
89
  end
87
90
 
88
91
  def should_sign_out?
@@ -46,7 +46,10 @@ module OmniAuth
46
46
 
47
47
  def decode_logout_token(logout_token)
48
48
  begin
49
- logout_jwt = JWT.decode logout_token, @options.client_secret, true, {
49
+ logout_jwt = JWT.decode(
50
+ logout_token,
51
+ @options.client_secret,
52
+ true,
50
53
  :algorithm => helpers.algorithm(@options),
51
54
  :iss => @options.client_options.site,
52
55
  :verify_iss => true,
@@ -56,8 +59,8 @@ module OmniAuth
56
59
  :verify_jti => true,
57
60
  :verify_sub => true,
58
61
  :leeway => 60
59
- }
60
- if validate_events(logout_jwt[0]) && validate_nonce(logout_jwt[0]) && validate_sid(logout_jwt[0])
62
+ )
63
+ if validate_events(logout_jwt.first) && validate_nonce(logout_jwt.first) && validate_sid(logout_jwt.first)
61
64
  @request.update_param('sid', logout_jwt[0]['sid'])
62
65
  else
63
66
  raise(ArgumentError, 'Logout JWT validation failed. Missing session, events claim or nonce claim is present')
@@ -77,7 +80,7 @@ module OmniAuth
77
80
  if @options.has_key?(:remote_sign_out_handler) && (@options[:remote_sign_out_handler].respond_to? :call)
78
81
  @options[:remote_sign_out_handler]
79
82
  else
80
- OmniAuth::logger.send(:warn, 'It look like remote logout is configured on your Authentiq client but \':remote_sign_out_handler\' is not implemented on devise or omniauth')
83
+ OmniAuth::logger.send(:warn, 'It looks like remote logout is configured on your Authentiq client but \':remote_sign_out_handler\' is not implemented on devise or omniauth')
81
84
  raise(NotImplementedError, 'Remote sign out failed because the client\'s \':remote_sign_out_handler\' is not implemented on devise or omniauth')
82
85
  end
83
86
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-authentiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandros Keramidas