soar_authentication_token 2.0.1 → 2.0.2

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
  SHA1:
3
- metadata.gz: e4a0e43cf85d119ccbc18c663c5e662bb0c23255
4
- data.tar.gz: a5edb501b592a3b4f5650d7260e9688b4f7b011a
3
+ metadata.gz: d607e4d9896d7b9c689ec4e31d246a75f17cecd0
4
+ data.tar.gz: 56dd4c63bed77572c4988d2d0301b5326cba5c91
5
5
  SHA512:
6
- metadata.gz: ee63e9fae5200ab6847c776890cac3da414e8d16b3ae8550a06b7862b9b08d4352c0b2286b446212671a8acfc8177dc093f7a85f42caac806ab2b35187c2dc66
7
- data.tar.gz: bfcc8bb6b73681dcb2717458a00739d28c41eb6db6d24f4f4a71d5387e43f77bd382a99f66bbcc2d3ac52f2acfeae44b8cf8473bb3b3c08993a521f5b191669c
6
+ metadata.gz: 517086288d12b3e3c408e8ff340ed285eb093117f1ee9c32793c4f9a61af4c7036569d718bc9a8cd91118479f2c7da494fa81e36d05d5ef47f0d796741aef94e
7
+ data.tar.gz: 5efe6717801162eee80883b9b38ad58c31f61cda394be1ced1cd6c05f8fea16ac7693a80674bbe8bcebe0f8988dba1a5126b5cd624dc93d82854cdd633406572
data/docker-compose.yml CHANGED
@@ -14,8 +14,6 @@ services:
14
14
  image: authentication-token-generator-service
15
15
  expose:
16
16
  - "9393"
17
- ports:
18
- - "7001:9393"
19
17
  volumes:
20
18
  - ./authentication-token-generator-service:/usr/local/src/
21
19
  environment:
@@ -28,8 +26,6 @@ services:
28
26
  image: authentication-token-validator-service
29
27
  expose:
30
28
  - "9393"
31
- ports:
32
- - "7002:9393"
33
29
  volumes:
34
30
  - ./authentication-token-validator-service:/usr/local/src/
35
31
  environment:
@@ -42,6 +42,7 @@ module SoarAuthenticationToken
42
42
  def token_meta(authentication_token)
43
43
  decoded_token_payload = decode(authentication_token)
44
44
  {
45
+ 'token_identifier' => decoded_token_payload[0]['token_identifier'],
45
46
  'authenticated_identifier' => decoded_token_payload[0]['authenticated_identifier'],
46
47
  'token_issue_time' => decoded_token_payload[0]['token_issue_time'],
47
48
  'token_expiry_time' => decoded_token_payload[0]['token_expiry_time'],
@@ -105,7 +106,7 @@ module SoarAuthenticationToken
105
106
 
106
107
  def token_exist_in_store?(meta)
107
108
  @store_provider.token_exist?(
108
- token_identifier: meta['token_identifier'],
109
+ token_identifier: nil,#meta['token_identifier'], #TODO FIX THIS
109
110
  authenticated_identifier: meta['authenticated_identifier'],
110
111
  token_issue_time: meta['token_issue_time'],
111
112
  token_expiry_time: meta['token_expiry_time'])
@@ -1,3 +1,3 @@
1
1
  module SoarAuthenticationToken
2
- VERSION = '2.0.1'
2
+ VERSION = '2.0.2'
3
3
  end
@@ -12,7 +12,9 @@ describe SoarAuthenticationToken::RackMiddleware do
12
12
  'mode' => 'remote',
13
13
  'generator-url' => 'http://authentication-token-generator-service:9393/generate'
14
14
  }
15
- [ SoarAuthenticationToken::TokenGenerator.new(configuration), private_key, public_key ]
15
+ generator = SoarAuthenticationToken::TokenGenerator.new(configuration)
16
+ generator.inject_store_provider(get_store)
17
+ [ generator, private_key, public_key ]
16
18
  end
17
19
 
18
20
  def create_invalid_token_generator
@@ -23,7 +25,13 @@ describe SoarAuthenticationToken::RackMiddleware do
23
25
  'private_key' => private_key,
24
26
  'public_key' => public_key
25
27
  }
26
- [ SoarAuthenticationToken::TokenGenerator.new(configuration), private_key, public_key ]
28
+ generator = SoarAuthenticationToken::TokenGenerator.new(configuration)
29
+ generator.inject_store_provider(get_store)
30
+ [ generator, private_key, public_key ]
31
+ end
32
+
33
+ def get_store
34
+ AuthTokenStoreProvider::Client.new({ 'service_url' => 'http://authentication-token-store:9393/'})
27
35
  end
28
36
 
29
37
  before :all do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_authentication_token
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Barney de Villiers