authz_jurnal_client 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/authz_jurnal_client-0.0.3.gem +0 -0
- data/lib/authz_jurnal_client/version.rb +1 -1
- data/lib/authz_jurnal_client.rb +6 -9
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f666ee3dfcb96b541d4d42723339c94c355604d621e63b38ccc6df3a538650c0
|
4
|
+
data.tar.gz: f284cda68f01a13f457a8d82da96c29c33e41ebba867b542ecf96277f35522bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a52f1516d6fda62d895c46e84fa9f18ebcc7c91a3a593e0b788fe7b04d2416a8258e0a3794fbd091b5b581ca198c4948c6639b31184db2ae3b847316e1d1113d
|
7
|
+
data.tar.gz: b83d991c7bf622a46f6579e4dbf4b168b48b8d879aeb6f9c042c5903b6c310b242c8d9aeec0340160ddb4fbda427adf55c2892db212d3d4746f67a6371309f93
|
data/Gemfile.lock
CHANGED
Binary file
|
data/lib/authz_jurnal_client.rb
CHANGED
@@ -10,15 +10,12 @@ module AuthzJurnalClient
|
|
10
10
|
|
11
11
|
class UserRoles
|
12
12
|
class << self
|
13
|
-
attr_accessor :redis, :domain, :
|
13
|
+
attr_accessor :redis, :domain, :authorization, :expiry
|
14
14
|
def config(opts = {})
|
15
|
-
@
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
20
|
-
@domain = opts[:domain]
|
21
|
-
@headers = {"Authorization" => "Basic #{token}"}
|
15
|
+
@headers = {"Authorization" => "#{opts[:authorization]}"}
|
16
|
+
@domain = opts[:domain] || 'http://localhost:3000'
|
17
|
+
redis_path = opts[:redis] || 'redis://localhost:6379'
|
18
|
+
@redis = Redis.new(url: redis_path)
|
22
19
|
@expiry = opts[:expiry] || 3600 * 5
|
23
20
|
end
|
24
21
|
|
@@ -47,7 +44,7 @@ module AuthzJurnalClient
|
|
47
44
|
end
|
48
45
|
|
49
46
|
def make_key(id, cid)
|
50
|
-
"
|
47
|
+
"manage_roles:#{id}-#{cid}"
|
51
48
|
end
|
52
49
|
|
53
50
|
def get_roles(j)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authz_jurnal_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alam Topani
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-02-
|
11
|
+
date: 2023-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -23,6 +23,7 @@ files:
|
|
23
23
|
- Rakefile
|
24
24
|
- authz_jurnal_client-0.0.1.gem
|
25
25
|
- authz_jurnal_client-0.0.2.gem
|
26
|
+
- authz_jurnal_client-0.0.3.gem
|
26
27
|
- lib/authz_jurnal_client.rb
|
27
28
|
- lib/authz_jurnal_client/version.rb
|
28
29
|
- lib/sig/authz_jurnal_client.rbs
|