soar_authentication_token 5.0.0 → 5.0.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
  SHA1:
3
- metadata.gz: a52f85114800057ab0311580dcaa924d9abb73cb
4
- data.tar.gz: 147f69366980200dc8e695621a1884099ab3b3dd
3
+ metadata.gz: da82e78432f5421fea7acaf743e4f033cffc6d44
4
+ data.tar.gz: 81cc335a3532dfc97edee20526fdc3b6633819a6
5
5
  SHA512:
6
- metadata.gz: 05a4b09349427a6dc587f0ec6c968ef3b25fbed863e801c5148f3ff98499dfb1950e01f17905778dfbf05641cc5361e3fb17b4efcb47915a5bcda6e3f2129699
7
- data.tar.gz: 2d436a9426bbb03364391785061c30742c8d62b3283895629a2269017a1c37adfe5132f72f485bad54870f4ef332de9744d2b56a19067f8e1918a0546a4e2d4f
6
+ metadata.gz: bc388a37c4da3e085642ea7553f52958efad7a0bac7ebe39730e3567f11659a447e4b0ecce64704d6af15498193ce74912f5cf62b3344a73fc1ad35fad82f0b7
7
+ data.tar.gz: b1a211f06fece5480a47fdd8b6344f3411022e88d031f604987a5b40297f9bef81962d15276978ca0272f45f01657cad92fc03e01499e880b4394c23e0ba027f
data/README.md CHANGED
@@ -106,7 +106,7 @@ For local token generation, configure as such:
106
106
  generator = SoarAuthenticationToken::KeypairGenerator.new
107
107
  private_key, public_key = generator.generate
108
108
  @configuration_local = {
109
- 'provider' => 'SoarAuthenticationToken::JwtTokenValidator',
109
+ 'provider' => 'SoarAuthenticationToken::JwtTokenGenerator',
110
110
  'private_key' => private_key
111
111
  }
112
112
  ```
@@ -46,3 +46,4 @@ services:
46
46
  - authentication-token-redis-store
47
47
  authentication-token-redis-store:
48
48
  image: redis
49
+ command: redis-server --requirepass redis_password
data/docker-compose.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  version: '2.0'
2
2
  services:
3
3
  soar-authentication-token:
4
- command: /bin/bash -c 'bundle exec rspec -cfd ./spec/'
4
+ command: /bin/bash -c 'sleep 5; bundle exec rspec -cfd ./spec/'
5
5
  user: $UID:$UID
6
6
  build: .
7
7
  image: soar-authentication-token
@@ -49,3 +49,4 @@ services:
49
49
  - authentication-token-redis-store
50
50
  authentication-token-redis-store:
51
51
  image: redis
52
+ command: redis-server --requirepass redis_password
@@ -35,8 +35,8 @@ module SoarAuthenticationToken
35
35
  def rotate_generator_config(config: ,new_private_key: ,new_key_description:)
36
36
  validate_generator_config(config)
37
37
  new_config = config.dup
38
- new_config['private_key'] = new_private_key
39
- new_config['key_description'] = new_key_description
38
+ new_config['auth_token_generator']['private_key'] = new_private_key
39
+ new_config['auth_token_generator']['key_description'] = new_key_description
40
40
  new_config
41
41
  end
42
42
 
@@ -44,7 +44,7 @@ module SoarAuthenticationToken
44
44
  validate_validator_config(config)
45
45
  new_config = config.dup
46
46
  trim_public_keys(new_config)
47
- new_config['keys'][new_key_description] = { 'public_key' => new_public_key }
47
+ new_config['auth_token_validator']['keys'][new_key_description] = { 'public_key' => new_public_key }
48
48
  new_config
49
49
  end
50
50
 
@@ -59,9 +59,9 @@ module SoarAuthenticationToken
59
59
 
60
60
  def trim_public_keys(config)
61
61
  traversed_keys = 0
62
- config['keys'].sort.reverse_each do |key_name, key_data|
62
+ config['auth_token_validator']['keys'].sort.reverse_each do |key_name, key_data|
63
63
  traversed_keys += 1
64
- config['keys'].delete(key_name) if traversed_keys >= @maximum_number_of_public_keys
64
+ config['auth_token_validator']['keys'].delete(key_name) if traversed_keys >= @maximum_number_of_public_keys
65
65
  end
66
66
  end
67
67
 
@@ -84,11 +84,11 @@ module SoarAuthenticationToken
84
84
  end
85
85
 
86
86
  def validate_generator_config(config)
87
- raise ArgumentError, 'private_key not in config' unless config['private_key']
87
+ raise ArgumentError, 'private_key not in config' unless config['auth_token_generator']['private_key']
88
88
  end
89
89
 
90
90
  def validate_validator_config(config)
91
- raise ArgumentError, 'keys not in config' unless config['keys']
91
+ raise ArgumentError, 'keys not in config' unless config['auth_token_validator']['keys']
92
92
  end
93
93
  end
94
94
 
@@ -1,3 +1,3 @@
1
1
  module SoarAuthenticationToken
2
- VERSION = '5.0.0'
2
+ VERSION = '5.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_authentication_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barney de Villiers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-17 00:00:00.000000000 Z
11
+ date: 2017-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: soar_xt