Skip to content

Commit cf7b831

Browse files
author
Roland Hedberg
committed
Merge pull request #177 from tpazderka/Requested_authn_context-from-list
Requested_authn_context from list
2 parents 6f0ff86 + ac91a1b commit cf7b831

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/saml2/authn_context/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ def authn_context_class_ref(ref):
215215

216216

217217
def requested_authn_context(class_ref, comparison="minimum"):
218+
if not isinstance(class_ref, list):
219+
class_ref = [class_ref]
218220
return RequestedAuthnContext(
219-
authn_context_class_ref=[AuthnContextClassRef(text=class_ref)],
221+
authn_context_class_ref=[AuthnContextClassRef(text=i) for i in class_ref],
220222
comparison=comparison)

0 commit comments

Comments
 (0)