Skip to content

Commit ba1fb05

Browse files
authored
Update authn_request.py
Values can be 0,1 empty string etc when stored in the database or in data conversion it's not required to be True/False specifically
1 parent 0320fd4 commit ba1fb05

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/onelogin/saml2/authn_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ def __init__(self, settings, force_authn=False, is_passive=False, set_nameid_pol
9797
)
9898

9999
requested_authn_context_str = ""
100-
if security["requestedAuthnContext"] is not False:
100+
if not security["requestedAuthnContext"]:
101101
authn_comparison = security["requestedAuthnContextComparison"]
102102

103-
if security["requestedAuthnContext"] is True:
103+
if security["requestedAuthnContext"]:
104104
requested_authn_context_str = (
105105
""" <samlp:RequestedAuthnContext Comparison="%s">
106106
<saml:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml:AuthnContextClassRef>

0 commit comments

Comments
 (0)