Repository navigation
DID-7743: [SDK-JAVA] Official Java and Kotlin server SDK: complete API surface, webhooks, Authentication, Transactions, generated types and tests - #1
Merged
Conversation
…I surface, webhooks, Authentication, Transactions, generated types and tests Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
…I surface, webhooks, Authentication, Transactions, generated types and tests Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Official Java and Kotlin server SDK for Didit (
me.didit:didit-java, packageme.didit), forDID-7743underDID-7736. It covers every server API fromopenapi/(248 server operations in 47 resources, plus 9 account operations), webhook verification, Didit Authentication, Transactions, Travel Rule and wallet screening. Java 11 bytecode,java.net.httpand Jackson, sync methods plus*Asyncvariants, JSpecify nullness for Kotlin.Nothing is published: version
0.1.0, release workflow off untilRELEASES_ENABLEDis set, no tag. Merge tomainonly.Revision 2: review round 1
IllegalArgumentException, also synchronously fromverifyAccessTokenAsyncTokenVerificationExceptionwithmalformed, delivered through the future. Tested with 1- and 85-character parts, sync and asyncset -euo pipefail; a failed read fails the runverifyIdToken(token, null)skipped the nonce checknullnow means the token must carry no nonce, as a refreshed ID token does; a token with a nonce is refusedDELETE session/are not retried; no JWK on another curveverifyParsedacceptedX-Signature-SimplewithallowSimple, while DESIGN 9 says it checks V2 onlyverifyParsedchecksX-Signature-V2only; the backend's Simple-only vector proves itmaintoString()redacts identity data at any depth. AnHTTP://loopback issuer is handled. The cache-lifetime comment matches the code. Tests now count discovery fetches tooLeft as is:
client_idis sent only when configured, because service-didit-auth makes it optional ontoken/.jwks_urimay sit on another origin, as OpenID Connect allows; onlyhttpsis required.Quickstart against the mock API
./gradlew :examples:quickstartDemocreates a session, reads its decision and verifies a webhook against a local mock of the Didit API:Tests
./gradlew build --rerun-tasks --no-build-cache(JDK 21): Spotless, javac-Werrorwith errorprone and NullAway, tests, coverage gate, examples./gradlew :test -PtestJavaVersion=11,=17,=25./gradlew javadoc publishToMavenLocalpython3 codegen/generate.py --checkcanonical_v2.gitleaks.tomlf1a71f6The new tests were also run against the reviewed commit
67d769b. They fail there for the reasons the review gave:IllegalArgumentException, 6 key fetches instead of 1, 3 fetches during an outage instead of 1, the nonce opt-out, names intoString(), and Simple accepted byverifyParsed.Also checked by hand:
Another signer. An ES256 token signed by OpenSSL 3.0 verifies on JDK 11. Its 71-byte DER signature was converted to the 64-byte JOSE form with the Python standard library. Changing the signature gives
invalid_signature.Spec-sync guard. I ran the guard and push steps verbatim against a local bare repository with a stubbed
gh:--force-with-lease.The reviewed revision, against a private repository, reads an empty head and its push is rejected as stale.
Public API
Resources: 257 operation methods (each with an
Asyncvariant andwithRawResponse())Hand-written packages
One-time setup before the first release
A repository admin does this once, before 2026-11-01 and only with Alex's approval (REL-JAVA
DID-7766):me.diditon the Central Portal (central.sonatype.com). It is not on Maven Central today: sdk-android publishes from a GitHub raw Maven repository.MAVEN_CENTRAL_USERNAME,MAVEN_CENTRAL_PASSWORD,MAVEN_SIGNING_KEY(ASCII-armored private key) andMAVEN_SIGNING_KEY_PASSWORD.maven-centralenvironment with required reviewers and "Prevent self-review". Every publish waits for it.RELEASE_PLEASE_TOKENandSPEC_SYNC_TOKEN(a GitHub App or fine-grained token), so CI runs on the release and sync pull requests.RELEASES_ENABLED=true.After that, merging the release-please pull request creates the tag. The
publishjob in the same workflow then waits for the environment approval, runs./gradlew check, signs and uploads through the Central Portal, and attests the jars. CONTRIBUTING.md has the same steps.Not verified here
DIDIT_SANDBOX_API_KEYhere. RunDIDIT_SANDBOX_API_KEY=... ./gradlew liveTest.AuthenticationExampleat an application's issuer.RELEASES_ENABLEDis set, and on the next daily schedule after merge.Parity
The DESIGN.md questions this raised for all seven SDKs, and the parity checks for the other repositories, are in the "Follow-ups for the supervisor" comment on
DID-7743.docs/DESIGN.mdandopenapi/are unchanged.Opened by a BotInc run. Delivery follows the workflow's review and merge policy.
Requested by Alejandro Rosas in
DID-7743.Full diff
🤖 Generated with Claude Code