ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilAuthContainerDecorator Class Reference

Abstract decorator for PEAR::Auth Base class for all Ilias Authentication classes. More...

+ Collaboration diagram for ilAuthContainerDecorator:

Public Member Functions

 __construct ()
 Constructor. More...
 
 __call ($name, $arguments)
 Wrapper for all PEAR_Auth_Container methods. More...
 
 getContainer ()
 get pear container More...
 
 setContainer ($a_container)
 set pear container More...
 
 getAuthObject ()
 
 appendParameter ($a_key, $a_value)
 Add a parameter. More...
 
 appendParameters ($a_params)
 
 getParameters ()
 get auth container parameters More...
 
 loginObserver ($a_username, $a_auth)
 
 failedLoginObserver ($a_username, $a_auth)
 Called from base class after failed login. More...
 
 checkAuthObserver ($a_username, $a_auth)
 Called from base class after call of checkAuth. More...
 
 logoutObserver ($a_username, $a_auth)
 Called from base class after logout. More...
 

Protected Member Functions

 initContainer ()
 Init the PEAR container. More...
 

Protected Attributes

 $parameter = array()
 

Private Attributes

 $container = null
 

Detailed Description

Abstract decorator for PEAR::Auth Base class for all Ilias Authentication classes.

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 34 of file class.ilAuthContainerDecorator.php.

Constructor & Destructor Documentation

◆ __construct()

ilAuthContainerDecorator::__construct ( )

Constructor.

Parameters

Definition at line 43 of file class.ilAuthContainerDecorator.php.

44 {
45
46 }

Member Function Documentation

◆ __call()

ilAuthContainerDecorator::__call (   $name,
  $arguments 
)
final

Wrapper for all PEAR_Auth_Container methods.

Parameters

return

Definition at line 55 of file class.ilAuthContainerDecorator.php.

56 {
57 return call_user_func_array(array($this->container,$name),$arguments);
58 }

◆ appendParameter()

ilAuthContainerDecorator::appendParameter (   $a_key,
  $a_value 
)

Add a parameter.

Used for contructor in PEAR_Auth_Container

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

91 {
92 $this->parameter[$a_key] = $a_value;
93 }

◆ appendParameters()

ilAuthContainerDecorator::appendParameters (   $a_params)

Definition at line 95 of file class.ilAuthContainerDecorator.php.

96 {
97 $this->parameter = array_merge($this->parameter,$a_params);
98 }

◆ checkAuthObserver()

ilAuthContainerDecorator::checkAuthObserver (   $a_username,
  $a_auth 
)

Called from base class after call of checkAuth.

Parameters
stringusername
objectPEAR auth object

Definition at line 147 of file class.ilAuthContainerDecorator.php.

148 {
149 global $ilLog;
150
151 //$ilLog->write(__METHOD__.': checkAuth called');
152
153 return true;
154 }

References $ilLog.

◆ failedLoginObserver()

ilAuthContainerDecorator::failedLoginObserver (   $a_username,
  $a_auth 
)

Called from base class after failed login.

Parameters
stringusername
objectPEAR auth object

Definition at line 130 of file class.ilAuthContainerDecorator.php.

131 {
132 global $ilLog;
133
134 $ilLog->write(__METHOD__.': login failed for user '.$a_username.
135 ', remote:'.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REMOTE_PORT'].
136 ', server:'.$_SERVER['SERVER_ADDR'].':'.$_SERVER['SERVER_PORT']
137 );
138 return false;
139 }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']

References $_SERVER, and $ilLog.

◆ getAuthObject()

ilAuthContainerDecorator::getAuthObject ( )

Definition at line 82 of file class.ilAuthContainerDecorator.php.

83 {
84 return $this->getContainer()->_auth_obj;
85 }

References getContainer().

+ Here is the call graph for this function:

◆ getContainer()

ilAuthContainerDecorator::getContainer ( )

get pear container

Definition at line 68 of file class.ilAuthContainerDecorator.php.

References $container.

Referenced by getAuthObject().

+ Here is the caller graph for this function:

◆ getParameters()

ilAuthContainerDecorator::getParameters ( )

get auth container parameters

Definition at line 103 of file class.ilAuthContainerDecorator.php.

104 {
105 return $this->parameter ? $this->parameter : array();
106 }

◆ initContainer()

ilAuthContainerDecorator::initContainer ( )
abstractprotected

Init the PEAR container.

◆ loginObserver()

ilAuthContainerDecorator::loginObserver (   $a_username,
  $a_auth 
)
Returns
Parameters
object$a_username
object$a_auth

Definition at line 114 of file class.ilAuthContainerDecorator.php.

115 {
116 global $ilLog;
117
118 $ilLog->write(__METHOD__.': logged in as '.$a_username.
119 ', remote:'.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REMOTE_PORT'].
120 ', server:'.$_SERVER['SERVER_ADDR'].':'.$_SERVER['SERVER_PORT']
121 );
122 }

References $_SERVER, and $ilLog.

◆ logoutObserver()

ilAuthContainerDecorator::logoutObserver (   $a_username,
  $a_auth 
)

Called from base class after logout.

Parameters
stringusername
objectPEAR auth object

Definition at line 162 of file class.ilAuthContainerDecorator.php.

163 {
164 global $ilLog;
165
166 $ilLog->write(__METHOD__.': User logged out: '.$a_username.
167 ', remote:'.$_SERVER['REMOTE_ADDR'].':'.$_SERVER['REMOTE_PORT'].
168 ', server:'.$_SERVER['SERVER_ADDR'].':'.$_SERVER['SERVER_PORT']
169 );
170 }

References $_SERVER, and $ilLog.

◆ setContainer()

ilAuthContainerDecorator::setContainer (   $a_container)

set pear container

Definition at line 76 of file class.ilAuthContainerDecorator.php.

77 {
78 $this->container = $a_container;
79 }

Field Documentation

◆ $container

ilAuthContainerDecorator::$container = null
private

Definition at line 36 of file class.ilAuthContainerDecorator.php.

Referenced by getContainer().

◆ $parameter

ilAuthContainerDecorator::$parameter = array()
protected

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


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