fix: Add workaround for authn library issue

This commit is contained in:
Joachim Van Herwegen 2023-10-03 10:00:40 +02:00
parent cccca96d28
commit 180d5f131e
3 changed files with 48 additions and 62 deletions

101
package-lock.json generated
View File

@ -82,8 +82,8 @@
"devDependencies": {
"@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.6.1",
"@inrupt/solid-client-authn-core": "^1.16.0",
"@inrupt/solid-client-authn-node": "^1.16.0",
"@inrupt/solid-client-authn-core": "^1.17.2",
"@inrupt/solid-client-authn-node": "^1.17.2",
"@microsoft/tsdoc-config": "^0.16.2",
"@tsconfig/node18": "^2.0.1",
"@types/cheerio": "^0.22.31",
@ -3895,35 +3895,34 @@
}
},
"node_modules/@inrupt/solid-client-authn-core": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-core/-/solid-client-authn-core-1.16.0.tgz",
"integrity": "sha512-lp4p21Ob0SJwPW2mJcUkM6YBp/zj9MM+RlHRM1uUdpPgvybGDLEIgJfKjkjku0RqFFJwCSP/KtbdCgnNFk5KXw==",
"version": "1.17.2",
"resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-core/-/solid-client-authn-core-1.17.2.tgz",
"integrity": "sha512-WxT4jcoAyWdL9ztqPmNSTDoVaOJV9aey3MkYI130roO/mu4DJdgCh072bBHrdbuspiTi7NS5ONAbV+TuVa1+Jg==",
"dev": true,
"dependencies": {
"@inrupt/universal-fetch": "^1.0.1",
"events": "^3.3.0",
"jose": "^4.10.0",
"lodash.clonedeep": "^4.5.0",
"jose": "^4.14.6",
"uuid": "^9.0.0"
},
"engines": {
"node": "^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
"node": "^16.0.0 || ^18.0.0 || ^20.0.0"
}
},
"node_modules/@inrupt/solid-client-authn-node": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-node/-/solid-client-authn-node-1.16.0.tgz",
"integrity": "sha512-4LSYwMwNUFoXDnwVQ9sxXnMsZCLArcUiYBnCO/PxmeRIkzhGx37RMxUSpGXc26XwhJ4vGHIlbPsdjBxtrpFg9Q==",
"version": "1.17.2",
"resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-node/-/solid-client-authn-node-1.17.2.tgz",
"integrity": "sha512-3TECbn5ovwXGbWcZLWQ6dq5X7bfokWiYILIp2YN+bx+4nl/QcIZ8EIRjSoOjXtGCJLfcN/bKOS7sYq9MMlKxxA==",
"dev": true,
"dependencies": {
"@inrupt/solid-client-authn-core": "^1.16.0",
"@inrupt/solid-client-authn-core": "^1.17.2",
"@inrupt/universal-fetch": "^1.0.1",
"jose": "^4.3.7",
"openid-client": "^5.1.0",
"jose": "^4.14.6",
"openid-client": "~5.4.2",
"uuid": "^9.0.0"
},
"engines": {
"node": "^14.0.0 || ^16.0.0 || ^18.0.0 || ^20.0.0"
"node": "^16.0.0 || ^18.0.0 || ^20.0.0"
}
},
"node_modules/@inrupt/universal-fetch": {
@ -11283,9 +11282,9 @@
"dev": true
},
"node_modules/jose": {
"version": "4.14.4",
"resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz",
"integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==",
"version": "4.15.1",
"resolved": "https://registry.npmjs.org/jose/-/jose-4.15.1.tgz",
"integrity": "sha512-CinpaEMmwb/59YG0N6SC3DY1imdTU5iNl08HPWR7NdyxACPeFuQbqjaocEjCDGq04KbnxSqQu702vL3ZTvKe5w==",
"funding": {
"url": "https://github.com/sponsors/panva"
}
@ -11739,12 +11738,6 @@
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"dev": true
},
"node_modules/lodash.clonedeep": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
"dev": true
},
"node_modules/lodash.defaults": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
@ -12888,18 +12881,15 @@
}
},
"node_modules/openid-client": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.1.3.tgz",
"integrity": "sha512-i5quCXurPkN50ndRLE2D3Q6khz6AieJ0gTKOmsl3G4ZIP/Udf5Qw5CMRdhMvbFvfKRrkcCWPFXmduFUFYTC0xw==",
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.4.3.tgz",
"integrity": "sha512-sVQOvjsT/sbSfYsQI/9liWQGVZH/Pp3rrtlGEwgk/bbHfrUDZ24DN57lAagIwFtuEu+FM9Ev7r85s8S/yPjimQ==",
"dev": true,
"dependencies": {
"jose": "^4.1.4",
"jose": "^4.14.4",
"lru-cache": "^6.0.0",
"object-hash": "^2.0.1",
"oidc-token-hash": "^5.0.1"
},
"engines": {
"node": "^12.19.0 || ^14.15.0 || ^16.13.0"
"object-hash": "^2.2.0",
"oidc-token-hash": "^5.0.3"
},
"funding": {
"url": "https://github.com/sponsors/panva"
@ -19057,28 +19047,27 @@
"dev": true
},
"@inrupt/solid-client-authn-core": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-core/-/solid-client-authn-core-1.16.0.tgz",
"integrity": "sha512-lp4p21Ob0SJwPW2mJcUkM6YBp/zj9MM+RlHRM1uUdpPgvybGDLEIgJfKjkjku0RqFFJwCSP/KtbdCgnNFk5KXw==",
"version": "1.17.2",
"resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-core/-/solid-client-authn-core-1.17.2.tgz",
"integrity": "sha512-WxT4jcoAyWdL9ztqPmNSTDoVaOJV9aey3MkYI130roO/mu4DJdgCh072bBHrdbuspiTi7NS5ONAbV+TuVa1+Jg==",
"dev": true,
"requires": {
"@inrupt/universal-fetch": "^1.0.1",
"events": "^3.3.0",
"jose": "^4.10.0",
"lodash.clonedeep": "^4.5.0",
"jose": "^4.14.6",
"uuid": "^9.0.0"
}
},
"@inrupt/solid-client-authn-node": {
"version": "1.16.0",
"resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-node/-/solid-client-authn-node-1.16.0.tgz",
"integrity": "sha512-4LSYwMwNUFoXDnwVQ9sxXnMsZCLArcUiYBnCO/PxmeRIkzhGx37RMxUSpGXc26XwhJ4vGHIlbPsdjBxtrpFg9Q==",
"version": "1.17.2",
"resolved": "https://registry.npmjs.org/@inrupt/solid-client-authn-node/-/solid-client-authn-node-1.17.2.tgz",
"integrity": "sha512-3TECbn5ovwXGbWcZLWQ6dq5X7bfokWiYILIp2YN+bx+4nl/QcIZ8EIRjSoOjXtGCJLfcN/bKOS7sYq9MMlKxxA==",
"dev": true,
"requires": {
"@inrupt/solid-client-authn-core": "^1.16.0",
"@inrupt/solid-client-authn-core": "^1.17.2",
"@inrupt/universal-fetch": "^1.0.1",
"jose": "^4.3.7",
"openid-client": "^5.1.0",
"jose": "^4.14.6",
"openid-client": "~5.4.2",
"uuid": "^9.0.0"
}
},
@ -24701,9 +24690,9 @@
"dev": true
},
"jose": {
"version": "4.14.4",
"resolved": "https://registry.npmjs.org/jose/-/jose-4.14.4.tgz",
"integrity": "sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g=="
"version": "4.15.1",
"resolved": "https://registry.npmjs.org/jose/-/jose-4.15.1.tgz",
"integrity": "sha512-CinpaEMmwb/59YG0N6SC3DY1imdTU5iNl08HPWR7NdyxACPeFuQbqjaocEjCDGq04KbnxSqQu702vL3ZTvKe5w=="
},
"js-tokens": {
"version": "4.0.0",
@ -25083,12 +25072,6 @@
"integrity": "sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==",
"dev": true
},
"lodash.clonedeep": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz",
"integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=",
"dev": true
},
"lodash.defaults": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.defaults/-/lodash.defaults-4.2.0.tgz",
@ -25959,15 +25942,15 @@
"dev": true
},
"openid-client": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.1.3.tgz",
"integrity": "sha512-i5quCXurPkN50ndRLE2D3Q6khz6AieJ0gTKOmsl3G4ZIP/Udf5Qw5CMRdhMvbFvfKRrkcCWPFXmduFUFYTC0xw==",
"version": "5.4.3",
"resolved": "https://registry.npmjs.org/openid-client/-/openid-client-5.4.3.tgz",
"integrity": "sha512-sVQOvjsT/sbSfYsQI/9liWQGVZH/Pp3rrtlGEwgk/bbHfrUDZ24DN57lAagIwFtuEu+FM9Ev7r85s8S/yPjimQ==",
"dev": true,
"requires": {
"jose": "^4.1.4",
"jose": "^4.14.4",
"lru-cache": "^6.0.0",
"object-hash": "^2.0.1",
"oidc-token-hash": "^5.0.1"
"object-hash": "^2.2.0",
"oidc-token-hash": "^5.0.3"
}
},
"optionator": {

View File

@ -161,8 +161,8 @@
"devDependencies": {
"@commitlint/cli": "^17.6.1",
"@commitlint/config-conventional": "^17.6.1",
"@inrupt/solid-client-authn-core": "^1.16.0",
"@inrupt/solid-client-authn-node": "^1.16.0",
"@inrupt/solid-client-authn-core": "^1.17.2",
"@inrupt/solid-client-authn-node": "^1.17.2",
"@microsoft/tsdoc-config": "^0.16.2",
"@tsconfig/node18": "^2.0.1",
"@types/cheerio": "^0.22.31",

View File

@ -132,7 +132,10 @@ export class IdentityTestState {
const mockUrl = res.headers.get('location')!;
expect(mockUrl.startsWith(this.redirectUrl)).toBeTruthy();
const info = await this.session.handleIncomingRedirect(mockUrl);
// Workaround for https://github.com/inrupt/solid-client-authn-js/issues/2985
const strippedUrl = new URL(mockUrl);
strippedUrl.searchParams.delete('iss');
const info = await this.session.handleIncomingRedirect(strippedUrl.href);
expect(info?.isLoggedIn).toBe(true);
}