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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8629db96453f7a2bcb57a10cc33e24225dc8d2c64887a73d1858f8f29c9d7e07
4
- data.tar.gz: c3d079a6784968c0353a3cc379f98755228e72b2f8557e16685ee487f9f1cb58
3
+ metadata.gz: f666ee3dfcb96b541d4d42723339c94c355604d621e63b38ccc6df3a538650c0
4
+ data.tar.gz: f284cda68f01a13f457a8d82da96c29c33e41ebba867b542ecf96277f35522bb
5
5
  SHA512:
6
- metadata.gz: 315f869e05b9640414729c70380fd582977def884d9cbb3072e93e17f280c376643ba72f65781b2808f0c82b4c20e51f2170f59abbfeef8a2b311abd727594d2
7
- data.tar.gz: d01429920786ab9e8f54e8ebc4858df688c813789b9ca641db696534dae0fdd39d37df96a67a71339bd696a9301d7de5bc3767260371b7c0dfa4fcbc5cc22662
6
+ metadata.gz: a52f1516d6fda62d895c46e84fa9f18ebcc7c91a3a593e0b788fe7b04d2416a8258e0a3794fbd091b5b581ca198c4948c6639b31184db2ae3b847316e1d1113d
7
+ data.tar.gz: b83d991c7bf622a46f6579e4dbf4b168b48b8d879aeb6f9c042c5903b6c310b242c8d9aeec0340160ddb4fbda427adf55c2892db212d3d4746f67a6371309f93
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authz_jurnal_client (0.0.1)
4
+ authz_jurnal_client (0.0.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
Binary file
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AuthzJurnalClient
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
@@ -10,15 +10,12 @@ module AuthzJurnalClient
10
10
 
11
11
  class UserRoles
12
12
  class << self
13
- attr_accessor :redis, :domain, :token, :expiry
13
+ attr_accessor :redis, :domain, :authorization, :expiry
14
14
  def config(opts = {})
15
- @redis = if opts[:redis].is_a? Hash
16
- Redis.new(opts[:redis])
17
- else
18
- opts[:redis]
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
- "manage_role:#{id}-#{cid}"
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.3
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-01 00:00:00.000000000 Z
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