ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAuthBase Class Reference

Base class for all PEAR and ILIAS auth classes. More...

+ Inheritance diagram for ilAuthBase:
+ Collaboration diagram for ilAuthBase:

Public Member Functions

 supportRedirects ()
 Returns true, if the current auth mode allows redirects to e.g the login screen, public section ...
 getContainer ()
 Get container object.

Protected Member Functions

 initAuth ()
 Init auth object Enable logging, set callbacks...
 loginObserver ($a_username, $a_auth)
 Called after successful login.
 failedLoginObserver ($a_username, $a_auth)
 Called after failed login.
 checkAuthObserver ($a_username, $a_auth)
 Called after each check auth request.
 logoutObserver ($a_username, $a_auth)
 Called after logout.

Protected Attributes

 $sub_status = null

Detailed Description

Base class for all PEAR and ILIAS auth classes.

Enables logging, observers.

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

Definition at line 33 of file class.ilAuthBase.php.

Member Function Documentation

ilAuthBase::checkAuthObserver (   $a_username,
  $a_auth 
)
protected

Called after each check auth request.

Returns
Parameters
array$a_username
object$a_auth

Definition at line 133 of file class.ilAuthBase.php.

References getContainer().

{
#$GLOBALS['ilLog']->write(__METHOD__.': Check auth observer called');
return $this->getContainer()->checkAuthObserver($a_username,$a_auth);
}

+ Here is the call graph for this function:

ilAuthBase::failedLoginObserver (   $a_username,
  $a_auth 
)
protected

Called after failed login.

Returns
Parameters
array$a_username
object$a_auth

Reimplemented in ilAuthHTTP.

Definition at line 116 of file class.ilAuthBase.php.

References $ilLog, and getContainer().

{
global $ilLog;
$ilLog->write(__METHOD__.': login failed for user '.$a_username.
', remote:'.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REMOTE_PORT'].
', server:'.$_SERVER['SERVER_ADDR'].':'.$_SERVER['SERVER_PORT']
);
return $this->getContainer()->failedLoginObserver($a_username,$a_auth);
}

+ Here is the call graph for this function:

ilAuthBase::getContainer ( )
final

Get container object.

Returns
object ilAuthContainerBase

Definition at line 53 of file class.ilAuthBase.php.

Referenced by checkAuthObserver(), failedLoginObserver(), loginObserver(), and logoutObserver().

{
return $this->storage;
}

+ Here is the caller graph for this function:

ilAuthBase::initAuth ( )
finalprotected

Init auth object Enable logging, set callbacks...

Returns
void

Definition at line 63 of file class.ilAuthBase.php.

References $GLOBALS, AUTH_LOG_INFO, and ilSessionControl\initSession().

Referenced by ilAuthOpenId\__construct(), ilAuthCAS\__construct(), ilAuthSOAP\__construct(), ilAuthWeb\__construct(), ilAuthHTTP\__construct(), ilAuthCalendarToken\__construct(), ilAuthCron\__construct(), ilAuthApache\__construct(), and ilAuthECS\__construct().

{
//$this->enableLogging = true;
$this->enableLogging = false;
if ($this->enableLogging)
{
$GLOBALS['ilLog']->write(__METHOD__.': Init callbacks');
}
$this->setLoginCallback(array($this,'loginObserver'));
$this->setFailedLoginCallback(array($this,'failedLoginObserver'));
$this->setCheckAuthCallback(array($this,'checkAuthObserver'));
$this->setLogoutCallback(array($this,'logoutObserver'));
include_once('Services/Authentication/classes/class.ilAuthLogObserver.php');
$this->attachLogObserver(new ilAuthLogObserver(AUTH_LOG_INFO));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilAuthBase::loginObserver (   $a_username,
  $a_auth 
)
protected

Called after successful login.

Returns
Parameters
array$a_username
object$a_auth

Definition at line 90 of file class.ilAuthBase.php.

References $ilLog, getContainer(), and ilSessionControl\handleLoginEvent().

{
ilSessionControl::handleLoginEvent($a_username, $a_auth);
global $ilLog, $ilAppEventHandler;
if($this->getContainer()->loginObserver($a_username,$a_auth))
{
$ilAppEventHandler->raise("Services/Authentication", "afterLogin",
array("username" => $a_auth->getUsername()));
$ilLog->write(__METHOD__.': logged in as '.$a_auth->getUsername().
', remote:'.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REMOTE_PORT'].
', server:'.$_SERVER['SERVER_ADDR'].':'.$_SERVER['SERVER_PORT']
);
}
}

+ Here is the call graph for this function:

ilAuthBase::logoutObserver (   $a_username,
  $a_auth 
)
protected

Called after logout.

Returns
Parameters
array$a_username
object$a_auth

Definition at line 145 of file class.ilAuthBase.php.

References $GLOBALS, getContainer(), and ilSessionControl\handleLogoutEvent().

{
$GLOBALS['ilLog']->write(__METHOD__.': Logout observer called');
$this->getContainer()->logoutObserver($a_username,$a_auth);
}

+ Here is the call graph for this function:

ilAuthBase::supportRedirects ( )

Returns true, if the current auth mode allows redirects to e.g the login screen, public section ...

Returns

Definition at line 44 of file class.ilAuthBase.php.

{
return true;
}

Field Documentation

ilAuthBase::$sub_status = null
protected

Definition at line 37 of file class.ilAuthBase.php.


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