@@ -413,28 +413,6 @@ def test_client_secret(self):
413413 self .assertIn ('access_token' , result )
414414 self .assertCacheWorksForApp (result , scope )
415415
416- def test_client_certificate (self ):
417- from tests .lab_config import get_client_certificate
418-
419- client_id = os .getenv ("LAB_APP_CLIENT_ID" )
420- if not client_id :
421- self .skipTest ("LAB_APP_CLIENT_ID environment variable is required" )
422-
423- client_cert = get_client_certificate ().copy ()
424- client_cert .pop ("public_certificate" , None ) # Test basic cert auth without SNI
425- self .app = msal .ConfidentialClientApplication (
426- client_id ,
427- client_credential = client_cert ,
428- authority = "https://login.microsoftonline.com/microsoft.onmicrosoft.com" ,
429- http_client = MinimalHttpClient ())
430- scope = ["https://graph.microsoft.com/.default" ]
431- result = self .app .acquire_token_for_client (scope )
432- if (result .get ("error" ) == "invalid_client"
433- and "SNI may be configured on the app" in result .get ("error_description" , "" )):
434- self .skipTest ("Lab app requires SNI/x5c for certificate auth" )
435- self .assertIn ('access_token' , result )
436- self .assertCacheWorksForApp (result , scope )
437-
438416 def test_subject_name_issuer_authentication (self ):
439417 from tests .lab_config import get_client_certificate
440418
0 commit comments