function system_test_basic_auth_page in Drupal 7
1 string reference to 'system_test_basic_auth_page'
- system_test_menu in modules/simpletest/tests/system_test.module
- Implements hook_menu().
File
- modules/simpletest/tests/system_test.module, line 151
Code
function system_test_basic_auth_page() {
if (isset($_SERVER['HTTP_AUTHORIZATION'])) {
$authorization_header = $_SERVER['HTTP_AUTHORIZATION'];
}
elseif (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {
$authorization_header = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];
}
list($user, $pw) = explode(':', base64_decode(substr($authorization_header, 6)));
$output = t('Username is @username.', array(
'@username' => $user,
));
$output .= t('Password is @password.', array(
'@password' => $pw,
));
return $output;
}