@@ -530,3 +530,43 @@ def test_do_verified_logout(self):
530530
531531 res = self .session_endpoint .do_verified_logout (_sid , "client_1" )
532532 assert res == []
533+
534+ def test_logout_from_client_unknow_sid (self ):
535+ self ._code_auth ("1234567" )
536+ self ._code_auth2 ("abcdefg" )
537+
538+ # client0
539+ self .session_endpoint .endpoint_context .cdb ["client_1" ][
540+ "backchannel_logout_uri"
541+ ] = "https://example.com/bc_logout"
542+ self .session_endpoint .endpoint_context .cdb ["client_1" ]["client_id" ] = "client_1"
543+ self .session_endpoint .endpoint_context .cdb ["client_2" ][
544+ "frontchannel_logout_uri"
545+ ] = "https://example.com/fc_logout"
546+ self .session_endpoint .endpoint_context .cdb ["client_2" ]["client_id" ] = "client_2"
547+
548+ _sid = 'sid'
549+
550+ res = self .session_endpoint .logout_all_clients (_sid , "client_1" )
551+ assert res == {}
552+
553+ def test_logout_from_client_no_session (self ):
554+ self ._code_auth ("1234567" )
555+ self ._code_auth2 ("abcdefg" )
556+
557+ # client0
558+ self .session_endpoint .endpoint_context .cdb ["client_1" ][
559+ "backchannel_logout_uri"
560+ ] = "https://example.com/bc_logout"
561+ self .session_endpoint .endpoint_context .cdb ["client_1" ]["client_id" ] = "client_1"
562+ self .session_endpoint .endpoint_context .cdb ["client_2" ][
563+ "frontchannel_logout_uri"
564+ ] = "https://example.com/fc_logout"
565+ self .session_endpoint .endpoint_context .cdb ["client_2" ]["client_id" ] = "client_2"
566+
567+ _sid = self ._get_sid ()
568+
569+ self .session_endpoint .endpoint_context .sdb .sso_db .delete ('uid2sid' , 'diana' )
570+
571+ res = self .session_endpoint .logout_all_clients (_sid , "client_1" )
572+ assert res == {}
0 commit comments