account for itsme maybe returning empty SAML attributes (#45925)

This commit is contained in:
Frédéric Péters 2020-08-17 14:31:25 +02:00
parent ab45daab71
commit 08412e9e86
1 changed files with 29 additions and 27 deletions

View File

@ -167,6 +167,8 @@ class AuthenticAdapter(DefaultAdapter):
user.is_active = False
user.save()
nrn = None
if saml_attributes.get('egovNRN'):
nrn = saml_attributes['egovNRN'][0]
for attr_name in ('niss', 'nrn'):
try: