sd-jwt
is a library that implements the IETF draft for Selective Disclosure for JWTs.
This library facilitates creating combined formats for issuance and presentation with arbitrary payloads, and performing
verification from the holder or from the verifiers perspective.
To install sd-jwt
, use go get
:
go get github.com/TBD54566975/ssi-sdk/sd-jwt
See this example.
You can run it by cloning this repo, changing directory into this directory, and running a go application. See the terminal command below.
git clone github.com/TBD54566975/ssi-sdk.git
cd ssi-sdk/sd-jwt
go run example/main.go
The best usage examples can be found in the sd_jwt_test.go file.
See our official godocs.
Configuration is done via dependency injection on the SDJWTSigner
struct.
If you want to inject your own implementation of JWT signatures, you can pass it by implementing a struct that satisfies
the Signer
interface.
If you want to inject your own random number generator, you can pass it by implementation the SaltGenerator
interface.
We provide a default one which relies on crypto/rand
, which you can instantiate by calling NewSaltGenerator
.
See the SDK Building section.
See the general CONTRIBUTING guide.
See current issues here.