Skip to content

Commit 81240fb

Browse files
CopilotbgavrilMS
andcommitted
Polish: Improve error message clarity and comment placement
Co-authored-by: bgavrilMS <12273384+bgavrilMS@users.noreply.github.com>
1 parent 938db07 commit 81240fb

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

msal/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,8 @@ def _build_client(self, client_credential, authority, skip_regional_client=False
840840
_extract_cert_and_thumbprints(cert))
841841
else:
842842
raise ValueError(
843-
"You must provide either 'thumbprint', 'thumbprint_sha256', or 'public_certificate' "
844-
"from which the thumbprint can be calculated.")
843+
"You must provide 'thumbprint' (SHA-1), 'thumbprint_sha256' (SHA-256), "
844+
"or 'public_certificate' from which the thumbprint can be calculated.")
845845
else:
846846
raise ValueError(
847847
"client_credential needs to follow this format "

tests/test_optional_thumbprint.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,9 +294,7 @@ def test_pem_with_both_thumbprints_b2c_uses_sha256(
294294
"""Test that with both thumbprints, B2C authority uses SHA-256"""
295295
authority = "https://contoso.b2clogin.com/contoso.onmicrosoft.com/B2C_1_susi"
296296
mock_authority = self._setup_mocks(mock_authority_class, authority)
297-
298-
# Manually set _is_b2c to True for this B2C authority
299-
mock_authority._is_b2c = True
297+
mock_authority._is_b2c = True # Manually set _is_b2c to True for this B2C authority
300298

301299
# Create app with BOTH thumbprints for B2C
302300
app = ConfidentialClientApplication(

0 commit comments

Comments
 (0)