pdftools_sdk.crypto.providers.global_sign_dss.session
Classes
|
GlobalSign Digital Signing Service |
- class pdftools_sdk.crypto.providers.global_sign_dss.session.Session(url: str, api_key: str, api_secret: str, http_client_handler: HttpClientHandler)[source]
Bases:
Provider
GlobalSign Digital Signing Service
In this session, signatures can be created using different identities, i.e. signing certificates. Signing sessions and signing certificates expire after 10 minutes. After this time, they are renewed automatically.
When signing with this provider, these errors can occur:
pdftools_sdk.permission_error.PermissionError
: If the account’s quota is reached.pdftools_sdk.retry_error.RetryError
: If one of the account’s rate limits is exceeded. The service enforces rate limits for both creating new identities and signing operations. So, if multiple documents must be signed at once, it is advisable to re-use the signature configuration (and hence its signing certificates) for signing.pdftools_sdk.http_error.HttpError
: If a network error occurs or the service is not operational.
- __init__(url: str, api_key: str, api_secret: str, http_client_handler: HttpClientHandler)[source]
Establish a session to the service
- Parameters:
url (str) –
The URL to the service endpoint.
Typically: https://emea.api.dss.globalsign.com:8443
api_key (str) – Your account credentials’ key parameter for the login request.
api_secret (str) – Your account credentials’ secret parameter for the login request.
httpClientHandler (pdftools_sdk.http_client_handler.HttpClientHandler) – The SSL configuration with the client certificate and trust store. Use
pdftools_sdk.http_client_handler.HttpClientHandler.set_client_certificate_and_key()
to set your SSL client certificate “clientcert.crt” and private key “privateKey.key” of your GlobalSign account.
- Raises:
pdftools_sdk.http_error.HttpError – If a network error occurs.
pdftools_sdk.permission_error.PermissionError – If a login error occurs, e.g. because the client certificate is rejected or the credentials are incorrect.
pdftools_sdk.retry_error.RetryError – If the login rate limit is exceeded.
- create_signature_for_static_identity() SignatureConfiguration [source]
Create a signing certificate for an account with a static identity
The returned signature configuration can be used for multiple signature operations.
- Return type:
pdftools_sdk.crypto.providers.global_sign_dss.signature_configuration.SignatureConfiguration
- Raises:
pdftools_sdk.http_error.HttpError – If a network error occurs.
pdftools_sdk.permission_error.PermissionError – If the request is not authorized by the service.
pdftools_sdk.retry_error.RetryError – If the rate limit for creating new identities has been exceeded.
- create_signature_for_dynamic_identity(identity: str) SignatureConfiguration [source]
Create a signing certificate for an account with a dynamic identity.
- Parameters:
identity (str) –
The dynamic identity as JSON string.
Example: { “subject_dn”: {“common_name”: “John Doe” } }
- Return type:
pdftools_sdk.crypto.providers.global_sign_dss.signature_configuration.SignatureConfiguration
- Raises:
pdftools_sdk.http_error.HttpError – If a network error occurs.
pdftools_sdk.permission_error.PermissionError – If the request is not authorized by the service.
pdftools_sdk.retry_error.RetryError – If the rate limit for creating new identities has been exceeded.
- create_timestamp() TimestampConfiguration [source]
Create a time-stamp configuration