Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
chore: update deps, fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nklomp committed Jan 14, 2024
1 parent 6f83a74 commit 3e106fc
Show file tree
Hide file tree
Showing 12 changed files with 1,380 additions and 1,392 deletions.
44 changes: 24 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sphereon/did-auth-siop",
"version": "0.5.0-unstable.8",
"version": "0.6.0-unstable.0",
"source": "src/index.ts",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -28,65 +28,69 @@
"node": ">=18"
},
"dependencies": {
"@sphereon/did-uni-client": "^0.6.0",
"@sphereon/did-uni-client": "^0.6.1",
"qs": "^6.11.2",
"@sphereon/pex": "2.2.2",
"@sphereon/pex-models": "^2.1.2",
"@sphereon/ssi-types": "^0.17.6-unstable.69",
"@sphereon/pex": "^3.0.0",
"@sphereon/pex-models": "^2.1.5",
"@sphereon/ssi-types": "^0.18.0",
"@sphereon/wellknown-dids-client": "^0.1.3",
"@astronautlabs/jsonpath": "^1.1.2",
"sha.js": "^2.4.11",
"cross-fetch": "^3.1.8",
"cross-fetch": "^4.0.0",
"did-jwt": "6.11.6",
"did-resolver": "^4.1.0",
"events": "^3.3.0",
"language-tags": "^1.0.8",
"language-tags": "^1.0.9",
"multiformats": "^11.0.2",
"uint8arrays": "^3.1.1",
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/qs": "^6.9.8",
"@types/qs": "^6.9.11",
"@digitalcredentials/did-method-key": "^2.0.3",
"@digitalcredentials/ed25519-signature-2020": "^3.0.2",
"@digitalcredentials/jsonld-signatures": "^9.3.2",
"@digitalcredentials/vc": "^6.0.0",
"@transmute/ed25519-key-pair": "0.7.0-unstable.81",
"@transmute/ed25519-signature-2018": "^0.7.0-unstable.81",
"@transmute/ed25519-key-pair": "0.7.0-unstable.82",
"@transmute/ed25519-signature-2018": "^0.7.0-unstable.82",
"@transmute/did-key-ed25519": "^0.3.0-unstable.10",
"did-resolver": "^4.1.0",
"@types/jest": "^29.5.3",
"@types/language-tags": "^1.0.1",
"@types/uuid": "^9.0.1",
"@types/jest": "^29.5.11",
"@types/language-tags": "^1.0.4",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"ajv": "^8.12.0",
"bs58": "^5.0.0",
"codecov": "^3.8.3",
"cspell": "^6.26.3",
"dotenv": "^16.0.3",
"dotenv": "^16.3.1",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-import": "^2.27.5",
"ethers": "^6.3.0",
"ethers": "^6.10.0",
"jest": "^29.4.3",
"jest-junit": "^15.0.0",
"jose": "^4.12.0",
"jwt-decode": "^3.1.2",
"moment": "^2.29.4",
"nock": "^13.3.0",
"moment": "^2.30.1",
"nock": "^13.4.0",
"npm-run-all": "^4.1.5",
"open-cli": "^7.1.0",
"prettier": "^2.8.8",
"ts-interface-checker": "^1.0.2",
"ts-jest": "^29.1.1",
"ts-json-schema-generator": "^1.2.0",
"ts-json-schema-generator": "1.5.0",
"ts-node": "^10.9.1",
"typescript": "4.9.5"
"typescript": "^5.3.3"
},
"resolutions": {
"isomorphic-webcrypto": "npm:@sphereon/isomorphic-webcrypto@^2.4.0-unstable.4"
"isomorphic-webcrypto": "npm:@sphereon/isomorphic-webcrypto@^2.4.0-unstable.4",
"esline/**/strip-ansi": "6.0.1",
"@sd-jwt/utils": "0.1.2-alpha.2",
"@sd-jwt/decode": "0.1.2-alpha.1",
"@sd-jwt/types": "0.1.2-alpha.3"
},
"files": [
"dist"
Expand Down
1 change: 1 addition & 0 deletions src/helpers/ObjectUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { JSONPath as jp } from '@astronautlabs/jsonpath';

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export function extractDataFromPath(obj: unknown, path: string): { path: string[]; value: any }[] {
return jp.nodes(obj, path);
}
Expand Down
1 change: 1 addition & 0 deletions src/op/OP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export class OP {
subject: response,
});
return { correlationId, response, responseURI: responseUri };
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (error: any) {
void this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_CREATE_FAILED, {
correlationId,
Expand Down
1 change: 1 addition & 0 deletions src/rp/RP.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ export class RP {
let authorizationResponse: AuthorizationResponse;
try {
authorizationResponse = await AuthorizationResponse.fromPayload(authorizationResponsePayload);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} catch (error: any) {
void this.emitEvent(AuthorizationEvents.ON_AUTH_RESPONSE_RECEIVED_FAILED, {
correlationId: correlationId ?? uuidv4(), // correlation id cannot be derived from state in payload possible, hence a uuid as fallback
Expand Down
12 changes: 9 additions & 3 deletions src/schemas/AuthorizationRequestPayloadVD11.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,7 @@ export const AuthorizationRequestPayloadVD11SchemaObj = {
]
},
"ClaimPayloadCommon": {
"type": "object",
"additionalProperties": false
"type": "object"
},
"PresentationDefinitionV1": {
"type": "object",
Expand Down Expand Up @@ -597,6 +596,9 @@ export const AuthorizationRequestPayloadVD11SchemaObj = {
"$ref": "#/definitions/Optionality"
}
},
"required": [
"path"
],
"additionalProperties": false
},
"FilterV1": {
Expand Down Expand Up @@ -741,7 +743,8 @@ export const AuthorizationRequestPayloadVD11SchemaObj = {
}
},
"required": [
"id"
"id",
"constraints"
],
"additionalProperties": false
},
Expand Down Expand Up @@ -803,6 +806,9 @@ export const AuthorizationRequestPayloadVD11SchemaObj = {
"type": "string"
}
},
"required": [
"path"
],
"additionalProperties": false
},
"FilterV2": {
Expand Down
12 changes: 9 additions & 3 deletions src/schemas/AuthorizationRequestPayloadVD12OID4VPD18.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,7 @@ export const AuthorizationRequestPayloadVD12OID4VPD18SchemaObj = {
]
},
"ClaimPayloadCommon": {
"type": "object",
"additionalProperties": false
"type": "object"
},
"PresentationDefinitionV1": {
"type": "object",
Expand Down Expand Up @@ -603,6 +602,9 @@ export const AuthorizationRequestPayloadVD12OID4VPD18SchemaObj = {
"$ref": "#/definitions/Optionality"
}
},
"required": [
"path"
],
"additionalProperties": false
},
"FilterV1": {
Expand Down Expand Up @@ -747,7 +749,8 @@ export const AuthorizationRequestPayloadVD12OID4VPD18SchemaObj = {
}
},
"required": [
"id"
"id",
"constraints"
],
"additionalProperties": false
},
Expand Down Expand Up @@ -809,6 +812,9 @@ export const AuthorizationRequestPayloadVD12OID4VPD18SchemaObj = {
"type": "string"
}
},
"required": [
"path"
],
"additionalProperties": false
},
"FilterV2": {
Expand Down
12 changes: 9 additions & 3 deletions src/schemas/AuthorizationRequestPayloadVID1.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ export const AuthorizationRequestPayloadVID1SchemaObj = {
"vp_token": {
"$ref": "#/definitions/VpTokenClaimPayload"
}
},
"additionalProperties": false
}
},
"IdTokenClaimPayload": {
"type": "object"
Expand Down Expand Up @@ -599,6 +598,9 @@ export const AuthorizationRequestPayloadVID1SchemaObj = {
"$ref": "#/definitions/Optionality"
}
},
"required": [
"path"
],
"additionalProperties": false
},
"FilterV1": {
Expand Down Expand Up @@ -743,7 +745,8 @@ export const AuthorizationRequestPayloadVID1SchemaObj = {
}
},
"required": [
"id"
"id",
"constraints"
],
"additionalProperties": false
},
Expand Down Expand Up @@ -805,6 +808,9 @@ export const AuthorizationRequestPayloadVID1SchemaObj = {
"type": "string"
}
},
"required": [
"path"
],
"additionalProperties": false
},
"FilterV2": {
Expand Down
6 changes: 3 additions & 3 deletions src/types/Events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export enum AuthorizationEvents {
ON_AUTH_REQUEST_VERIFIED_SUCCESS = 'onAuthRequestVerifiedSuccess',
ON_AUTH_REQUEST_VERIFIED_FAILED = 'onAuthRequestVerifiedFailed',

ON_AUTH_RESPONSE_CREATE_SUCCESS = 'onAuthResponseSentSuccess',
ON_AUTH_RESPONSE_CREATE_FAILED = 'onAuthResponseSentFailed',
ON_AUTH_RESPONSE_CREATE_SUCCESS = 'onAuthResponseCreateSuccess',
ON_AUTH_RESPONSE_CREATE_FAILED = 'onAuthResponseCreateFailed',

ON_AUTH_RESPONSE_SENT_SUCCESS = 'onAuthResponseSentSuccess',
ON_AUTH_RESPONSE_SENT_FAILED = 'onAuthResponseSentFailed',
Expand All @@ -21,7 +21,7 @@ export enum AuthorizationEvents {
ON_AUTH_RESPONSE_RECEIVED_FAILED = 'onAuthResponseReceivedFailed',

ON_AUTH_RESPONSE_VERIFIED_SUCCESS = 'onAuthResponseVerifiedSuccess',
ON_AUTH_RESPONSE_VERIFIED_FAILED = 'onAuthResponseReceivedFailed',
ON_AUTH_RESPONSE_VERIFIED_FAILED = 'onAuthResponseVerifiedFailed',
}

export class AuthorizationEvent<T> {
Expand Down
3 changes: 1 addition & 2 deletions src/types/SIOP.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,8 @@ export interface VpTokenClaimPayload {
presentation_definition_uri?: string;
}

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface ClaimPayloadCommon {
// [x: string]: any;
[x: string]: any;
}

export interface ClaimPayloadVID1 extends ClaimPayloadCommon {
Expand Down
5 changes: 4 additions & 1 deletion test/interop/auth0/fixtures.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
export const anyDef = {
import { PresentationDefinitionV1 } from '@sphereon/pex-models';

export const anyDef: PresentationDefinitionV1 = {
id: '1',
input_descriptors: [
{
id: '1',
name: 'A specific type of VC',
purpose: 'We want a VC of this type',
schema: [{ uri: 'VerifiableCredential' }],
},
],
};
Expand Down
5 changes: 3 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
/* Debugging Options */
"traceResolution": false
/* Report module resolution log messages. */,
"listEmittedFiles": false
"listEmittedFiles": false,
"skipLibCheck": true
/* Print names of generated files part of the compilation. */,
"listFiles": false
/* Print names of files part of the compilation. */,
Expand All @@ -41,7 +42,7 @@
"src/**/*.ts",
"src/**/*.js",
"test/**/*.ts",
"generator/**/*.ts"
"generator/*.ts"
],
"exclude": [
"node_modules/**",
Expand Down
Loading

0 comments on commit 3e106fc

Please sign in to comment.