private function LdapAuthenticationTestCase::setSsoServerEnvironment in Lightweight Directory Access Protocol (LDAP) 8.2
Same name and namespace in other branches
- 7.2 ldap_authentication/tests/ldap_authentication.test \LdapAuthenticationTestCase::setSsoServerEnvironment()
set mock server variables for sso tests
Parameters
object $drupal_user in drupal stdClass format:
array $ldap_user array:
enum ldap implementation type:
1 call to LdapAuthenticationTestCase::setSsoServerEnvironment()
- LdapAuthenticationTestCase::x_testSSOUserLogon in ldap_authentication/
tests/ ldap_authentication.test - LDAP Authentication Exclusive Mode User Logon Test (ids = LDAP_authen.EM.ULT.*)
File
- ldap_authentication/
tests/ ldap_authentication.test, line 304
Class
Code
private function setSsoServerEnvironment($sso_username = NULL, $ldapImplementation = 'mod_auth_sspi') {
// clear past environment
// these need to be set in simpletest client browser,
// or a new user/client browser created each test
// perhaps there is a wrapper function in simpletest framework for altering
// $_SESSION ?
//setcookie("seamless_login", '');
//unset($_SESSION['seamless_login']);
//setcookie("seamless_login_attempted", '');
//unset($_SESSION['seamless_login_attempted']);
if ($sso_username !== FALSE) {
$_SERVER['REMOTE_USER'] = $sso_username;
$_SERVER['REDIRECT_REMOTE_USER'] = $sso_username;
}
}