fix(readme): updated HTTPSignatureAuth arguments (#34)

Changed `algorithm` to `signature_algorithm` while instantiating `HTTPSignatureAuth` objects in the README.rst file
pull/38/head
Marc Seguí Coll 2022-05-04 17:56:42 +02:00 committed by GitHub
parent 434e68f87e
commit d9091e090d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ constructor as bytes in the PEM format, or configure the key resolver as follows
.. code-block:: python
with open('key.pem', 'rb') as fh:
auth = HTTPSignatureAuth(algorithm=algorithms.RSA_V1_5_SHA256,
auth = HTTPSignatureAuth(signature_algorithm=algorithms.RSA_V1_5_SHA256,
key=fh.read(),
key_id=preshared_key_id)
requests.get(url, auth=auth)
@ -104,7 +104,7 @@ constructor as bytes in the PEM format, or configure the key resolver as follows
def resolve_private_key(self, key_id: str):
return private_key_pem_bytes[key_id]
auth = HTTPSignatureAuth(algorithm=algorithms.RSA_V1_5_SHA256,
auth = HTTPSignatureAuth(signature_algorithm=algorithms.RSA_V1_5_SHA256,
key=fh.read(),
key_resolver=MyKeyResolver())
requests.get(url, auth=auth)