1<?
php declare(strict_types=1);
 
   43        if (!$this->
getSettings()->
get(
'apache_enable_auth')) {
 
   44            $this->
getLogger()->info(
'Apache auth disabled.');
 
   50            !$this->
getSettings()->
get(
'apache_auth_indicator_name') ||
 
   51            !$this->
getSettings()->
get(
'apache_auth_indicator_value')
 
   53            $this->
getLogger()->warning(
'Apache auth indicator match failure.');
 
   58        $validIndicatorValues = array_filter(array_map(
 
   60            str_getcsv($this->
getSettings()->
get(
'apache_auth_indicator_value'))
 
   62        if (!in_array(
$_SERVER[$this->
getSettings()->
get(
'apache_auth_indicator_name')], $validIndicatorValues)) {
 
   63            $this->
getLogger()->warning(
'Apache authentication failed (indicator name <-> value');
 
   75            $this->
getLogger()->info(
'No username given');
 
   81        if ($this->
getSettings()->
get(
'apache_enable_ldap')) {
 
   88            $this->
getLogger()->info(
'Cannot find user id for external account: ' . $this->
getCredentials()->getUsername());
 
   94        $status->setAuthenticatedUserId($usr_id);
 
  103        $this->force_new_account = 
true;
 
  104        if ($this->
getSettings()->
get(
'apache_enable_ldap')) {
 
  114        $this->force_new_account = 
true;
 
  115        if ($this->
getSettings()->
get(
'apache_enable_ldap')) {
 
  133        $this->migration_account = 
$name;
 
  149        if ($this->
getSettings()->
get(
'apache_ldap_sid')) {
 
  150            return 'ldap_' . (string) $this->
getSettings()->get(
'apache_ldap_sid');
 
  165        $this->
getLogger()->debug(
'Using ldap data source with server configuration: ' . 
$server->getName());
 
  168        $sync->setExternalAccount($this->
getCredentials()->getUsername());
 
  169        $sync->setUserData(array());
 
  170        $sync->forceCreation($this->force_new_account);
 
  171        $sync->forceReadLdapData(
true);
 
  174            $internal_account = $sync->sync();
 
  175            $this->
getLogger()->debug(
'Internal account: ' . $internal_account);
 
  177            $this->
getLogger()->info(
'Login failed with message: ' . $e->getMessage());
 
  186            $this->
getLogger()->info(
'Login failed with message: ' . $e->getMessage());
 
  192            $this->
getLogger()->info(
'Authentication failed: account migration required for external account: ' . $this->
getCredentials()->getUsername());
 
An exception for terminatinating execution or to throw for unit testing.
createNewAccount(ilAuthStatus $status)
@inheritDoc
getTriggerAuthMode()
@inheritDoc
getSettings()
Get setings.
migrateAccount(ilAuthStatus $status)
@inheritDoc
getExternalAccountName()
@inheritDoc
setExternalAccountName(string $name)
const APACHE_AUTH_TYPE_BY_FUNCTION
handleLDAPDataSource(ilAuthStatus $status)
@inheritDoc
const APACHE_AUTH_TYPE_EXTENDED_MAPPING
const APACHE_AUTH_TYPE_DIRECT_MAPPING
getUserAuthModeName()
@inheritDoc
doAuthentication(ilAuthStatus $status)
@inheritDoc
__construct(ilAuthCredentials $credentials)
Constructor.
Base class for authentication providers (radius, ldap, apache, ...)
handleAuthenticationFail(ilAuthStatus $status, $a_reason)
Handle failed authentication.
Auth status implementation.
const STATUS_AUTHENTICATED
const STATUS_ACCOUNT_MIGRATION_REQUIRED
Description of ilLDAPAccountMigrationRequiredException.
static getInstanceByServerId($a_server_id)
Get instance by server id.
Thrown in case of failed synchronisation settings.
Description of ilLDAPSyncronisationException.
Synchronization of user accounts used in auth container ldap, radius , cas,...
static _checkExternalAuthAccount($a_auth, $a_account, $tryFallback=true)
check whether external account and authentication method matches with a user
static _lookupId($a_user_str)
Lookup id by login.
Interface of auth credentials.
Description of class interface.
Standard interface for auth provider implementations.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc