Skip to content

Commit f167c65

Browse files
Merge pull request #134 from jkakavas/fix_scope_processor
Allow scope processor to handle multi-valued attributes
2 parents fe7a267 + 6ee111a commit f167c65

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/satosa/micro_services/processors/scope_processor.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,8 @@ 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+
attributes[attribute] = list(v + '@' + scope for v in values)

0 commit comments

Comments
 (0)