summaryrefslogtreecommitdiffstats
path: root/components/congress/test-webapp/www
diff options
context:
space:
mode:
authorblsaws <bryan.sullivan@att.com>2016-06-14 14:45:25 -0700
committerblsaws <bryan.sullivan@att.com>2016-06-14 14:45:25 -0700
commit6c56861d339035ef5399b0839262b0285721d45c (patch)
treeb4946024d00368d20d2af863b62d56ad897adfe7 /components/congress/test-webapp/www
parent2c2706a89767de9f3df4cbeda9e8e1dad5e1fa33 (diff)
Further fixes to authentication
JIRA: COPPER-4 Change-Id: I7e42b4847faf2658bd8bce0857473929a635c092 Signed-off-by: blsaws <bryan.sullivan@att.com>
Diffstat (limited to 'components/congress/test-webapp/www')
-rw-r--r--components/congress/test-webapp/www/proxy/index.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/components/congress/test-webapp/www/proxy/index.php b/components/congress/test-webapp/www/proxy/index.php
index ed0b6e7..6374275 100644
--- a/components/congress/test-webapp/www/proxy/index.php
+++ b/components/congress/test-webapp/www/proxy/index.php
@@ -35,8 +35,14 @@ if ($result === false) {
curl_setopt($curlop, CURLOPT_HTTPHEADER, array("Content-Type: application/json"));
$body = '{"auth": {"passwordCredentials": {"username": "OS_USERNAME", "password": "OS_PASSWORD"}}}';
curl_setopt($curlop, CURLOPT_POSTFIELDS, $body);
+ $req_time=time();
+ $result = file_put_contents("/tmp/".date('ymd').".log", "proxy.php, ".$req_time.", ".$url.", ".$type.", ".$body."\n",FILE_APPEND);
+ if ($result === false) $response = "PHP error in index.php";
$response = curl_exec($curlop);
- $response = json_decode($response);
+ $body = substr($response, $header_size);
+ $result = file_put_contents("/tmp/".date('ymd').".log", "proxy.php, ".$req_time.", ".$responseCode.", ".$type.", ".$header.", ".$body."\n",FILE_APPEND);
+ if ($result === false) $response = "PHP error in index.php";
+ $response = json_decode($body);
$token = $response->access->token->id;
file_put_contents("/tmp/os_token",$token);
}