From 546cf1f82e9be43340393f52aaec71460109a6ae Mon Sep 17 00:00:00 2001 From: Andrey Kislyuk Date: Tue, 22 Aug 2017 15:02:25 -0700 Subject: [PATCH] Docs --- README.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 967372d..bdce508 100644 --- a/README.rst +++ b/README.rst @@ -40,14 +40,15 @@ Installation Asymmetric key algorithms (RSA and ECDSA) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ For asymmetric key algorithms, you should supply the private key as the ``key`` parameter to the ``HTTPSignatureAuth()`` -constructor as bytes in the PEM format. When verifying, the ``key_resolver()`` callback should provide the public key as -bytes in the PEM format as well: +constructor as bytes in the PEM format: .. code-block:: python with open('key.pem', 'rb') as fh: requests.get(url, auth=HTTPSignatureAuth(algorithm="rsa-sha256", key=fh.read(), key_id=preshared_key_id)) +When verifying, the ``key_resolver()`` callback should provide the public key as bytes in the PEM format as well: + Links ----- * `IETF HTTP Signatures draft `_