function _acquia_purge_diagnostics_acquia_auth_token in Acquia Purge 7
Acquia auth token.
Parameters
string $t: Name of the t() function to call.
AcquiaPurgeService $service: The Acquia Purge service.
Return value
array Associative array with the following elements:
- title: The name of the requirement.
- value: The current value (e.g., version, time, level, etc).
- description: The description of the requirement/status.
- severity:
- ACQUIA_PURGE_SEVLEVEL_INFO
- ACQUIA_PURGE_SEVLEVEL_OK
- ACQUIA_PURGE_SEVLEVEL_WARNING
- ACQUIA_PURGE_SEVLEVEL_ERROR <-- blocks Acquia Purge from executing!
1 string reference to '_acquia_purge_diagnostics_acquia_auth_token'
File
- ./
acquia_purge.diagnostics.inc, line 215 - Diagnostic self-tests and reports that aim to prevent runtime misery.
Code
function _acquia_purge_diagnostics_acquia_auth_token($t, $service) {
$test = array(
'title' => $t('Acquia auth token'),
'value' => $service
->hostingInfo()
->getBalancerToken(),
'severity' => ACQUIA_PURGE_SEVLEVEL_INFO,
);
if ($service
->oddities()
->has('405')) {
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_WARNING;
$test['description'] = $t('Acquia Purge received HTTP 405 (not allowed) responses from one of' . ' your load balancers! What this suggests is that your authentication' . ' token is (or has been) invalid. If cache invalidation constantly' . ' appears to fail, please contact Acquia support.');
}
elseif (!strlen($service
->hostingInfo()
->getBalancerToken())) {
$test['severity'] = ACQUIA_PURGE_SEVLEVEL_ERROR;
$test['description'] = $t('Empty token configured!');
}
return $test;
}