Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements SD-JWT #103

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions sdjwt/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repositories {
mavenCentral()
maven {
url = uri("https://repo.danubetech.com/repository/maven-public")
}
maven("https://jitpack.io")
maven("https://repository.jboss.org/nexus/content/repositories/thirdparty-releases/")
}

dependencies {
implementation("com.nimbusds:nimbus-jose-jwt:9.34")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.15.3")
implementation("org.bouncycastle:bcprov-jdk15to18:1.77")

testImplementation(project(":dids"))
testImplementation(project(":crypto"))
testImplementation("io.github.erdtman:java-json-canonicalization:1.1")
}

tasks.test {
useJUnitPlatform()
}
39 changes: 39 additions & 0 deletions sdjwt/src/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SD-JWT support in Kotlin

`sdjwt` is a library that implements the IETF draft for [Selective Disclosure for JWTs](https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-05.html).
This library facilitates creating SD-JWT structures for issuance and presentation with arbitrary payloads, and performing
verification from the holder or from the verifier's perspective.

## Table of Contents
- [Installation](#installation)
- [Quick Start](#quick-start)
- [API REFERENCE](#api-reference)

## Installation

Add the following to your `gradle.build.kts` file:

```kotlin
repositories {
maven(url = "https://jitpack.io")
}

dependencies {
implementation("com.github.TBD54566975.web5-kt:sd-jwt:main-SNAPSHOT")
}
```

## Quick Start

See the test named `whole flow from issuer to holder to verifier` from [this file](./test/kotlin/web5/security/SdJwtTest.kt).
You can run it by cloning this repo and running gradle as shown below:

```shell
go clone github.com/TBD54566975/web5-kt.git
cd web5-kt/
./gradlew sdjwt:test
```

## API Reference
andresuribe87 marked this conversation as resolved.
Show resolved Hide resolved
See our [oficial kotlin docs](https://tbd54566975.github.io/web5-kt/docs/htmlMultiModule/sdjwt/index.html).

Loading
Loading