zaikio-jwt_auth 0.3.0 → 0.3.1
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: cf4b231af0a8a9fb3d9c48d577c85d12ef02b2605418b22abf21512f1d714433
|
|
4
|
+
data.tar.gz: 2d106d3d2821edc1d24d96d5e69cda3e3b4e4d04b0f062c26a1d90fd2b223f3f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 325c2144f07a582d0bc3e4f3eeadfd68a1940e5230cefaa3a1b7bd9231b7bb74c86ccc1922f457945e78b05a8286f68b7551851705592e0c3838ebfa06f654a1
|
|
7
|
+
data.tar.gz: 6fc738d1533e5e06a15ebe476acd0a20b166bd08d5065462fdfe012363ae598d258e324806e0e35651f129b0d5dd5d8974ec92bb49b06e644c9bd2fb5f7a1236
|
|
@@ -4,11 +4,11 @@ module Zaikio
|
|
|
4
4
|
module JWTAuth
|
|
5
5
|
class Configuration
|
|
6
6
|
HOSTS = {
|
|
7
|
-
development: "http://
|
|
8
|
-
test: "http://
|
|
9
|
-
staging: "https://
|
|
10
|
-
sandbox: "https://
|
|
11
|
-
production: "https://
|
|
7
|
+
development: "http://hub.zaikio.test",
|
|
8
|
+
test: "http://hub.zaikio.test",
|
|
9
|
+
staging: "https://hub.staging.zaikio.com",
|
|
10
|
+
sandbox: "https://hub.sandbox.zaikio.com",
|
|
11
|
+
production: "https://hub.zaikio.com"
|
|
12
12
|
}.freeze
|
|
13
13
|
|
|
14
14
|
attr_accessor :app_name
|
|
@@ -14,7 +14,7 @@ module Zaikio
|
|
|
14
14
|
jti: "unique-access-token-id",
|
|
15
15
|
nbf: Time.now.to_i,
|
|
16
16
|
exp: 1.hour.from_now.to_i,
|
|
17
|
-
jku: "http://
|
|
17
|
+
jku: "http://hub.zaikio.test/api/v1/jwt_public_keys.json",
|
|
18
18
|
scope: []
|
|
19
19
|
}.merge(extra_payload).stringify_keys
|
|
20
20
|
end
|
|
@@ -33,6 +33,10 @@ module Zaikio
|
|
|
33
33
|
@payload["jti"]
|
|
34
34
|
end
|
|
35
35
|
|
|
36
|
+
def expires_at
|
|
37
|
+
Time.at(@payload["exp"]).to_datetime
|
|
38
|
+
end
|
|
39
|
+
|
|
36
40
|
# scope_options is an array of objects with:
|
|
37
41
|
# scope, app_name (optional), except/only (array, optional)
|
|
38
42
|
def scope_by_configurations?(scope_configurations, action_name, context)
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: zaikio-jwt_auth
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- crispymtn
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2020-
|
|
13
|
+
date: 2020-10-15 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: oj
|