Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit b65cdce

Browse files
authored
Merge pull request #226 from AzureAD/improve-sni-docs
Backport MSAL PR #185 to ADAL
2 parents 2a1c7ff + 5cb961a commit b65cdce

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

adal/authentication_context.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,21 @@ def acquire_token_with_client_certificate(self, resource, client_id,
243243
:param str client_id: The OAuth client id of the calling application.
244244
:param str certificate: A PEM encoded certificate private key.
245245
:param str thumbprint: hex encoded thumbprint of the certificate.
246-
:param public_certificate(optional): if not None, it will be sent to the service for subject name
246+
:param str public_certificate(optional): if not None, it will be sent to the service for subject name
247247
and issuer based authentication, which is to support cert auto rolls. The value must match the
248248
certificate private key parameter.
249+
250+
Per `specs <https://tools.ietf.org/html/rfc7515#section-4.1.6>`_,
251+
"the certificate containing
252+
the public key corresponding to the key used to digitally sign the
253+
JWS MUST be the first certificate. This MAY be followed by
254+
additional certificates, with each subsequent certificate being the
255+
one used to certify the previous one."
256+
However, your certificate's issuer may use a different order.
257+
So, if your attempt ends up with an error AADSTS700027 -
258+
"The provided signature value did not match the expected signature value",
259+
you may try use only the leaf cert (in PEM/str format) instead.
260+
249261
:returns: dict with several keys, include "accessToken".
250262
'''
251263
def token_func(self):

0 commit comments

Comments
 (0)