ILIAS  release_7 Revision v7.30-3-g800a261c036
ilAuthFrontendHTTP Class Reference

Description of class class. More...

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

Public Member Functions

 authenticate ()
 Try to authenticate user. 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...
 
 authenticate ()
 Try authentication. 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 to authenticate user.

Reimplemented from ilAuthFrontend.

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

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 }
handleAuthenticationFail()
Draw basic auth.
resetStatus()
Reset status.
getLogger()
Get logger.
getProviders()
Get providers.
handleAuthenticationSuccess(ilAuthProviderInterface $provider)
Handle successful authentication.
const STATUS_AUTHENTICATION_FAILED
const STATUS_ACCOUNT_MIGRATION_REQUIRED

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

+ Here is the call graph for this function:

◆ handleAuthenticationFail()

ilAuthFrontendHTTP::handleAuthenticationFail ( )
protected

Draw basic auth.

Reimplemented from ilAuthFrontend.

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

48 {
49 header("WWW-Authenticate: Basic realm=\"" . CLIENT_ID . "\"");
50 header('HTTP/1.0 401 Unauthorized');
51 }
const CLIENT_ID
Definition: constants.php:39

References CLIENT_ID.

Referenced by authenticate().

+ Here is the caller graph for this function:

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