File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change 2
2
# -*- coding: utf-8 -*-
3
3
4
4
from contextlib import closing
5
+ from saml2 .attribute_converter import to_local
6
+ from saml2 .samlp import response_from_string
5
7
6
8
from saml2 import config
7
9
from saml2 .authn_context import INTERNETPROTOCOLPASSWORD
@@ -112,7 +114,25 @@ def test_false_sign(self):
112
114
else :
113
115
assert False
114
116
117
+ def test_other_response (self ):
118
+ xml_response = open ("attribute_response.xml" ).read ()
119
+ resp = response_factory (
120
+ xml_response , self .conf ,
121
+ return_addrs = ['https://myreviewroom.com/saml2/acs/' ],
122
+ outstanding_queries = {'id-f4d370f3d03650f3ec0da694e2348bfe' :
123
+ "http://localhost:8088/sso" },
124
+ timeslack = TIMESLACK , decode = False )
125
+
126
+ assert isinstance (resp , StatusResponse )
127
+ assert isinstance (resp , AuthnResponse )
128
+ resp .sec .only_use_keys_in_metadata = False
129
+ resp .parse_assertion ()
130
+ si = resp .session_info ()
131
+ assert si
132
+ print si ["ava" ]
133
+
134
+
115
135
if __name__ == "__main__" :
116
136
t = TestResponse ()
117
137
t .setup_class ()
118
- t .test_false_sign ()
138
+ t .test_other_response ()
You can’t perform that action at this time.
0 commit comments