soar_authentication_token 3.0.8 → 3.0.9
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 943763e03572585973f8183ec30b991724885a5b
|
4
|
+
data.tar.gz: bc1494d9165b7b8fb09a16707be3c799afa562ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7de47b8886a50cb1b39710af98a80ea8f1e748aa6ba233f2859cbd30dccf8065b341c633f60f8bbd81e9ede872854be13e725d8b5559059e20d78df06cdd6041
|
7
|
+
data.tar.gz: 768f6724ca6f208abd04af1d27ff3918b3ed668e623e32505a2099e09d1b4c15a368207a389572f5cdd11e31c6d01dce23709f823ec2c1b8415983a70329fe29
|
@@ -83,16 +83,18 @@ module SoarAuthenticationToken
|
|
83
83
|
end
|
84
84
|
|
85
85
|
def validate_remotely(authentication_token,flow_identifier)
|
86
|
-
|
86
|
+
response = send_request(authentication_token,flow_identifier)
|
87
|
+
validate_and_extract_information_from_response(response)
|
88
|
+
end
|
87
89
|
|
88
|
-
|
89
|
-
|
90
|
+
def send_request(authentication_token,flow_identifier)
|
91
|
+
uri = URI.parse(@configuration['validator-url'])
|
92
|
+
uri.query = URI.encode_www_form( {'flow_identifier' => flow_identifier} )
|
93
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
94
|
+
http.use_ssl = true if uri.is_a?(URI::HTTPS)
|
95
|
+
request = Net::HTTP::Post.new(uri.request_uri)
|
90
96
|
request.body = { 'authentication_token' => authentication_token }.to_json
|
91
|
-
|
92
|
-
http.request request
|
93
|
-
}
|
94
|
-
|
95
|
-
validate_and_extract_information_from_response(response)
|
97
|
+
http.request(request)
|
96
98
|
end
|
97
99
|
|
98
100
|
def validate_and_extract_information_from_response(response)
|