API client for the Identisure REST API on the JVM (Java, Kotlin, Scala).
Documentation: identisure.github.io/api-client-jvm
Java 17 or later.
- BankID SE: auth, sign, phone auth and sign, QR verify, age verification
- BankID NO: auth, backchannel auth, sign, age verification
- Freja eID: auth, backchannel auth, sign, backchannel sign, age verification
- MitID: auth, backchannel auth, sign, age verification
- FTN (Finnish Trust Network): auth, age verification
- Vipps MobilePay: auth, backchannel auth
- Documents: upload and download documents for signing
// Java only
implementation("com.identisure:identisure-client:0.1.0")
// Kotlin coroutines extensions
implementation("com.identisure:identisure-client-kotlin:0.1.0")<dependency>
<groupId>com.identisure</groupId>
<artifactId>identisure-client</artifactId>
<version>0.1.0</version>
</dependency>import com.identisure.client.Environment;
import com.identisure.client.IdentisureClientBuilder;
import com.identisure.client.models.BankIdSeAuthRequest;
import com.identisure.client.models.BankIdSeStatus;
void main() {
var client = new IdentisureClientBuilder("client_id", "client_secret")
.environment(Environment.STAGING)
.build();
var bankIdSe = client.bankIdSe();
bankIdSe.auth(new BankIdSeAuthRequest())
.thenCompose(session -> bankIdSe.waitForAuth(((BankIdSeStatus.Pending) session).id))
.thenAccept(result -> System.out.println(result))
.join();
}import com.identisure.client.*
import com.identisure.client.models.*
suspend fun main() {
val client = identisureClient("client_id", "client_secret") {
environment(Environment.STAGING)
}
val session = client.bankIdSe().authAsync(BankIdSeAuthRequest()) as BankIdSeStatus.Pending
val result = client.bankIdSe().waitForAuthAsync(session.id)
println(result)
}boolean valid = CallbackSignature.verify(rawBody, request.getHeader("X-Signature-SHA256"), hmacSecret);The tests use shared fixtures from a git submodule. Clone with --recurse-submodules, or run
git submodule update --init in an existing clone:
$ git clone --recurse-submodules https://github.com/identisure/api-client-jvm.gitTo compile the project, simply issue the following command:
$ gradle compileJava
$ gradle compileKotlin$ gradle testFormatting is checked with Spotless (palantir-java-format for Java, ktfmt for Kotlin). Compiler warnings fail the build.
$ gradle spotlessCheck
$ gradle spotlessApplySet the version in gradle.properties and core/src/main/java/com/identisure/client/IdentisureClientBuilder.java and commit. Then push a tag:
$ git tag v0.1.0
$ git push origin v0.1.0The release workflow checks that the tag matches the version, runs CI, publishes to Maven Central and creates a GitHub release.
C#, Dart, Go, TypeScript/JavaScript, PHP, Python, Ruby, Rust, Swift