ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilAuthContainerECS Class Reference

Custom PEAR Auth Container for ECS auth checks. More...

+ Inheritance diagram for ilAuthContainerECS:
+ Collaboration diagram for ilAuthContainerECS:

Public Member Functions

 __construct ($a_params)
 Constructor.
 getAbreviation ()
 get abbreviation
 getMID ()
 get mid
 fetchData ($a_username, $a_pass)
 fetch data

Protected Attributes

 $mid = null
 $abreviation = null

Private Member Functions

 initECSServices ()
 Init ECS Services private.

Detailed Description

Custom PEAR Auth Container for ECS auth checks.

Author
Stefan Meyer smeye.nosp@m.r@da.nosp@m.tabay.nosp@m..de
Version
$Id$

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

Constructor & Destructor Documentation

ilAuthContainerECS::__construct (   $a_params)

Constructor.

public

Parameters

Definition at line 46 of file class.ilAuthContainerECS.php.

References initECSServices().

{
$this->initECSServices();
}

+ Here is the call graph for this function:

Member Function Documentation

ilAuthContainerECS::fetchData (   $a_username,
  $a_pass 
)

fetch data

public

Parameters
stringusername
stringpass

Definition at line 83 of file class.ilAuthContainerECS.php.

References $_GET, $ilLog, and $res.

{
global $ilLog;
$ilLog->write(__METHOD__.': Starting ECS authentication.');
if(!$this->settings->isEnabled())
{
$ilLog->write(__METHOD__.': ECS settings .');
return false;
}
// Check if hash is valid ...
include_once('./Services/WebServices/ECS/classes/class.ilECSConnector.php');
try
{
$connector = new ilECSConnector();
$res = $connector->getAuth($_GET['ecs_hash']);
$auths = $res->getResult();
$this->mid = $auths[0]->mid;
$ilLog->write(__METHOD__.': Got mid: '.$this->mid);
$this->abreviation = $auths[0]->abr;
$ilLog->write(__METHOD__.': Got abr: '.$this->abreviation);
/*
// Read abbreviation from mid
$res = $connector->getMemberships($this->mid);
$member = $res->getResult();
$this->abbreviation = $member[0]->participants[0]->abr;
*/
return true;
}
{
$ilLog->write(__METHOD__.': Authentication failed with message: '.$e->getMessage());
return false;
}
}
ilAuthContainerECS::getAbreviation ( )

get abbreviation

public

Parameters

Definition at line 59 of file class.ilAuthContainerECS.php.

References $abreviation.

{
}
ilAuthContainerECS::getMID ( )

get mid

public

Definition at line 69 of file class.ilAuthContainerECS.php.

References $mid.

{
return $this->mid;
}
ilAuthContainerECS::initECSServices ( )
private

Init ECS Services private.

Parameters

Definition at line 128 of file class.ilAuthContainerECS.php.

References ilECSSettings\_getInstance().

Referenced by __construct().

{
include_once('./Services/WebServices/ECS/classes/class.ilECSSettings.php');
$this->settings = ilECSSettings::_getInstance();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilAuthContainerECS::$abreviation = null
protected

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

Referenced by getAbreviation().

ilAuthContainerECS::$mid = null
protected

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

Referenced by getMID().


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