ServerVariableLookup.php in LDAP Single Sign On 8.4
File
tests/modules/ldap_sso_dummy_ldap/src/ServerVariableLookup.php
View source
<?php
declare (strict_types=1);
namespace Drupal\ldap_sso_dummy_ldap;
use Drupal\ldap_sso\ServerVariableLookupInterface;
class ServerVariableLookup implements ServerVariableLookupInterface {
public function getAuthenticationNameFromServer(?string $variable) : ?string {
$remote_user = NULL;
if (strpos($_SERVER['REQUEST_URI'], '/user/login/sso') !== FALSE) {
$remote_user = 'hpotter';
}
return $remote_user;
}
}