From ee1f1555b3e8aa0f59b07cc74e6e7269b3464179 Mon Sep 17 00:00:00 2001 From: nklomp Date: Mon, 21 Nov 2022 12:53:39 +0100 Subject: [PATCH] chore: Prepare v0.3.2 release --- CHANGELOG.md | 11 +++++++++++ README.md | 10 +++++----- package.json | 2 +- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d910262..3f629d97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,16 @@ # Release Notes +## v0.3.2 - 2022-11-21 +Release with support for the pre-authorized code flow only! + +- Changed: + - renamed `jwtArgs` to `jwt` in the callback type + - Documentation updates/fixes + +- Fixes: + - The acquireCredential in the OpenID4VCIClient was not using the access token, resulting in auth issues. + + ## v0.3.1 - 2022-11-20 Release with support for the pre-authorized code flow only! diff --git a/README.md b/README.md index 8abdf9fe..649d228d 100644 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ const { privateKey, publicKey } = await jose.generateKeyPair('ES256'); // Must be JWS async function signCallback(args: Jwt, kid: string): Promise { return await new jose.SignJWT({ ...args.payload }) - .setProtectedHeader({ args.header.alg }) + .setProtectedHeader({ alg: args.header.alg }) .setIssuedAt() .setIssuer(kid) .setAudience(args.payload.aud) @@ -272,21 +272,21 @@ to sign the JWT and optionally a callback to verify the JWT. The signature of the callback functions you need to implement are: ````typescript -export type JWTSignerCallback = (jwtArgs: Jwt, kid: string) => Promise; +export type JWTSignerCallback = (jwt: Jwt, kid: string) => Promise; export type JWTVerifyCallback = (args: { jwt: string; kid: string }) => Promise; ```` This is an example of the signature callback function created using the `jose` library. ````typescript -import { JwtArgs } from "./CredentialIssuance.types"; +import { Jwt } from "@sphereon/openid4vci-client"; const { privateKey, publicKey } = await jose.generateKeyPair('ES256'); // Must be JWS -async function signCallback(args: JwtArgs, kid: string): Promise { +async function signCallback(args: Jwt, kid: string): Promise { return await new jose.SignJWT({ ...args.payload }) - .setProtectedHeader({ alg: 'ES256' }) + .setProtectedHeader({ alg: args.header.alg }) .setIssuedAt() .setIssuer(kid) .setAudience(args.payload.aud) diff --git a/package.json b/package.json index 03138ae9..9712c34c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@sphereon/openid4vci-client", - "version": "0.3.2-unstable.1", + "version": "0.3.2", "description": "OpenID for Verifiable Credential Issuance (OpenID4VCI) client", "main": "dist/main/index.js", "types": "dist/main/index.d.ts",