devise_auth0_jwt_strategy 0.0.8 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/devise_auth0_jwt_strategy/strategy.rb +15 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: baf736b13da8084661e2289e7ec4f4d39f0afa9b
|
4
|
+
data.tar.gz: 2746846ea9080477eb9490d6564e475b821d41a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d6f16acbcfbc6ec7e5c52a6da848704d33fdb495b35ed72883dd04bb7e2a1340bc6a82a843e358e00a84b01e2d747c3d90862831b6ca76431d83427ba5dabdf7
|
7
|
+
data.tar.gz: b0af551607c40f19c7c1f11e874bd8244d170076c9e3976bcbd1f95aaaef24e897736b3bd662a58f8970acc01210062af917c2edd81a3b37c168b950be900c12
|
@@ -51,6 +51,20 @@ module Devise
|
|
51
51
|
( auth0_client_secret? and auth0_client_id? and !!jwt_token )
|
52
52
|
end
|
53
53
|
|
54
|
+
def to_boolean(value)
|
55
|
+
# Most calls to this will pass in nil so have this guard clause first
|
56
|
+
# as a performance optimization
|
57
|
+
return false if value.nil?
|
58
|
+
|
59
|
+
# We interpret a boolean true or the lowercase normalize strings 'true', and 't'
|
60
|
+
# as a true value
|
61
|
+
return value if value == !!value
|
62
|
+
return !!(['true', 't'].index(value.downcase)) if value.kind_of?(::String)
|
63
|
+
|
64
|
+
# All others are always false
|
65
|
+
return false
|
66
|
+
end
|
67
|
+
|
54
68
|
def authenticate!
|
55
69
|
|
56
70
|
if ENV['DEBUG_AUTH0_JWT']
|
@@ -76,6 +90,7 @@ module Devise
|
|
76
90
|
|
77
91
|
else
|
78
92
|
u.ignore_timedout = true if u.respond_to?(:ignore_timedout=)
|
93
|
+
u.ignore_active = to_boolean(payload['ignore_active']) if u.respond_to?(:ignore_active=)
|
79
94
|
success!(u)
|
80
95
|
|
81
96
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise_auth0_jwt_strategy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick McGraw
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.5'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.5'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: devise
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,30 +44,30 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 5.0.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 5.0.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec-rails
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.7'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
68
|
+
version: '3.7'
|
69
69
|
description: Authenticate requests using an Auth0 JWT passed by HTTP header
|
70
|
-
email:
|
70
|
+
email: pat@bloodhub.com
|
71
71
|
executables: []
|
72
72
|
extensions: []
|
73
73
|
extra_rdoc_files: []
|