You are here

function deploy_auth_key_arguments in Deploy - Content Staging 6

Implementation of the arguments callback.

1 string reference to 'deploy_auth_key_arguments'
deploy_deploy_auth_info in ./deploy.module
Implementation of hook_deploy_auth_info().

File

./deploy.module, line 1114
Deployment API which enables modules to deploy items between servers.

Code

function deploy_auth_key_arguments(&$protocol_args, &$function_args) {

  // Get the active server.
  $server = variable_get('deploy_server', array());
  $timestamp = time();
  $method = $protocol_args[1];

  // Use Drupal's built in password generator to generate a random string.
  $nonce = user_password();
  $hash = deploy_get_auth_key_hash($server['settings']['key'], $timestamp, $server['settings']['domain'], $nonce, $method);
  array_push($protocol_args, $hash, $server['settings']['domain'], $timestamp, $nonce);
}