ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilAuthFrontendHTTP Class Reference

Description of class class. More...

+ Inheritance diagram for ilAuthFrontendHTTP:
+ Collaboration diagram for ilAuthFrontendHTTP:

Public Member Functions

 authenticate ()
 Try authentication. More...
 
- Public Member Functions inherited from ilAuthFrontend
 __construct (ilAuthSession $session, ilAuthStatus $status, ilAuthCredentials $credentials, array $providers)
 Constructor. More...
 
 getAuthSession ()
 Get auth session. More...
 
 getCredentials ()
 Get auth credentials. More...
 
 getProviders ()
 Get providers. More...
 
 getStatus ()
 
 resetStatus ()
 Reset status. More...
 
 getLogger ()
 Get logger. More...
 
 migrateAccount (ilAuthSession $session)
 Migrate Account to existing user account. More...
 
 migrateAccountNew ()
 Create new user account. More...
 
 authenticate ()
 Try to authenticate user. More...
 

Protected Member Functions

 handleAuthenticationFail ()
 Draw basic auth. More...
 
- Protected Member Functions inherited from ilAuthFrontend
 handleAccountMigration (ilAuthProviderAccountMigrationInterface $provider)
 Handle account migration. More...
 
 handleAuthenticationSuccess (ilAuthProviderInterface $provider)
 Handle successful authentication. More...
 
 checkActivation (ilObjUser $user)
 Check activation. More...
 
 checkExceededLoginAttempts (\ilObjUser $user)
 
 checkTimeLimit (ilObjUser $user)
 Check time limit. More...
 
 checkIp (ilObjUser $user)
 Check ip. More...
 
 checkSimultaneousLogins (ilObjUser $user)
 Check simultaneous logins. More...
 
 handleAuthenticationFail ()
 Handle failed authenication. More...
 

Additional Inherited Members

- Data Fields inherited from ilAuthFrontend
const MIG_EXTERNAL_ACCOUNT = 'mig_ext_account'
 
const MIG_TRIGGER_AUTHMODE = 'mig_trigger_auth_mode'
 
const MIG_DESIRED_AUTHMODE = 'mig_desired_auth_mode'
 

Detailed Description

Description of class class.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e

Definition at line 14 of file class.ilAuthFrontendHTTP.php.

Member Function Documentation

◆ authenticate()

ilAuthFrontendHTTP::authenticate ( )

Try authentication.

Implements ilAuthFrontendInterface.

Definition at line 16 of file class.ilAuthFrontendHTTP.php.

References PHPMailer\PHPMailer\$provider, ilAuthFrontend\getLogger(), ilAuthFrontend\getProviders(), ilAuthFrontend\getStatus(), handleAuthenticationFail(), ilAuthFrontend\handleAuthenticationSuccess(), ilAuthFrontend\resetStatus(), ilAuthStatus\STATUS_ACCOUNT_MIGRATION_REQUIRED, ilAuthStatus\STATUS_AUTHENTICATED, and ilAuthStatus\STATUS_AUTHENTICATION_FAILED.

17  {
18  foreach ($this->getProviders() as $provider) {
19  $this->resetStatus();
20 
21  $this->getLogger()->debug('Trying authentication against: ' . get_class($provider));
22 
23  $provider->doAuthentication($this->getStatus());
24 
25  $this->getLogger()->debug('Authentication user id: ' . $this->getStatus()->getAuthenticatedUserId());
26 
27  switch ($this->getStatus()->getStatus()) {
29  return $this->handleAuthenticationSuccess($provider);
30 
32  $this->getLogger()->notice("Account migration required.");
33  break;
34 
36  default:
37  $this->getLogger()->debug('Authentication failed against: ' . get_class($provider));
38  break;
39  }
40  }
41  return $this->handleAuthenticationFail();
42  }
getProviders()
Get providers.
const STATUS_AUTHENTICATION_FAILED
handleAuthenticationSuccess(ilAuthProviderInterface $provider)
Handle successful authentication.
resetStatus()
Reset status.
getLogger()
Get logger.
handleAuthenticationFail()
Draw basic auth.
const STATUS_ACCOUNT_MIGRATION_REQUIRED
+ Here is the call graph for this function:

◆ handleAuthenticationFail()

ilAuthFrontendHTTP::handleAuthenticationFail ( )
protected

Draw basic auth.

Definition at line 47 of file class.ilAuthFrontendHTTP.php.

Referenced by authenticate().

48  {
49  header("WWW-Authenticate: Basic realm=\"" . CLIENT_ID . "\"");
50  header('HTTP/1.0 401 Unauthorized');
51  }
+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: