ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
sspmod_core_Auth_Process_AttributeRealm Class Reference
+ Inheritance diagram for sspmod_core_Auth_Process_AttributeRealm:
+ Collaboration diagram for sspmod_core_Auth_Process_AttributeRealm:

Public Member Functions

 __construct ($config, $reserved)
 Initialize this filter. More...
 
 process (&$request)
 Apply filter to add or replace attributes. More...
 
- Public Member Functions inherited from SimpleSAML_Auth_ProcessingFilter
 __construct (&$config, $reserved)
 Constructor for a processing filter. More...
 
 process (&$request)
 Process a request. More...
 

Private Attributes

 $attributename = 'realm'
 

Additional Inherited Members

- Data Fields inherited from SimpleSAML_Auth_ProcessingFilter
 $priority = 50
 Priority of this filter. More...
 

Detailed Description

Definition at line 11 of file AttributeRealm.php.

Constructor & Destructor Documentation

◆ __construct()

sspmod_core_Auth_Process_AttributeRealm::__construct (   $config,
  $reserved 
)

Initialize this filter.

Parameters
array$configConfiguration information about this filter.
mixed$reservedFor future use.

Definition at line 21 of file AttributeRealm.php.

21 {
22 parent::__construct($config, $reserved);
23 assert('is_array($config)');
24
25 if (array_key_exists('attributename', $config))
26 $this->attributename = $config['attributename'];
27
28 }

References $config.

Member Function Documentation

◆ process()

sspmod_core_Auth_Process_AttributeRealm::process ( $request)

Apply filter to add or replace attributes.

Add or replace existing attributes with the configured values.

Parameters
array&$requestThe current request

Reimplemented from SimpleSAML_Auth_ProcessingFilter.

Definition at line 37 of file AttributeRealm.php.

37 {
38 assert('is_array($request)');
39 assert('array_key_exists("Attributes", $request)');
40
41 $attributes =& $request['Attributes'];
42
43 if (!array_key_exists('UserID', $request)) {
44 throw new Exception('core:AttributeRealm: Missing UserID for this user. Please' .
45 ' check the \'userid.attribute\' option in the metadata against the' .
46 ' attributes provided by the authentication source.');
47 }
48 $userID = $request['UserID'];
49 $decomposed = explode('@', $userID);
50 if (count($decomposed) !== 2) return;
51 $request['Attributes'][$this->attributename] = array($decomposed[1]);
52 }
$attributes

References $attributename, and $attributes.

Field Documentation

◆ $attributename

sspmod_core_Auth_Process_AttributeRealm::$attributename = 'realm'
private

Definition at line 13 of file AttributeRealm.php.

Referenced by process().


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