Definition at line 8 of file ScopeAttribute.php.
◆ __construct()
sspmod_core_Auth_Process_ScopeAttribute::__construct |
( |
|
$config, |
|
|
|
$reserved |
|
) |
| |
Initialize this filter, parse configuration.
- Parameters
-
array | $config | Configuration information about this filter. |
mixed | $reserved | For future use. |
Definition at line 47 of file ScopeAttribute.php.
48 {
49 parent::__construct(
$config, $reserved);
51
53
54 $this->scopeAttribute =
$config->getString(
'scopeAttribute');
55 $this->sourceAttribute =
$config->getString(
'sourceAttribute');
56 $this->targetAttribute =
$config->getString(
'targetAttribute');
57 $this->onlyIfEmpty =
$config->getBoolean(
'onlyIfEmpty',
false);
58 }
static loadFromArray($config, $location='[ARRAY]', $instance=null)
Loads a configuration from the given array.
References $config, and SimpleSAML_Configuration\loadFromArray().
◆ process()
sspmod_core_Auth_Process_ScopeAttribute::process |
( |
& |
$request | ) |
|
Apply this filter to the request.
- Parameters
-
array | &$request | The current request |
Reimplemented from SimpleSAML_Auth_ProcessingFilter.
Definition at line 66 of file ScopeAttribute.php.
67 {
69 assert(array_key_exists(
'Attributes',
$request));
70
72
74 return;
75 }
76
78 return;
79 }
80
83 }
84
85 if ($this->onlyIfEmpty && count(
$attributes[$this->targetAttribute]) > 0) {
86 return;
87 }
88
89 foreach (
$attributes[$this->scopeAttribute] as $scope) {
90 if (strpos($scope, '@') !== false) {
91 $scope = explode('@', $scope, 2);
92 $scope = $scope[1];
93 }
94
95 foreach (
$attributes[$this->sourceAttribute] as $value) {
96 $value = $value . '@' . $scope;
97
98 if (in_array($value,
$attributes[$this->targetAttribute],
true)) {
99
100 continue;
101 }
102
104 }
105 }
106 }
foreach($paths as $path) $request
if(array_key_exists('yes', $_REQUEST)) $attributes
References $attributes, $request, and $targetAttribute.
◆ $onlyIfEmpty
sspmod_core_Auth_Process_ScopeAttribute::$onlyIfEmpty = false |
|
private |
◆ $scopeAttribute
sspmod_core_Auth_Process_ScopeAttribute::$scopeAttribute |
|
private |
◆ $sourceAttribute
sspmod_core_Auth_Process_ScopeAttribute::$sourceAttribute |
|
private |
◆ $targetAttribute
sspmod_core_Auth_Process_ScopeAttribute::$targetAttribute |
|
private |
The documentation for this class was generated from the following file:
- libs/composer/vendor/simplesamlphp/simplesamlphp/modules/core/lib/Auth/Process/ScopeAttribute.php