|
@@ -77,14 +77,14 @@ discard block |
|
|
block discarded – undo |
|
77
|
77
|
/* |
|
78
|
78
|
* Generate identifiers and hashes |
|
79
|
79
|
*/ |
|
80
|
|
- $destination = $sp_metadata['metadata-set'] . '|' . $sp_entityid; |
|
|
80
|
+ $destination = $sp_metadata['metadata-set'].'|'.$sp_entityid; |
|
81
|
81
|
|
|
82
|
82
|
$targeted_id = \SimpleSAML\Module\consent\Auth\Process\Consent::getTargetedID($userid, $source, $destination); |
|
83
|
83
|
$attribute_hash = \SimpleSAML\Module\consent\Auth\Process\Consent::getAttributeHash($attributes, $hashAttributes); |
|
84
|
84
|
|
|
85
|
|
- \SimpleSAML\Logger::info('consentAdmin: user: ' . $userid); |
|
86
|
|
- \SimpleSAML\Logger::info('consentAdmin: target: ' . $targeted_id); |
|
87
|
|
- \SimpleSAML\Logger::info('consentAdmin: attribute: ' . $attribute_hash); |
|
|
85
|
+ \SimpleSAML\Logger::info('consentAdmin: user: '.$userid); |
|
|
86
|
+ \SimpleSAML\Logger::info('consentAdmin: target: '.$targeted_id); |
|
|
87
|
+ \SimpleSAML\Logger::info('consentAdmin: attribute: '.$attribute_hash); |
|
88
|
88
|
|
|
89
|
89
|
// Return values |
|
90
|
90
|
return [$targeted_id, $attribute_hash, $attributes]; |
|
@@ -126,10 +126,10 @@ discard block |
|
|
block discarded – undo |
|
126
|
126
|
// Calc correct source |
|
127
|
127
|
if ($as->getAuthData('saml:sp:IdP') !== null) { |
|
128
|
128
|
// from a remote idp (as bridge) |
|
129
|
|
- $source = 'saml20-idp-remote|' . $as->getAuthData('saml:sp:IdP'); |
|
|
129
|
+ $source = 'saml20-idp-remote|'.$as->getAuthData('saml:sp:IdP'); |
|
130
|
130
|
} else { |
|
131
|
131
|
// from the local idp |
|
132
|
|
- $source = $idp_metadata['metadata-set'] . '|' . $idp_entityid; |
|
|
132
|
+ $source = $idp_metadata['metadata-set'].'|'.$idp_entityid; |
|
133
|
133
|
} |
|
134
|
134
|
|
|
135
|
135
|
// Get user ID |
|
@@ -142,8 +142,8 @@ discard block |
|
|
block discarded – undo |
|
142
|
142
|
$userids = $attributes[$userid_attributename]; |
|
143
|
143
|
|
|
144
|
144
|
if (empty($userids)) { |
|
145
|
|
- throw new \Exception('Could not generate useridentifier for storing consent. Attribute [' . |
|
146
|
|
- $userid_attributename . '] was not available.'); |
|
|
145
|
+ throw new \Exception('Could not generate useridentifier for storing consent. Attribute ['. |
|
|
146
|
+ $userid_attributename.'] was not available.'); |
|
147
|
147
|
} |
|
148
|
148
|
|
|
149
|
149
|
$userid = $userids[0]; |
|
@@ -161,7 +161,7 @@ discard block |
|
|
block discarded – undo |
|
161
|
161
|
$action = $_GET["action"]; |
|
162
|
162
|
} |
|
163
|
163
|
|
|
164
|
|
-\SimpleSAML\Logger::critical('consentAdmin: sp: ' . $sp_entityid . ' action: ' . $action); |
|
|
164
|
+\SimpleSAML\Logger::critical('consentAdmin: sp: '.$sp_entityid.' action: '.$action); |
|
165
|
165
|
|
|
166
|
166
|
// Remove services, whitch have consent disabled |
|
167
|
167
|
if (isset($idp_metadata['consent.disable'])) { |
|
@@ -172,7 +172,7 @@ discard block |
|
|
block discarded – undo |
|
172
|
172
|
} |
|
173
|
173
|
} |
|
174
|
174
|
|
|
175
|
|
-\SimpleSAML\Logger::info('consentAdmin: ' . $idp_entityid); |
|
|
175
|
+\SimpleSAML\Logger::info('consentAdmin: '.$idp_entityid); |
|
176
|
176
|
|
|
177
|
177
|
// Parse consent config |
|
178
|
178
|
$consent_storage = \SimpleSAML\Module\consent\Store::parseStoreConfig($cA_config->getValue('consentadmin')); |
|
@@ -265,8 +265,8 @@ discard block |
|
|
block discarded – undo |
|
265
|
265
|
|
|
266
|
266
|
// Translate attribute-names |
|
267
|
267
|
foreach ($attributes_new as $orig_name => $value) { |
|
268
|
|
- if (isset($template->data['attribute_' . htmlspecialchars(strtolower($orig_name))])) { |
|
269
|
|
- $old_name = $template->data['attribute_' . htmlspecialchars(strtolower($orig_name))]; |
|
|
268
|
+ if (isset($template->data['attribute_'.htmlspecialchars(strtolower($orig_name))])) { |
|
|
269
|
+ $old_name = $template->data['attribute_'.htmlspecialchars(strtolower($orig_name))]; |
|
270
|
270
|
} |
|
271
|
271
|
$name = $translator->getAttributeTranslation(strtolower($orig_name)); // translate |
|
272
|
272
|
|