-
Notifications
You must be signed in to change notification settings - Fork 211
Closed
Labels
Description
Documentation indicates keys should be provided to ConfidentialClientApplication as strings, PEM encoded. The documentation doesn't mention how to provide an encrypted key, and there's nothing obvious like a password parameter, so on the face of it ConfidentialClientApplication doesn't accept encrypted keys.
The implementation allows something of a workaround. It so happens that the given private key gets passed along to PyJWT, which will accept a private key as deserialized by cryptography. So this works today:
from cryptography.hazmat.primitives import serialization
private_key = serialization.load_pem_private_key(pem_bytes, password=password, backend=default_backend())
ConfidentialClientApplication(client_credentials={"private_key": private_key, ...})But that relies on today's implementation and isn't a substitute for formal support.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done