Class Session
- All Implemented Interfaces:
AutoCloseable
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:
-
PermissionException: If the account's quota is reached. -
RetryException: 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.
-
HttpException: If a network error occurs or the service is not operational.
-
Constructor Summary
ConstructorsConstructorDescriptionSession(URI url, String api_key, String api_secret, HttpClientHandler httpClientHandler) Establish a session to the service -
Method Summary
Modifier and TypeMethodDescriptioncreateSignatureForDynamicIdentity(String identity) Create a signing certificate for an account with a dynamic identity.Create a signing certificate for an account with a static identityCreate a time-stamp configurationMethods inherited from class com.pdftools.internal.NativeObject
equals, hashCode
-
Constructor Details
-
Session
public Session(URI url, String api_key, String api_secret, HttpClientHandler httpClientHandler) throws PermissionException, HttpException, RetryException Establish a session to the service
- Parameters:
url-The URL to the service endpoint.
Typically:
https://emea.api.dss.globalsign.com:8443api_key- Your account credentials’ key parameter for the login request.api_secret- Your account credentials’ secret parameter for the login request.httpClientHandler- The SSL configuration with the client certificate and trust store. Usepdftools.HttpClientHandler.setClientCertificateAndKeyto set your SSL client certificate "clientcert.crt" and private key "privateKey.key" of your GlobalSign account.- Throws:
HttpException- If a network error occurs.PermissionException- If a login error occurs, e.g. because the client certificate is rejected or the credentials are incorrect.RetryException- If the login rate limit is exceeded.IllegalArgumentException- ifurlisnullIllegalArgumentException- ifapi_keyisnullIllegalArgumentException- ifapi_secretisnullIllegalArgumentException- ifhttpClientHandlerisnull
-
-
Method Details
-
createSignatureForStaticIdentity
public SignatureConfiguration createSignatureForStaticIdentity() throws PermissionException, HttpException, RetryExceptionCreate a signing certificate for an account with a static identity
The returned signature configuration can be used for multiple signature operations.- Returns:
- Throws:
HttpException- If a network error occurs.PermissionException- If the request is not authorized by the service.RetryException- If the rate limit for creating new identities has been exceeded.
-
createSignatureForDynamicIdentity
public SignatureConfiguration createSignatureForDynamicIdentity(String identity) throws PermissionException, HttpException, RetryException Create a signing certificate for an account with a dynamic identity.
- Parameters:
identity-The dynamic identity as JSON string.
Example:
{ "subject_dn": {"common_name": "John Doe" } }- Returns:
- Throws:
HttpException- If a network error occurs.PermissionException- If the request is not authorized by the service.RetryException- If the rate limit for creating new identities has been exceeded.IllegalArgumentException- ifidentityisnull
-
createTimestamp
Create a time-stamp configuration
- Returns:
-