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.
47 {
48 parent::__construct(
$config, $reserved);
49 assert('is_array($config)');
50
52
53 $this->scopeAttribute =
$config->getString(
'scopeAttribute');
54 $this->sourceAttribute =
$config->getString(
'sourceAttribute');
55 $this->targetAttribute =
$config->getString(
'targetAttribute');
56 $this->onlyIfEmpty =
$config->getBoolean(
'onlyIfEmpty',
false);
57 }
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 65 of file ScopeAttribute.php.
65 {
66 assert('is_array($request)');
67 assert('array_key_exists("Attributes", $request)');
68
70
72 return;
73 }
74
76 return;
77 }
78
81 }
82
83 if ($this->onlyIfEmpty and count(
$attributes[$this->targetAttribute]) > 0) {
84 return;
85 }
86
87 foreach (
$attributes[$this->scopeAttribute] as $scope) {
88
89 if (strpos($scope, '@') !== FALSE) {
90 $scope = explode('@', $scope, 2);
91 $scope = $scope[1];
92 }
93
94 foreach (
$attributes[$this->sourceAttribute] as $value) {
95 $value = $value . '@' . $scope;
96
97 if (in_array($value,
$attributes[$this->targetAttribute], TRUE)) {
98
99 continue;
100 }
101
103 }
104 }
105
106 }
References $attributes, 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