Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Files

Latest commit

 

History

History

sd-jwt

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

godoc ssi-sdk go version 1.22.2 Go Report Card A+ license Apache 2

SD-JWT support in golang

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.

Table of Contents

Installation

To install sd-jwt, use go get:

go get github.com/TBD54566975/ssi-sdk/sd-jwt

Quick Start

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

Usage

The best usage examples can be found in the sd_jwt_test.go file.

API Reference

See our official godocs.

Configuration

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.

Building

See the SDK Building section.

Contributing

See the general CONTRIBUTING guide.

Issues

See current issues here.