ILIAS  Release_4_0_x_branch Revision 61816
 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 124 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

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

References $ilLog, and getContainer().

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

+ 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, and AUTH_LOG_INFO.

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

{
$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));
$this->enableLogging = true;
}

+ 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 83 of file class.ilAuthBase.php.

References $ilLog, and getContainer().

{
global $ilLog, $ilAppEventHandler;
if($this->getContainer()->loginObserver($a_username,$a_auth))
{
$ilAppEventHandler->raise("Services/Authentication", "afterLogin",
array("user_name" => $a_username));
$ilLog->write(__METHOD__.': logged in as '.$a_username.
', 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 136 of file class.ilAuthBase.php.

References $GLOBALS, and getContainer().

{
$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: