function drush_warden_check in Warden 8
Same name and namespace in other branches
- 8.2 warden.drush.inc \drush_warden_check()
- 3.x warden.drush.inc \drush_warden_check()
Test the connection to warden.
File
- ./
warden.drush.inc, line 34 - Drush integration with the Warden module.
Code
function drush_warden_check() {
try {
$warden = _warden_get_manager();
drush_print(dt('URL: :url', [
':url' => $warden
->getWardenUrl(),
]));
if ($warden
->hasBasicAuthentication()) {
drush_print(dt('HTTP Username: :username', [
':username' => $warden
->getUsername(),
]));
drush_print(dt('HTTP Password: :password', [
':password' => $warden
->getPassword(),
]));
}
if ($warden
->hasCertificatePath()) {
drush_print(dt('Certificate file: :path', [
':path' => $warden
->getCertificatePath(),
]));
}
$key = $warden
->getPublicKey();
drush_print(dt('Going to check connection to Warden server by retrieving the public key ...'));
drush_print($key);
} catch (Exception $e) {
drush_set_error($e
->getMessage());
}
}