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 104
104
"sp_type" ,
105
105
"sp_type_in_metadata" ,
106
106
"requested_attributes" ,
107
+ "requested_authn_context" ,
107
108
]
108
109
109
110
AA_IDP_ARGS = [
Original file line number Diff line number Diff line change 7
7
8
8
from saml2 import BINDING_HTTP_REDIRECT , BINDING_SOAP , BINDING_HTTP_POST
9
9
from saml2 .config import SPConfig , IdPConfig , Config
10
-
10
+ from saml2 .saml import AUTHN_PASSWORD_PROTECTED , AuthnContextClassRef
11
+ from saml2 .samlp import RequestedAuthnContext
11
12
from saml2 import logger
12
13
13
14
from pathutils import dotname , full_path
26
27
"urn:mace:example.com:saml:roland:idp" : {
27
28
'single_sign_on_service' :
28
29
{'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
+ ),
31
38
}
32
39
},
33
40
"key_file" : full_path ("test.key" ),
@@ -217,6 +224,7 @@ def test_1():
217
224
'http://localhost:8088/sso/' }}]
218
225
219
226
assert c .only_use_keys_in_metadata
227
+ assert 'PasswordProtectedTransport' in c ._sp_requested_authn_context .to_string ().decode ()
220
228
221
229
222
230
def test_2 ():
You can’t perform that action at this time.
0 commit comments