mirror of
https://github.com/ansible/awx.git
synced 2026-01-22 23:18:03 -03:30
Merge pull request #39 from puiterwijk/fix-nameid
Fix using SAML NameID
This commit is contained in:
commit
33c0f8c721
@ -241,7 +241,9 @@ class TowerSAMLIdentityProvider(BaseSAMLIdentityProvider):
|
||||
another attribute to use.
|
||||
"""
|
||||
key = self.conf.get(conf_key, default_attribute)
|
||||
value = attributes[key][0] if key in attributes else None
|
||||
value = attributes[key] if key in attributes else None
|
||||
if isinstance(value, list):
|
||||
value = value[0]
|
||||
if conf_key in ('attr_first_name', 'attr_last_name', 'attr_username', 'attr_email') and value is None:
|
||||
logger.warn("Could not map user detail '%s' from SAML attribute '%s'; "
|
||||
"update SOCIAL_AUTH_SAML_ENABLED_IDPS['%s']['%s'] with the correct SAML attribute.",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user