ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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, array, and initContainer().

55  {
56  return call_user_func_array(array($this->container,$name), $arguments);
57  }
if($format !==null) $name
Definition: metadata.php:146
Create styles array
The data for the language used.
+ 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 148 of file class.ilAuthContainerDecorator.php.

References $ilLog.

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

◆ 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.

References $_SERVER, and $ilLog.

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

◆ 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.

References array.

103  {
104  return $this->parameter ? $this->parameter : array();
105  }
Create styles array
The data for the language used.

◆ 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, and $ilLog.

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

◆ logoutObserver()

ilAuthContainerDecorator::logoutObserver (   $a_username,
  $a_auth 
)

Called from base class after logout.

Parameters
stringusername
objectPEAR auth object

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

References $_SERVER, and $ilLog.

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

◆ 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: