This repo is the Java client library for integrating with Posten signering.
If you are looking for the C# variant of this library, please see signature-api-client-dotnet.
Get started by reading the documentation.
The recommended way to declare dependency on the library is to utilize the BOM. With Maven, this is declared like this:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>no.digipost.signature</groupId>
<artifactId>signature-api-client-bom</artifactId>
<version>7.0.4</version> <!-- replace with any later version -->
<type>pom</type>
<scope>import</scope>
</dependency>
...
And depend directly on the library artifact (without any specified version, since this is supplied by the BOM artifact above)
<dependencies>
<dependency>
<groupId>no.digipost.signature</groupId>
<artifactId>signature-api-client-java</artifactId>
</dependency>
...
Important
Clients are always strongly encouraged to upgrade to the latest version.
The minimal version which is currently supported is v6.1. Any earlier release is expected to stop working after January 7th 2025 due to Posten signering transitioning from SEIDv1 to the SEIDv2 certificate standard in the API. (Note: SEIDv2 used for clients' certificates is not affected, and has been supported for several years already. No action is required for client certificates.)
- change all
Document.FileType
references toDocumentType
- multiple documents in a signature job is now supported, and both PortalJob.builder(..) and DirectJob.builder(..) methods are changed according to this:
- the title of the job is the first parameter (this was previously set on the document itself)
- the second and third parameter are either lists of documents and signers, or a single document and a single signer
- for direct jobs, exit-URLs are provided as the fourth parameter
- the optional description for the job (text with more details displayed for the signer) is set on the builder instance: .withDescription(String)
- availability for portal jobs:
- The PortalJob.Builder.availableFor(..) now accepts a Duration instead of separate
long
andTimeUnit
arguments.
- The PortalJob.Builder.availableFor(..) now accepts a Duration instead of separate
- response from
DirectClient.create(DirectJob)
RedirectUrls
is replaced with getting a list of DirectSigners from where the redirect-URL for each signer can be obtained.- In the case of jobs with a single signer, it was previously possible to get the signer's redirect-URL from
DirectJobResponse.getSingleRedirectUrl()
. This is now changed toDirectJobResponse.getSingleSigner()
and you can get the redirect URL from the returned singleDirectSigner
instance. The URL is represented as a URI instead of previously being aString
.
If you are upgrading from an earlier version to v7.x, see also applicable previous section(s).
- see the Dependency section for how to properly declare your dependency using the BOM
- see release notes for v7.0.1 for more details. Only the configuration API has got some minor breaking changes:
- "globalSender" is renamed to .defaultSender(Sender)
- "serviceUri" and "trustStore" has been combined and replaced with ServiceEnvironment. Instead of separately specifying the former two, instead specify either
ServiceEnvironment.STAGING
orServiceEnvironment.PRODUCTION
depending on which environment you intend to use.