[idp] Handle adding of attributes with a friendly name
This commit is contained in:
parent
3a2c6b370f
commit
c373be9eca
|
@ -150,6 +150,11 @@ def saml2_add_attribute_values(assertion, attributes):
|
|||
name, format = key
|
||||
attribute.nameFormat = format
|
||||
values = attributes[(name, format)]
|
||||
elif type(key) is tuple and len(key) == 3:
|
||||
name, format, nickname = key
|
||||
attribute.nameFormat = format
|
||||
attribute.friendlyName = nickname
|
||||
values = attributes[(name, format, nickname)]
|
||||
elif type(key) is tuple:
|
||||
return
|
||||
else:
|
||||
|
|
|
@ -14,9 +14,9 @@ Expect a dictionnaries as return with:
|
|||
- the attributes to add to the response e.g.
|
||||
- dic = {}
|
||||
- attributes = {}
|
||||
- values = [value1, value2]
|
||||
- attributes[name] = values
|
||||
- attributes[(name, format)] = values
|
||||
- attributes[name] = (value1, value2, )
|
||||
- attributes[(name, format)] = (value1, value2, )
|
||||
- attributes[(name, format, nickname)] = (value1, value2, )
|
||||
- dic['attributes'] = attributes
|
||||
- return dic
|
||||
'''
|
||||
|
|
Loading…
Reference in New Issue