function _acquia_agent_authenticator in Acquia Connector 7
Same name and namespace in other branches
- 6.2 acquia_agent/acquia_agent_streams.inc \_acquia_agent_authenticator()
- 6 acquia_agent/acquia_agent_streams.inc \_acquia_agent_authenticator()
- 7.3 acquia_agent/acquia_agent.module \_acquia_agent_authenticator()
- 7.2 acquia_agent/acquia_agent.module \_acquia_agent_authenticator()
Creates an authenticator based on xmlrpc params and a HMAC-SHA1.
1 call to _acquia_agent_authenticator()
- acquia_agent_call in acquia_agent/
acquia_agent.module - Prepare and send a XML-RPC request to Acquia Network with an authenticator.
File
- acquia_agent/
acquia_agent.module, line 572 - Acquia Agent securely sends information to Acquia Network.
Code
function _acquia_agent_authenticator($params = array(), $identifier = NULL, $key = NULL) {
if (empty($identifier)) {
$identifier = acquia_agent_settings('acquia_identifier');
}
if (empty($key)) {
$key = acquia_agent_settings('acquia_key');
}
$time = REQUEST_TIME;
$nonce = base64_encode(hash('sha256', drupal_random_bytes(55), TRUE));
$authenticator['identifier'] = $identifier;
$authenticator['time'] = $time;
$authenticator['hash'] = _acquia_agent_hmac($key, $time, $nonce, $params);
$authenticator['nonce'] = $nonce;
return $authenticator;
}