Releases: digipost/signature-api-client-java
Bugfix: sending jobs without specifying a globalSender
Preliminary support for multiple documents
Merge branch '5.0-final' into multiple-documents * 5.0-final: Upgrade to java-8-matchers 1.9 Upgrade dependencies Configure japicmp to support LOCAL-SNAPSHOT in pom
Retryable DirectJob signing, API brushups, archive
The 5.0 client introduces a way to request new URLs for redirecting users for signing direct jobs. In addition, there are various brush-ups on the API. Lastly, a new client is introduced for the archive of Posten signering. At this point, this service is only relevant for certain clients.
5.0-RC2 - Upgrade dependencies and minor API-change
New
- Bump maven-site-plugin from 3.7.1 to 3.8.2 (#131)
- Bump junit-bom from 5.5.0-M1 to 5.5.1 (#132)
- Bump commons-codec from 1.12 to 1.13 (#129)
- Bump japicmp-maven-plugin from 0.14.0 to 0.14.1 (#128)
- Bump slf4j.version from 1.7.26 to 1.7.28 (#127)
- Bump httpclient from 4.5.8 to 4.5.9 (#119)
- ExitUrls must now be created with URI-objects instead of strings - please see the documentation for new signature jobs for an example of this minor change.
- Upgrades to final version of Signature Api Specification v. 2.7
- Upgrade Spring, Apache Http Client, etc.
- Upgrade maven-javadoc-plugin to 3.1.1
5.0-RC1 - Request new redirect URL for signing in direct flow
New:
- It was a big chance that one of the signers in a direct flow scenario would change their mind and try to sign later. As the redirect URL could only be retrieved once, this would prevent the signature job from being successfully signed by all the signers and had to be created again. We realized that this is annoying, and are now pleased to announce that a new redirect URL can be retrieved per signer for a specific job. How to do this, you ask? Just call
DirectClient.requestNewRedirectUrl
. 👏
Support Java 11
The implementation for signing the ASiC-E bundle containing the documents to sign broke when run on Java 11. In this maintenance release, the library now supports being used in a JDK11 environment, in addition to still support Java 8.
Load organization certificate directly from PKCS12-container
New
- It is now possible to load the organization certificate (virksomhetssertifikat) directly from a PKCS12-container. This means you don't have to create a Java key-store and load this into the app. Just do the following:
KeyStoreConfig.fromOrganizationCertificate(organizationCertificateStream, privatekeyPassword)
Includes job reference in all responses
In addition to the signature job's ID, the reference (when specified by the sender upon creation of a job) is also included in all responses from the service. This is handy for certain senders who don't want to persist the service's ID in their own system.
Exposes next permitted poll time on all valid polling responses
- All instances of
PortalJobStatusChanged
exposes the next permitted poll time (getNextPermittedPollTime
). - All instances of
DirectJobStatusResponse
for jobs created withstatusRetrievalMethod
set toPOLLING
exposes the next permitted poll time (getNextPermittedPollTime
).
Consumers of the library are expected to query this and schedule the next polling based on the response from the service.
See the documentation for direct jobs and portal jobs for examples on how to handle this.
Breaking changes
- Method
getNextPermittedPollTime
is removed fromTooEagerPollingException
. Consumers should retrieve the next permitted poll time from the valid responses, as described above. By removing this we try to discourage exception driven logic. This exception should never be caught, schedule polling based on the valid responses instead. - Constants
NO_UPDATED_STATUS
inDirectJobStatusResponse
andPortalJobStatusChanged
are removed. Use method.is(NO_CHANGES)
on the instances to determine whether the queue was empty or not.
Adding queue support
Specifies the queue that jobs and status changes for a signature job will occur in. This is a feature aimed at organizations where it makes sense to retrieve status changes from several queues. This may be if the organization has more than one division, and each division has an application that create signature jobs through the API and want to retrieve status changes independent of the other division's actions.
To specify a queue, set Sender.pollingQueue
through the constructor Sender(String, PollingQueue)
. Please note that the same sender must be specified when polling to retrieve status changes.