Skip to content

Commit

Permalink
update doc string for signer
Browse files Browse the repository at this point in the history
  • Loading branch information
myuwono committed Feb 10, 2017
1 parent 92a1ac9 commit d2eaf01
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/python/covata/delta/crypto/cryptoservice.py
Expand Up @@ -45,7 +45,7 @@ def save(self, private_key, file_name):
"""
Saves a private key object (encrypted) to keystore
Saving the Private Cryptographic Key
Saving the Private Cryptographic Key:
>>> crypto_service.save(private_key, identity_id + ".crypto.pem")
Expand Down
10 changes: 8 additions & 2 deletions src/main/python/covata/delta/crypto/signer.py
Expand Up @@ -59,7 +59,8 @@ class CVTSigner(AuthBase, LogMixin):

def __init__(self, crypto_service, identity_id):
"""
Create a Request Signer object to sign a ``Request`` object using
Create a Request Signer object to sign a
:class:`~requests.Request` object using
the CVT1 request signing scheme.
The :class:`~.CVTSigner` can be instantiated
Expand All @@ -81,9 +82,14 @@ def __init__(self, crypto_service, identity_id):
... base_url="https://delta.covata.io/v1",
... resource="/identities/",
... identity_id="e5fa4059-24c0-42a8-af9a-fe7280b43256"),
... auth=self._crypto_service.signer(requestor_id))
... auth=crypto_service.signer(requestor_id))
>>> print(response.json())
It is also possible to invoke the call to manually attach
the appropriate headers to a :class:`~requests.PreparedRequest` object:
>>> prepared_request = request.prepare()
>>> signer(prepared_request)
:param crypto_service: The Crypto Service object
:type crypto_service: :class:`~covata.delta.crypto.CryptoService`
Expand Down

0 comments on commit d2eaf01

Please sign in to comment.