File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
tests/src/OneLogin/saml2_tests Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -756,6 +756,23 @@ def testGetFriendlyAttributes(self):
756756 response_6 = OneLogin_Saml2_Response (settings , xml_5 )
757757 self .assertEqual (expected_attributes , response_6 .get_friendlyname_attributes ())
758758
759+ def testGetEncryptedAttributes (self ):
760+ """
761+ Tests the get_attributes method of the OneLogin_Saml2_Response with an encrypted response
762+ """
763+ settings = OneLogin_Saml2_Settings (self .loadSettingsJSON ('settings8.json' ))
764+ xml = self .file_contents (join (self .data_path , 'responses' ,
765+ 'signed_message_encrypted_assertion2.xml.base64' ))
766+ response = OneLogin_Saml2_Response (settings , xml )
767+ self .assertEqual ({
768+ 'uid' : ['smartin' ],
769+ 'mail' : ['smartin@yaco.es' ],
770+ 'cn' : ['Sixto3' ],
771+ 'sn' : ['Martin2' ],
772+ 'phone' : [],
773+ 'eduPersonAffiliation' : ['user' , 'admin' ],
774+ }, response .get_attributes ())
775+
759776 def testGetNestedNameIDAttributes (self ):
760777 """
761778 Tests the getAttributes method of the OneLogin_Saml2_Response with nested
You can’t perform that action at this time.
0 commit comments