mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-04-26 06:20:08 +02:00
add additional debug output when reading attributes from the IDP
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
This commit is contained in:
parent
e5ab261b48
commit
eb9f3ffb02
|
@ -627,26 +627,34 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend {
|
|||
$user = $this->userManager->get($uid);
|
||||
try {
|
||||
$newEmail = $this->getAttributeValue('saml-attribute-mapping-email_mapping', $attributes);
|
||||
$this->logger->debug('Email attribute content: {email}', ['app' => 'user_saml', 'email' => $newEmail]);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
$this->logger->debug('Failed to fetch email attribute: {exception}', ['app' => 'user_saml', 'exception' => $e->getMessage()]);
|
||||
$newEmail = null;
|
||||
}
|
||||
try {
|
||||
$newDisplayname = $this->getAttributeValue('saml-attribute-mapping-displayName_mapping', $attributes);
|
||||
$this->logger->debug('Display name attribute content: {displayName}', ['app' => 'user_saml', 'displayName' => $newDisplayname]);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
$this->logger->debug('Failed to fetch display name attribute: {exception}', ['app' => 'user_saml', 'exception' => $e->getMessage()]);
|
||||
$newDisplayname = null;
|
||||
}
|
||||
try {
|
||||
$newQuota = $this->getAttributeValue('saml-attribute-mapping-quota_mapping', $attributes);
|
||||
$this->logger->debug('Quota attribute content: {quota}', ['app' => 'user_saml', 'quota' => $newQuota]);
|
||||
if ($newQuota === '') {
|
||||
$newQuota = 'default';
|
||||
}
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
$this->logger->debug('Failed to fetch quota attribute: {exception}', ['app' => 'user_saml', 'exception' => $e->getMessage()]);
|
||||
$newQuota = null;
|
||||
}
|
||||
|
||||
try {
|
||||
$newGroups = $this->getAttributeArrayValue('saml-attribute-mapping-group_mapping', $attributes);
|
||||
$this->logger->debug('Group attribute content: {groups}', ['app' => 'user_saml', 'groups' => json_encode($newGroups)]);
|
||||
} catch (\InvalidArgumentException $e) {
|
||||
$this->logger->debug('Failed to fetch group attribute: {exception}', ['app' => 'user_saml', 'exception' => $e->getMessage()]);
|
||||
$newGroups = null;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue