devise_auth0_jwt_strategy 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/devise_auth0_jwt_strategy/strategy.rb +5 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 798529b5076e8437d070b37d6d4a1111181c6a320ccbab0a18ed5293ace37756
|
4
|
+
data.tar.gz: 66ca39077e1cd60f8a038204f7149b52336d827d55364974f2f93079b36ea4a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 744d3642ed4e7fcdcf3c76dfe1353fe93954df69c159eb28c816043384800088127cf7b8df9ceab8a6016c0d39205034a4363500eecb4f379ed7c245dbeae5ad
|
7
|
+
data.tar.gz: 332353c45e288a4aab3ac6814556c86c159e3ef57370b7de1b56fb80e88f4257a4c1ae5ce59a455bf3d17f87e97fff3b7ba831ad4f17851d57c3aeeb0f46c1ff
|
@@ -82,9 +82,9 @@ module Devise
|
|
82
82
|
def authenticate!
|
83
83
|
|
84
84
|
if ENV['DEBUG_AUTH0_JWT']
|
85
|
-
|
86
|
-
|
87
|
-
|
85
|
+
::Rails.logger.info ">>>>>>>>>>>>>>> DEBUG AUTH0 JWT"
|
86
|
+
::Rails.logger.info "JWT -- valid? #{valid?}"
|
87
|
+
::Rails.logger.info @jwt_token
|
88
88
|
end
|
89
89
|
|
90
90
|
if valid?
|
@@ -92,7 +92,7 @@ module Devise
|
|
92
92
|
# This will throw JWT::DecodeError if it fails
|
93
93
|
payload, header = ::JWT.decode(@jwt_token, auth0_client_secret, true, decode_options)
|
94
94
|
|
95
|
-
|
95
|
+
::Rails.logger.info payload.inspect if ENV['DEBUG_AUTH0_JWT']
|
96
96
|
|
97
97
|
raise ClaimInvalid.new('JWT has the wrong client id') unless payload['aud'] == auth0_client_id
|
98
98
|
raise ClaimInvalid.new('JWT has expired') unless payload['exp'].to_i > Time.now.to_i
|
@@ -121,7 +121,7 @@ module Devise
|
|
121
121
|
fail! e.message
|
122
122
|
|
123
123
|
rescue ::JWT::DecodeError => e
|
124
|
-
|
124
|
+
::Rails.logger.error "JWT::DecodeError -- #{e.message}"
|
125
125
|
fail!("JWT token is invalid. Please get a new token and try again.")
|
126
126
|
end
|
127
127
|
|