@sd-jwt/sd-jwt-vc 0.19.1-next.11 → 0.19.1-next.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -716,6 +716,9 @@ ${import_zod2.default.prettifyError(validated.error)}`
716
716
  verifyStatus(result, options) {
717
717
  return __async(this, null, function* () {
718
718
  var _a, _b, _c;
719
+ if (options == null ? void 0 : options.disableStatusVerification) {
720
+ return;
721
+ }
719
722
  if (result.payload.status) {
720
723
  if (result.payload.status.status_list) {
721
724
  const fetcher = (_a = this.userConfig.statusListFetcher) != null ? _a : this.statusListFetcher.bind(this);
package/dist/index.mjs CHANGED
@@ -678,6 +678,9 @@ ${z2.prettifyError(validated.error)}`
678
678
  verifyStatus(result, options) {
679
679
  return __async(this, null, function* () {
680
680
  var _a, _b, _c;
681
+ if (options == null ? void 0 : options.disableStatusVerification) {
682
+ return;
683
+ }
681
684
  if (result.payload.status) {
682
685
  if (result.payload.status.status_list) {
683
686
  const fetcher = (_a = this.userConfig.statusListFetcher) != null ? _a : this.statusListFetcher.bind(this);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sd-jwt/sd-jwt-vc",
3
- "version": "0.19.1-next.11+9e9bca1",
3
+ "version": "0.19.1-next.12+c9d73e4",
4
4
  "description": "sd-jwt draft 7 implementation in typescript",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -39,7 +39,7 @@
39
39
  "license": "Apache-2.0",
40
40
  "dependencies": {
41
41
  "@owf/token-status-list": "^0.1.0-alpha-20260312123226",
42
- "@sd-jwt/core": "0.19.1-next.11+9e9bca1",
42
+ "@sd-jwt/core": "0.19.1-next.12+c9d73e4",
43
43
  "zod": "^4.3.5"
44
44
  },
45
45
  "devDependencies": {
@@ -63,5 +63,5 @@
63
63
  "esm"
64
64
  ]
65
65
  },
66
- "gitHead": "9e9bca10de3ad8574bfcbc875c85e37cee541505"
66
+ "gitHead": "c9d73e4db2a925e5096988fffe7eded62db1b6a7"
67
67
  }
@@ -625,6 +625,10 @@ export class SDJwtVcInstance extends SDJwtInstance<SdJwtVcPayload> {
625
625
  result: VerificationResult,
626
626
  options?: VerifierOptions,
627
627
  ): Promise<void> {
628
+ if (options?.disableStatusVerification) {
629
+ return;
630
+ }
631
+
628
632
  if (result.payload.status) {
629
633
  //checks if a status field is present in the payload based on https://www.ietf.org/archive/id/draft-ietf-oauth-status-list-02.html
630
634
  if (result.payload.status.status_list) {
@@ -120,7 +120,7 @@ describe('Revocation', () => {
120
120
  },
121
121
  });
122
122
 
123
- test('Test with a non revcoked credential', async () => {
123
+ test('Test with a non revoked credential', async () => {
124
124
  const claims = {
125
125
  firstname: 'John',
126
126
  status: {
@@ -152,6 +152,24 @@ describe('Revocation', () => {
152
152
  await expect(result).rejects.toThrowError('Status is not valid');
153
153
  });
154
154
 
155
+ test('Test with a revoked credential but status verification disabled', async () => {
156
+ const claims = {
157
+ firstname: 'John',
158
+ status: {
159
+ status_list: {
160
+ uri: 'https://example.com/status-list',
161
+ idx: 1,
162
+ },
163
+ },
164
+ };
165
+ const expectedPayload: SdJwtVcPayload = { iat, iss, vct, ...claims };
166
+ const encodedSdjwt = await sdjwt.issue(expectedPayload);
167
+ const result = await sdjwt.verify(encodedSdjwt, {
168
+ disableStatusVerification: true,
169
+ });
170
+ expect(result).toBeDefined();
171
+ });
172
+
155
173
  test('test to fetch the statuslist', async () => {
156
174
  //TODO: not implemented yet since we need to either mock the fetcher or use a real fetcher
157
175
  });