Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Aduki Kotlin SDK

The Aduki Kotlin SDK is a client library for the Aduki platform. It signs people in at Aduki ID, reads and sends mail, syncs contacts and appointments, and keeps working offline.

The SDK is a set of Gradle modules built as plain Kotlin/JVM libraries. The group is pro.aduki; the Android-specific parts (Keystore access, Account Manager) use the Android framework when present and fall back to software implementations on a plain JVM.

What it does

  • Sign-in at Aduki ID. Address, password and second factor produce a 10-minute access token per audience and a rotating refresh token. The SDK renews on 401 and signs out by revoking the session. See Sign-in.
  • One session, many audiences. The Id client caches one access token per audience (mail, id, …). See Aduki ID client.
  • Rights stream. Subscribes to the mail event stream and renews the token when the account’s rights change. See Token lifecycle.
  • DPoP. Binds sign-ins to a device key (RFC 9449). See DPoP.
  • Sign in with Aduki (OIDC). An OpenID Connect relying-party client with PKCE for apps that use Aduki ID as their identity provider. See OIDC client.
  • Offline-first mail. Local storage in ObjectBox, an outbox that journals every change before it is sent, and incremental sync over GET /v1/user/mail/changes. See Mail, Sync and Outbox.
  • Reactive state. Repositories expose Kotlin StateFlow streams for UI binding. See Reactive.
  • Typed REST clients for mail, scheduling and the Account Center.

Modules

ModuleHolds
coremodels, errors, configuration, retry primitives (Jitter, Circuit), memory helpers
cryptoKeystore provider, AES-256-GCM Envelope, Guard, TLS pinning, DPoP keys
netHTTP clients (Id, Login, Center, Mail, Scheduling, Events, Dpop, Oidc)
storeObjectBox entities and batch transactions
syncmailbox, contact and schedule sync engines; the outbox
staterepositories that expose StateFlow
sdkthe Aduki facade
androidAndroid Keystore DPoP key, Account Center authenticator, Custom Tabs sign-in, Credential Manager

Status

Version 0.4.0 is published on Maven Central under the pro.aduki namespace.

Android platform integrations (AndroidKey, AdukiAuthenticator, SignIn, PasskeyFlow) are provided in the optional pro.aduki:android module. They are verified with unit and Robolectric tests, and on an Android 14 emulator with software keys; verification on physical devices with hardware-backed Keystores, StrongBox, and live Credential Manager providers is pending device testing.

In the local store, personal text columns are sealed with AES-256-GCM (Vault), and contacts carry keyed blind indexes (emailIndex, phoneIndex) for exact lookups; structural metadata and flags remain in cleartext, and the ObjectBox database file itself is not encrypted.

Where to start

  1. Installation
  2. Configuration
  3. Sign-in
  4. Mail
  5. Aduki reference