Definition at line 9 of file AttributeLimit.php.
◆ __construct()
sspmod_core_Auth_Process_AttributeLimit::__construct |
( |
|
$config, |
|
|
|
$reserved |
|
) |
| |
Initialize this filter.
@param array $config Configuration information about this filter.
@param mixed $reserved For future use
- Exceptions
-
Definition at line 32 of file AttributeLimit.php.
32 {
33 parent::__construct(
$config, $reserved);
34
35 assert('is_array($config)');
36
38 if (
$index ===
'default') {
39 $this->isDefault = (bool)$value;
40 } elseif (is_int(
$index)) {
41 if (!is_string($value)) {
43 var_export($value, TRUE));
44 }
45 $this->allowedAttributes[] = $value;
46 } elseif (is_string(
$index)) {
47 if (!is_array($value)) {
49 ' must be specified in an array.');
50 }
51 $this->allowedAttributes[
$index] = $value;
52 } else {
54 }
55 }
56 }
References $config, and $index.
◆ getSPIdPAllowed()
static sspmod_core_Auth_Process_AttributeLimit::getSPIdPAllowed |
( |
array & |
$request | ) |
|
|
staticprivate |
Get list of allowed from the SP/IdP config.
- Parameters
-
array | &$request | The current request. |
- Returns
- array|NULL Array with attribute names, or NULL if no limit is placed.
Definition at line 65 of file AttributeLimit.php.
65 {
66
67 if (array_key_exists('attributes', $request['Destination'])) {
68
69 return $request['Destination']['attributes'];
70 }
71 if (array_key_exists('attributes', $request['Source'])) {
72
73 return $request['Source']['attributes'];
74 }
75 return NULL;
76 }
Referenced by process().
◆ process()
sspmod_core_Auth_Process_AttributeLimit::process |
( |
& |
$request | ) |
|
Apply filter to remove attributes.
Removes all attributes which aren't one of the allowed attributes.
@param array &$request The current request
- Exceptions
-
Reimplemented from SimpleSAML_Auth_ProcessingFilter.
Definition at line 87 of file AttributeLimit.php.
87 {
88 assert('is_array($request)');
89 assert('array_key_exists("Attributes", $request)');
90
91 if ($this->isDefault) {
95 }
96 } elseif (!empty($this->allowedAttributes)) {
98 } else {
101 return;
102 }
103 }
104
106
109
111
114 ' must be specified in an array.');
115 }
118 continue;
119 }
120 }
122 }
123 }
124
125 }
static getSPIdPAllowed(array &$request)
Get list of allowed from the SP/IdP config.
$allowedAttributes
List of attributes which this filter will allow through.
References $allowedAttributes, $attributes, $name, and getSPIdPAllowed().
◆ $allowedAttributes
sspmod_core_Auth_Process_AttributeLimit::$allowedAttributes = array() |
|
private |
◆ $isDefault
sspmod_core_Auth_Process_AttributeLimit::$isDefault = FALSE |
|
private |
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/modules/core/lib/Auth/Process/AttributeLimit.php