File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 104104 "sp_type" ,
105105 "sp_type_in_metadata" ,
106106 "requested_attributes" ,
107+ "requested_authn_context" ,
107108]
108109
109110AA_IDP_ARGS = [
Original file line number Diff line number Diff line change 77
88from saml2 import BINDING_HTTP_REDIRECT , BINDING_SOAP , BINDING_HTTP_POST
99from saml2 .config import SPConfig , IdPConfig , Config
10-
10+ from saml2 .saml import AUTHN_PASSWORD_PROTECTED , AuthnContextClassRef
11+ from saml2 .samlp import RequestedAuthnContext
1112from saml2 import logger
1213
1314from pathutils import dotname , full_path
2627 "urn:mace:example.com:saml:roland:idp" : {
2728 'single_sign_on_service' :
2829 {'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect' :
29- 'http://localhost:8088/sso/' }},
30- }
30+ 'http://localhost:8088/sso/' }},
31+ },
32+ "requested_authn_context" : RequestedAuthnContext (
33+ authn_context_class_ref = [
34+ AuthnContextClassRef (AUTHN_PASSWORD_PROTECTED ),
35+ ],
36+ comparison = "exact" ,
37+ ),
3138 }
3239 },
3340 "key_file" : full_path ("test.key" ),
@@ -217,6 +224,7 @@ def test_1():
217224 'http://localhost:8088/sso/' }}]
218225
219226 assert c .only_use_keys_in_metadata
227+ assert 'PasswordProtectedTransport' in c ._sp_requested_authn_context .to_string ().decode ()
220228
221229
222230def test_2 ():
You can’t perform that action at this time.
0 commit comments