Skip to content

Commit 7755dda

Browse files
author
Ioannis Kakavas
committed
Allow scope processor to handle multivalued attributes
1 parent 0b2928d commit 7755dda

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/satosa/micro_services/processors/scope_processor.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,11 @@ def process(self, internal_data, attribute, **kwargs):
1313
raise AttributeProcessorError("No scope set.")
1414

1515
attributes = internal_data.attributes
16-
value = attributes.get(attribute, [None])[0]
17-
attributes[attribute][0] = value + '@' + scope
16+
values = attributes.get(attribute, [])
17+
if not isinstance(values, list):
18+
values = [values]
19+
if values:
20+
new_values=[]
21+
for value in values:
22+
new_values.append(value + '@' + scope)
23+
attributes[attribute] = new_values

0 commit comments

Comments
 (0)