You are here

function deploy_deploy_auth_info in Deploy - Content Staging 6

Implementation of hook_deploy_auth_info().

This hook implements support for the two basic authentication types that comes with the Services module by default. Those are authentication with just a valid session id, or authentication with just an API key.

Session authentication (with username and password) does only make sense when deploying against another Drupal sites (which isn't always the case).

@todo Make it so callbacks can be stored in a separate file.

Return value

An array of this modules' authentication types.

File

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

Code

function deploy_deploy_auth_info() {
  $items['deploy_key'] = array(
    'title' => t('Key authentication'),
    'description' => t('All method calls must include a valid token to authenticate themselves with the server.'),
    'form callback' => 'deploy_auth_key_form',
    'arguments callback' => 'deploy_auth_key_arguments',
  );
  $items['deploy_sessid'] = array(
    'title' => t('Session id'),
    'description' => t('All method calls must include a valid session id.'),
    'form callback' => 'deploy_auth_sessid_form',
    'init callback' => 'deploy_auth_sessid_init',
    'arguments callback' => 'deploy_auth_sessid_arguments',
    'cleanup callback' => 'deploy_auth_sessid_cleanup',
  );
  return $items;
}