soar_authentication_token 2.0.1 → 2.0.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d607e4d9896d7b9c689ec4e31d246a75f17cecd0
|
4
|
+
data.tar.gz: 56dd4c63bed77572c4988d2d0301b5326cba5c91
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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'])
|
@@ -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
|
-
|
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
|
-
|
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
|