apiphobic-tokens 1.1.1 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/LICENSE.txt +1 -1
- data/lib/apiphobic/tokens/json_web_token.rb +6 -8
- data/lib/apiphobic/tokens/role_predicable.rb +1 -1
- data/lib/apiphobic/tokens/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +40 -29
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfdcea174929f4bc35d14489cc907975cc52b7bdadde0685d149fe170bcef040
|
4
|
+
data.tar.gz: d9ef964a93b454acb6924d778e77c43b3aa863fdb3e4c99dbc634f85262f01a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d2dfabbb167d21ed16940580db4b6c25ce0d97b96bd80ae9be9dc3b9fd908ac47468f8510ddb6a4784319ebe953164a43088e030a2293e9d71223cdf37472c5
|
7
|
+
data.tar.gz: 07b4557ae1ee5fdd39ee0ead41ac95eb63222d2c14a78fd00029308d3e08f5f736a98ed24f10b750169735e1482a6e7582e3712d91014d59e828129c4c8a1fca
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/LICENSE.txt
CHANGED
@@ -10,7 +10,6 @@ require 'apiphobic/tokens/configurable'
|
|
10
10
|
require 'apiphobic/tokens/json_web_tokens/null'
|
11
11
|
require 'apiphobic/tokens/role_predicable'
|
12
12
|
|
13
|
-
# rubocop:disable Metrics/ClassLength
|
14
13
|
module Apiphobic
|
15
14
|
module Tokens
|
16
15
|
class JsonWebToken
|
@@ -47,11 +46,11 @@ class JsonWebToken
|
|
47
46
|
new(data: data, headers: headers)
|
48
47
|
end
|
49
48
|
|
50
|
-
# rubocop:disable Metrics/ParameterLists
|
51
|
-
def self.build(
|
49
|
+
# rubocop:disable Metrics/ParameterLists
|
50
|
+
def self.build(audience_id:,
|
51
|
+
id: SecureRandom.uuid,
|
52
52
|
audience: configuration.default_audience,
|
53
|
-
|
54
|
-
expiration: Time.now.utc.to_i + (60 * configuration.default_expiration_in_minutes),
|
53
|
+
expiration: Time.now.utc.to_i + (60 * configuration.default_expiration_in_minutes), # rubocop:disable Layout/LineLength
|
55
54
|
issuer: configuration.default_issuer,
|
56
55
|
issued_at: Time.now.utc,
|
57
56
|
not_before: Time.now.utc,
|
@@ -76,7 +75,7 @@ class JsonWebToken
|
|
76
75
|
},
|
77
76
|
)
|
78
77
|
end
|
79
|
-
# rubocop:enable Metrics/ParameterLists
|
78
|
+
# rubocop:enable Metrics/ParameterLists
|
80
79
|
|
81
80
|
def available?
|
82
81
|
not_before <= (Time.now.to_i + configuration.default_availability_leeway_in_seconds)
|
@@ -114,7 +113,7 @@ class JsonWebToken
|
|
114
113
|
end
|
115
114
|
|
116
115
|
def valid_id?
|
117
|
-
id =~ /[a-f0-9]{8}
|
116
|
+
id =~ /[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}/i
|
118
117
|
end
|
119
118
|
|
120
119
|
def valid_issuer?
|
@@ -323,4 +322,3 @@ class JsonWebToken
|
|
323
322
|
end
|
324
323
|
end
|
325
324
|
end
|
326
|
-
# rubocop:enable Metrics/ClassLength
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apiphobic-tokens
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- thegranddesign
|
@@ -10,28 +10,34 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
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8oxTdcOPLYyvH54aJWVqCrnLO
|
26
|
+
KNa/p6hMmwxTWNS5Vz0uxuEGyE9E0tHbtjIs2XX5AgMBAAGjgaQwgaEwCQYDVR0T
|
27
|
+
BAIwADALBgNVHQ8EBAMCBLAwHQYDVR0OBBYEFAK3RicwO0f6+puFN6lRVMOKMJuu
|
28
|
+
MDMGA1UdEQQsMCqBKGxvY2FsZXVua25vd244MTArcnVieWdlbXNAcHJvdG9ubWFp
|
29
|
+
bC5jb20wMwYDVR0SBCwwKoEobG9jYWxldW5rbm93bjgxMCtydWJ5Z2Vtc0Bwcm90
|
30
|
+
b25tYWlsLmNvbTANBgkqhkiG9w0BAQsFAAOCAYEAQwV6pOp5gm8141pyXeQFI/5E
|
31
|
+
rZYO3MvdyZM8O3HMD51LDS8mtMURceaKZM6WTambe2RVX4A++0qUiEnn9K4Fexm/
|
32
|
+
SEGaC/Gp+Fg9D1SKfkdq9bgdIhOEUwiGqjczgzNC806AtWZ+awI940oydFYZlpo0
|
33
|
+
jMQihPPJEqF1U6JBDMZYV5tX/dJYSGRl9L3s1k2tjoN98q+beNaZQDn21Amml4eK
|
34
|
+
KEkMeTTJ2E4GVzR9eKEETLq2LygdUWWZ5NdWOYTxJMdg1GZp3b6X8hJrwfOiizqt
|
35
|
+
/ANlIEh11/pOnWa6WPUVpGIMpYdquvmJXnF2LX6zxkKK1hbrebt+vAEAGczgw1Ri
|
36
|
+
rkLM6y+BHQdkOTj3VG4MjIU8D4h1Z73Exzxds/VbVKMEz+8JrFjGJ/tYa0PZ8U5p
|
37
|
+
3yXL4G6eW3rdBW/OiLF7GgG2o26d02OMzf4+ubUVS5LQDOcd4vgNPLWzJSBt1YIh
|
38
|
+
TgBsED7Me5YdMVXxtTWYsF1VMzaL9hReD3UXGcxe
|
33
39
|
-----END CERTIFICATE-----
|
34
|
-
date:
|
40
|
+
date: 2022-07-09 00:00:00.000000000 Z
|
35
41
|
dependencies:
|
36
42
|
- !ruby/object:Gem::Dependency
|
37
43
|
name: json-jwt
|
@@ -53,28 +59,28 @@ dependencies:
|
|
53
59
|
requirements:
|
54
60
|
- - "~>"
|
55
61
|
- !ruby/object:Gem::Version
|
56
|
-
version: '
|
62
|
+
version: '4.0'
|
57
63
|
type: :runtime
|
58
64
|
prerelease: false
|
59
65
|
version_requirements: !ruby/object:Gem::Requirement
|
60
66
|
requirements:
|
61
67
|
- - "~>"
|
62
68
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
69
|
+
version: '4.0'
|
64
70
|
- !ruby/object:Gem::Dependency
|
65
71
|
name: rspec
|
66
72
|
requirement: !ruby/object:Gem::Requirement
|
67
73
|
requirements:
|
68
74
|
- - "~>"
|
69
75
|
- !ruby/object:Gem::Version
|
70
|
-
version: '3.
|
76
|
+
version: '3.11'
|
71
77
|
type: :development
|
72
78
|
prerelease: false
|
73
79
|
version_requirements: !ruby/object:Gem::Requirement
|
74
80
|
requirements:
|
75
81
|
- - "~>"
|
76
82
|
- !ruby/object:Gem::Version
|
77
|
-
version: '3.
|
83
|
+
version: '3.11'
|
78
84
|
- !ruby/object:Gem::Dependency
|
79
85
|
name: rspeckled
|
80
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -131,11 +137,17 @@ files:
|
|
131
137
|
- lib/apiphobic/tokens/null.rb
|
132
138
|
- lib/apiphobic/tokens/role_predicable.rb
|
133
139
|
- lib/apiphobic/tokens/version.rb
|
134
|
-
homepage:
|
140
|
+
homepage: https://github.com/thekompanee/apiphobic-tokens
|
135
141
|
licenses:
|
136
142
|
- MIT
|
137
143
|
metadata:
|
138
144
|
allowed_push_host: https://rubygems.org
|
145
|
+
bug_tracker_uri: https://github.com/thekompanee/apiphobic-tokens/issues
|
146
|
+
changelog_uri: https://github.com/thekompanee/apiphobic-tokens/blob/master/CHANGELOG.md
|
147
|
+
documentation_uri: https://github.com/thekompanee/apiphobic-tokens/tree/releases/v1.2.0
|
148
|
+
homepage_uri: https://github.com/thekompanee/apiphobic-tokens
|
149
|
+
source_code_uri: https://github.com/thekompanee/apiphobic-tokens
|
150
|
+
wiki_uri: https://github.com/thekompanee/apiphobic-tokens/wiki
|
139
151
|
post_install_message:
|
140
152
|
rdoc_options: []
|
141
153
|
require_paths:
|
@@ -151,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
163
|
- !ruby/object:Gem::Version
|
152
164
|
version: '0'
|
153
165
|
requirements: []
|
154
|
-
|
155
|
-
rubygems_version: 2.7.6
|
166
|
+
rubygems_version: 3.3.7
|
156
167
|
signing_key:
|
157
168
|
specification_version: 4
|
158
169
|
summary: API Tokens
|
metadata.gz.sig
CHANGED
Binary file
|