ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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  }

Member Function Documentation

◆ __call()

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

Wrapper for all PEAR_Auth_Container methods.

Parameters

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

References $name, and initContainer().

55  {
56  return call_user_func_array(array($this->container,$name), $arguments);
57  }
+ Here is the call graph for this function:

◆ appendParameter()

ilAuthContainerDecorator::appendParameter (   $a_key,
  $a_value 
)

Add a parameter.

Used for contructor in PEAR_Auth_Container

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

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

◆ appendParameters()

ilAuthContainerDecorator::appendParameters (   $a_params)

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

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

◆ checkAuthObserver()

ilAuthContainerDecorator::checkAuthObserver (   $a_username,
  $a_auth 
)

Called from base class after call of checkAuth.

Parameters
stringusername
objectPEAR auth object

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

References $DIC, and $ilLog.

153  {
154  global $DIC;
155 
156  $ilLog = $DIC['ilLog'];
157 
158  //$ilLog->write(__METHOD__.': checkAuth called');
159 
160  return true;
161  }
global $DIC
Definition: saml.php:7

◆ failedLoginObserver()

ilAuthContainerDecorator::failedLoginObserver (   $a_username,
  $a_auth 
)

Called from base class after failed login.

Parameters
stringusername
objectPEAR auth object

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

References $_SERVER, $DIC, and $ilLog.

133  {
134  global $DIC;
135 
136  $ilLog = $DIC['ilLog'];
137 
138  $ilLog->write(
139  __METHOD__ . ': login failed for user ' . $a_username .
140  ', remote:' . $_SERVER['REMOTE_ADDR'] . ':' . $_SERVER['REMOTE_PORT'] .
141  ', server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']
142  );
143  return false;
144  }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
global $DIC
Definition: saml.php:7

◆ getAuthObject()

ilAuthContainerDecorator::getAuthObject ( )

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

References getContainer().

82  {
83  return $this->getContainer()->_auth_obj;
84  }
+ Here is the call graph for this function:

◆ getContainer()

ilAuthContainerDecorator::getContainer ( )

get pear container

Definition at line 67 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 102 of file class.ilAuthContainerDecorator.php.

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

◆ initContainer()

ilAuthContainerDecorator::initContainer ( )
abstractprotected

Init the PEAR container.

Referenced by __call().

+ Here is the caller graph for this function:

◆ loginObserver()

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

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

References $_SERVER, $DIC, and $ilLog.

114  {
115  global $DIC;
116 
117  $ilLog = $DIC['ilLog'];
118 
119  $ilLog->write(
120  __METHOD__ . ': logged in as ' . $a_username .
121  ', remote:' . $_SERVER['REMOTE_ADDR'] . ':' . $_SERVER['REMOTE_PORT'] .
122  ', server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']
123  );
124  }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
global $DIC
Definition: saml.php:7

◆ logoutObserver()

ilAuthContainerDecorator::logoutObserver (   $a_username,
  $a_auth 
)

Called from base class after logout.

Parameters
stringusername
objectPEAR auth object

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

References $_SERVER, $DIC, and $ilLog.

170  {
171  global $DIC;
172 
173  $ilLog = $DIC['ilLog'];
174 
175  $ilLog->write(
176  __METHOD__ . ': User logged out: ' . $a_username .
177  ', remote:' . $_SERVER['REMOTE_ADDR'] . ':' . $_SERVER['REMOTE_PORT'] .
178  ', server:' . $_SERVER['SERVER_ADDR'] . ':' . $_SERVER['SERVER_PORT']
179  );
180  }
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
global $DIC
Definition: saml.php:7

◆ setContainer()

ilAuthContainerDecorator::setContainer (   $a_container)

set pear container

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

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

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: