Skip to content

Commit 07c08d9

Browse files
committed
Merge remote-tracking branch 'origin/develop' into feature/WAL-646
2 parents 9bde31c + 36fd227 commit 07c08d9

16 files changed

Lines changed: 285 additions & 44 deletions

File tree

CHANGELOG.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,44 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.7.3](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.2...v0.7.3) (2023-09-30)
7+
8+
9+
### Bug Fixes
10+
11+
* allow token endpoint to be defined in metadata without triggering logic for external AS ([d99304c](https://github.com/Sphereon-Opensource/OID4VCI/commit/d99304cd02b92974785f516e8bd82900cc3e0925))
12+
13+
14+
15+
16+
17+
## [0.7.2](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.1...v0.7.2) (2023-09-28)
18+
19+
20+
### Bug Fixes
21+
22+
* id lookup against server metadata not working ([592ec4b](https://github.com/Sphereon-Opensource/OID4VCI/commit/592ec4b837898eb3022d19479d79b6065e7a0d9e))
23+
24+
25+
26+
27+
28+
## [0.7.1](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.0...v0.7.1) (2023-09-28)
29+
30+
31+
### Bug Fixes
32+
33+
* Better match credential offer types and formats onto issuer metadata ([4044c21](https://github.com/Sphereon-Opensource/OID4VCI/commit/4044c2175b4cbee16f44c8bb5499bba249ca4993))
34+
* clearinterval ([214e3c6](https://github.com/Sphereon-Opensource/OID4VCI/commit/214e3c6d7ced9b27c50186db8ed876330230a6a5))
35+
* Fix credential offer matching against metadata ([3c23bab](https://github.com/Sphereon-Opensource/OID4VCI/commit/3c23bab83569e04a4b5846fed83ce00d68e8ddce))
36+
* Fix credential offer matching against metadata ([b79027f](https://github.com/Sphereon-Opensource/OID4VCI/commit/b79027fe601ecccb1373ba399419e14f5ec2d7ff))
37+
* relax auth_endpoint handling. Doesn't have to be available when doing pre-auth flow. Client handles errors anyway in case of auth/par flow ([ce39958](https://github.com/Sphereon-Opensource/OID4VCI/commit/ce39958f21f82243f26111fd14bd2443517eef9c))
38+
* relax auth_endpoint handling. Doesn't have to be available when doing pre-auth flow. Client handles errors anyway in case of auth/par flow ([cb5f9c1](https://github.com/Sphereon-Opensource/OID4VCI/commit/cb5f9c1c12285508c6d403814d032e8883a59e7d))
39+
40+
41+
42+
43+
644
# [0.7.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.6.0...v0.7.0) (2023-08-19)
745

846

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "0.7.0",
5+
"version": "0.7.3",
66
"npmClient": "pnpm",
77
"command": {
88
"publish": {

packages/callback-example/CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,33 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.7.3](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.2...v0.7.3) (2023-09-30)
7+
8+
**Note:** Version bump only for package @sphereon/oid4vci-callback-example
9+
10+
11+
12+
13+
14+
## [0.7.2](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.1...v0.7.2) (2023-09-28)
15+
16+
**Note:** Version bump only for package @sphereon/oid4vci-callback-example
17+
18+
19+
20+
21+
22+
## [0.7.1](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.0...v0.7.1) (2023-09-28)
23+
24+
25+
### Bug Fixes
26+
27+
* Better match credential offer types and formats onto issuer metadata ([4044c21](https://github.com/Sphereon-Opensource/OID4VCI/commit/4044c2175b4cbee16f44c8bb5499bba249ca4993))
28+
29+
30+
31+
32+
633
# [0.7.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.6.0...v0.7.0) (2023-08-19)
734

835
### Features

packages/callback-example/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sphereon/oid4vci-callback-example",
3-
"version": "0.7.0",
3+
"version": "0.7.3",
44
"description": "OpenID 4 Verifiable Credential Issuance issuer callback example",
55
"source": "lib/index.ts",
66
"main": "dist/index.js",
@@ -18,7 +18,7 @@
1818
"@sphereon/oid4vci-client": "workspace:*",
1919
"@sphereon/oid4vci-common": "workspace:*",
2020
"@sphereon/oid4vci-issuer": "workspace:*",
21-
"@sphereon/ssi-types": "^0.15.1",
21+
"@sphereon/ssi-types": "0.17.2",
2222
"jose": "^4.10.0"
2323
},
2424
"devDependencies": {

packages/client/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.7.3](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.2...v0.7.3) (2023-09-30)
7+
8+
**Note:** Version bump only for package @sphereon/oid4vci-client
9+
10+
11+
12+
13+
14+
## [0.7.2](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.1...v0.7.2) (2023-09-28)
15+
16+
17+
### Bug Fixes
18+
19+
* id lookup against server metadata not working ([592ec4b](https://github.com/Sphereon-Opensource/OID4VCI/commit/592ec4b837898eb3022d19479d79b6065e7a0d9e))
20+
21+
22+
23+
24+
25+
## [0.7.1](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.0...v0.7.1) (2023-09-28)
26+
27+
28+
### Bug Fixes
29+
30+
* Better match credential offer types and formats onto issuer metadata ([4044c21](https://github.com/Sphereon-Opensource/OID4VCI/commit/4044c2175b4cbee16f44c8bb5499bba249ca4993))
31+
* clearinterval ([214e3c6](https://github.com/Sphereon-Opensource/OID4VCI/commit/214e3c6d7ced9b27c50186db8ed876330230a6a5))
32+
* relax auth_endpoint handling. Doesn't have to be available when doing pre-auth flow. Client handles errors anyway in case of auth/par flow ([ce39958](https://github.com/Sphereon-Opensource/OID4VCI/commit/ce39958f21f82243f26111fd14bd2443517eef9c))
33+
* relax auth_endpoint handling. Doesn't have to be available when doing pre-auth flow. Client handles errors anyway in case of auth/par flow ([cb5f9c1](https://github.com/Sphereon-Opensource/OID4VCI/commit/cb5f9c1c12285508c6d403814d032e8883a59e7d))
34+
35+
36+
37+
38+
639
# [0.7.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.6.0...v0.7.0) (2023-08-19)
740

841
### Bug Fixes

packages/client/lib/OpenID4VCIClient.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,10 @@ export class OpenID4VCIClient {
365365
return response.successBody;
366366
}
367367

368+
// FIXME: We really should convert <v11 to v12 objects first. Right now the logic doesn't map nicely and is brittle.
369+
// We should resolve IDs to objects first in case of strings.
370+
// When < v11 convert into a v12 object. When v12 object retain it.
371+
// Then match the object array on server metadata
368372
getCredentialsSupported(
369373
restrictToInitiationTypes: boolean,
370374
format?: (OID4VCICredentialFormat | string) | (OID4VCICredentialFormat | string)[],
@@ -373,11 +377,11 @@ export class OpenID4VCIClient {
373377
issuerMetadata: this.endpointMetadata.credentialIssuerMetadata,
374378
version: this.version(),
375379
format: format,
376-
types: restrictToInitiationTypes ? this.getCredentialTypes() : undefined,
380+
types: restrictToInitiationTypes ? this.getCredentialOfferTypes() : undefined,
377381
});
378382
}
379383

380-
getCredentialTypes(): string[][] {
384+
getCredentialOfferTypes(): string[][] {
381385
if (this.credentialOffer.version < OpenId4VCIVersion.VER_1_0_11) {
382386
const orig = this.credentialOffer.original_credential_offer as CredentialOfferPayloadV1_0_08;
383387
const types: string[] = typeof orig.credential_type === 'string' ? [orig.credential_type] : orig.credential_type;

packages/client/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sphereon/oid4vci-client",
3-
"version": "0.7.0",
3+
"version": "0.7.3",
44
"description": "OpenID for Verifiable Credential Issuance (OpenID4VCI) client",
55
"source": "lib/index.ts",
66
"main": "dist/index.js",
@@ -16,12 +16,11 @@
1616
},
1717
"dependencies": {
1818
"@sphereon/oid4vci-common": "workspace:*",
19-
"@sphereon/ssi-types": "^0.15.1",
19+
"@sphereon/ssi-types": "0.17.2",
2020
"cross-fetch": "^3.1.8",
2121
"debug": "^4.3.4"
2222
},
2323
"devDependencies": {
24-
"uint8arrays": "3.1.1",
2524
"@types/jest": "^29.5.3",
2625
"@types/node": "^18.17.4",
2726
"@typescript-eslint/eslint-plugin": "^5.62.0",
@@ -40,7 +39,8 @@
4039
"open-cli": "^7.2.0",
4140
"ts-jest": "^29.1.1",
4241
"ts-node": "^10.9.1",
43-
"typescript": "4.9.5"
42+
"typescript": "4.9.5",
43+
"uint8arrays": "3.1.1"
4444
},
4545
"engines": {
4646
"node": ">=16"

packages/common/CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,39 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.7.3](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.2...v0.7.3) (2023-09-30)
7+
8+
**Note:** Version bump only for package @sphereon/oid4vci-common
9+
10+
11+
12+
13+
14+
## [0.7.2](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.1...v0.7.2) (2023-09-28)
15+
16+
17+
### Bug Fixes
18+
19+
* id lookup against server metadata not working ([592ec4b](https://github.com/Sphereon-Opensource/OID4VCI/commit/592ec4b837898eb3022d19479d79b6065e7a0d9e))
20+
21+
22+
23+
24+
25+
## [0.7.1](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.7.0...v0.7.1) (2023-09-28)
26+
27+
28+
### Bug Fixes
29+
30+
* Better match credential offer types and formats onto issuer metadata ([4044c21](https://github.com/Sphereon-Opensource/OID4VCI/commit/4044c2175b4cbee16f44c8bb5499bba249ca4993))
31+
* Fix credential offer matching against metadata ([3c23bab](https://github.com/Sphereon-Opensource/OID4VCI/commit/3c23bab83569e04a4b5846fed83ce00d68e8ddce))
32+
* Fix credential offer matching against metadata ([b79027f](https://github.com/Sphereon-Opensource/OID4VCI/commit/b79027fe601ecccb1373ba399419e14f5ec2d7ff))
33+
* relax auth_endpoint handling. Doesn't have to be available when doing pre-auth flow. Client handles errors anyway in case of auth/par flow ([cb5f9c1](https://github.com/Sphereon-Opensource/OID4VCI/commit/cb5f9c1c12285508c6d403814d032e8883a59e7d))
34+
35+
36+
37+
38+
639
# [0.7.0](https://github.com/Sphereon-Opensource/OID4VCI/compare/v0.6.0...v0.7.0) (2023-08-19)
740

841
### Bug Fixes

packages/common/lib/functions/IssuerMetadataUtils.ts

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,22 +70,17 @@ export function getSupportedCredential(opts?: {
7070
const supportedFormats: (CredentialOfferFormat | string)[] = formats && formats.length > 0 ? formats : ['jwt_vc_json', 'jwt_vc_json-ld', 'ldp_vc'];
7171

7272
const credentialSupportedOverlap: CredentialSupported[] = [];
73-
if (opts?.types && typeof opts?.types === 'string') {
73+
if ((opts?.types && typeof opts?.types === 'string') || opts?.types?.length === 1) {
74+
const types = Array.isArray(opts.types) ? opts.types[0] : opts.types;
7475
const supported = credentialsSupported.filter(
75-
(sup) => sup.id === opts.types || (initiationTypes && arrayEqualsIgnoreOrder(sup.types, initiationTypes)),
76+
(sup) => sup.id === types || (initiationTypes && arrayEqualsIgnoreOrder(sup.types, initiationTypes)),
7677
);
7778
if (supported) {
7879
credentialSupportedOverlap.push(...supported);
7980
}
80-
} /*else if (initiationTypes && Array.isArray(initiationTypes) && initiationTypes.length === 1) {
81+
}
8182

82-
const supported = credentialsSupported.filter(
83-
(sup) => sup.id === initiationTypes![0] || (arrayEqualsIgnoreOrder(sup.types, initiationTypes!) && sup.types.includes(initiationTypes![0])),
84-
);
85-
if (supported) {
86-
credentialSupportedOverlap.push(...supported);
87-
}
88-
}*/ else {
83+
if (credentialSupportedOverlap.length === 0) {
8984
// Make sure we include Verifiable Credential both on the offer side as well as in the metadata side, to ensure consistency of the issuer does not.
9085
if (initiationTypes && !initiationTypes.includes('VerifiableCredential')) {
9186
initiationTypes.push('VerifiableCredential');

packages/common/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@sphereon/oid4vci-common",
3-
"version": "0.7.0",
3+
"version": "0.7.3",
44
"description": "OpenID 4 Verifiable Credential Issuance Common Types",
55
"source": "lib/index.ts",
66
"main": "dist/index.js",
@@ -10,7 +10,7 @@
1010
"build:clean": "tsc --build --clean && tsc --build"
1111
},
1212
"dependencies": {
13-
"@sphereon/ssi-types": "^0.15.1",
13+
"@sphereon/ssi-types": "0.17.2",
1414
"cross-fetch": "^3.1.8",
1515
"jwt-decode": "^3.1.2"
1616
},

0 commit comments

Comments
 (0)