token configured
This commit is contained in:
@@ -109,6 +109,7 @@ abstract class BaseController extends Controller
|
||||
{
|
||||
$token = null;
|
||||
if (isset($_ENV['ANSIBLE_LOGIN_TOKEN']) && $_ENV['ANSIBLE_LOGIN_TOKEN'] !=''){
|
||||
log_message('critical', "***** ***** Provision TOKEN CONFIGURED :: " . $_ENV['ANSIBLE_LOGIN_TOKEN']);
|
||||
return $_ENV['ANSIBLE_LOGIN_TOKEN'];
|
||||
}
|
||||
|
||||
@@ -148,13 +149,10 @@ abstract class BaseController extends Controller
|
||||
|
||||
if ($httpcode != "204") {
|
||||
log_message('critical', "***** ***** Provision LOGIN FAILED*********** :: " . $result);
|
||||
//return '';
|
||||
$token = "ghp5vseetodryrav77b8kfh6azuwwr-hxiky-qc3bue=";
|
||||
|
||||
} else {
|
||||
log_message('critical', "***** ***** Provision LOGIN COMPLETED :: NOW TOKEN :: ");
|
||||
// # 2. Get token
|
||||
// $url = $base_url . "/api/user/tokens";
|
||||
// $url = $base_url . "/user/tokens";
|
||||
$url = $base_url . $_ENV['ANSIBLE_TOKEN_URL'];
|
||||
$ch = curl_init($url);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
Reference in New Issue
Block a user