mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
feat: Update oidc-provider to v8
The new version is an ESM package, so we need to do a dynamic import as our package is CJS. To correctly transpile the dynamic import, moduleResolution needs to be set to node16. See https://github.com/microsoft/TypeScript/issues/43329
This commit is contained in:
parent
b0d7342b39
commit
7024ee9a58
@ -4,7 +4,6 @@
|
|||||||
{
|
{
|
||||||
"comment": [
|
"comment": [
|
||||||
"Sets all the relevant Solid-OIDC parameters.",
|
"Sets all the relevant Solid-OIDC parameters.",
|
||||||
"dPoP is draft-01 since that is the latest version v6 of the OIDC library supports."
|
|
||||||
],
|
],
|
||||||
"@id": "urn:solid-server:default:IdentityProviderFactory",
|
"@id": "urn:solid-server:default:IdentityProviderFactory",
|
||||||
"@type": "IdentityProviderFactory",
|
"@type": "IdentityProviderFactory",
|
||||||
@ -32,7 +31,7 @@
|
|||||||
"claimsParameter": { "enabled": true },
|
"claimsParameter": { "enabled": true },
|
||||||
"clientCredentials": { "enabled": true },
|
"clientCredentials": { "enabled": true },
|
||||||
"devInteractions": { "enabled": false },
|
"devInteractions": { "enabled": false },
|
||||||
"dPoP": { "enabled": true, "ack": "draft-03" },
|
"dPoP": { "enabled": true },
|
||||||
"introspection": { "enabled": true },
|
"introspection": { "enabled": true },
|
||||||
"registration": { "enabled": true },
|
"registration": { "enabled": true },
|
||||||
"revocation": { "enabled": true },
|
"revocation": { "enabled": true },
|
||||||
|
1177
package-lock.json
generated
1177
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -108,7 +108,7 @@
|
|||||||
"@types/n3": "^1.10.4",
|
"@types/n3": "^1.10.4",
|
||||||
"@types/node": "^14.18.43",
|
"@types/node": "^14.18.43",
|
||||||
"@types/nodemailer": "^6.4.7",
|
"@types/nodemailer": "^6.4.7",
|
||||||
"@types/oidc-provider": "^7.11.1",
|
"@types/oidc-provider": "^8.4.0",
|
||||||
"@types/proper-lockfile": "^4.1.2",
|
"@types/proper-lockfile": "^4.1.2",
|
||||||
"@types/pump": "^1.1.1",
|
"@types/pump": "^1.1.1",
|
||||||
"@types/punycode": "^2.1.0",
|
"@types/punycode": "^2.1.0",
|
||||||
@ -139,7 +139,7 @@
|
|||||||
"mime-types": "^2.1.35",
|
"mime-types": "^2.1.35",
|
||||||
"n3": "^1.16.4",
|
"n3": "^1.16.4",
|
||||||
"nodemailer": "^6.9.1",
|
"nodemailer": "^6.9.1",
|
||||||
"oidc-provider": "7.10.6",
|
"oidc-provider": "^8.4.0",
|
||||||
"proper-lockfile": "^4.1.2",
|
"proper-lockfile": "^4.1.2",
|
||||||
"pump": "^3.0.0",
|
"pump": "^3.0.0",
|
||||||
"punycode": "^2.1.1",
|
"punycode": "^2.1.1",
|
||||||
@ -161,8 +161,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@commitlint/cli": "^17.6.1",
|
"@commitlint/cli": "^17.6.1",
|
||||||
"@commitlint/config-conventional": "^17.6.1",
|
"@commitlint/config-conventional": "^17.6.1",
|
||||||
"@inrupt/solid-client-authn-core": "1.14.0",
|
"@inrupt/solid-client-authn-core": "^1.16.0",
|
||||||
"@inrupt/solid-client-authn-node": "1.14.0",
|
"@inrupt/solid-client-authn-node": "^1.16.0",
|
||||||
"@microsoft/tsdoc-config": "^0.16.2",
|
"@microsoft/tsdoc-config": "^0.16.2",
|
||||||
"@tsconfig/node18": "^2.0.1",
|
"@tsconfig/node18": "^2.0.1",
|
||||||
"@types/cheerio": "^0.22.31",
|
"@types/cheerio": "^0.22.31",
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
// import/no-unresolved can't handle jose imports
|
// import/no-unresolved can't handle jose imports
|
||||||
// tsdoc/syntax can't handle {json} parameter
|
// tsdoc/syntax can't handle {json} parameter
|
||||||
import { randomBytes } from 'crypto';
|
import { randomBytes } from 'crypto';
|
||||||
|
import type Provider from 'oidc-provider';
|
||||||
import type { Account,
|
import type { Account,
|
||||||
Adapter,
|
Adapter,
|
||||||
AsymmetricSigningAlgorithm,
|
AsymmetricSigningAlgorithm,
|
||||||
@ -11,7 +12,6 @@ import type { Account,
|
|||||||
ResourceServer,
|
ResourceServer,
|
||||||
UnknownObject,
|
UnknownObject,
|
||||||
errors } from 'oidc-provider';
|
errors } from 'oidc-provider';
|
||||||
import { Provider } from 'oidc-provider';
|
|
||||||
import type { Operation } from '../../http/Operation';
|
import type { Operation } from '../../http/Operation';
|
||||||
import type { ErrorHandler } from '../../http/output/error/ErrorHandler';
|
import type { ErrorHandler } from '../../http/output/error/ErrorHandler';
|
||||||
import type { ResponseWriter } from '../../http/output/ResponseWriter';
|
import type { ResponseWriter } from '../../http/output/ResponseWriter';
|
||||||
@ -146,7 +146,7 @@ export class IdentityProviderFactory implements ProviderFactory {
|
|||||||
this.configureErrors(config);
|
this.configureErrors(config);
|
||||||
|
|
||||||
// Allow provider to interpret reverse proxy headers
|
// Allow provider to interpret reverse proxy headers
|
||||||
const provider = new Provider(this.baseUrl, config);
|
const provider = new (await import('oidc-provider')).default(this.baseUrl, config);
|
||||||
provider.proxy = true;
|
provider.proxy = true;
|
||||||
|
|
||||||
this.captureErrorResponses(provider);
|
this.captureErrorResponses(provider);
|
||||||
|
@ -9,7 +9,8 @@
|
|||||||
"outDir": "dist",
|
"outDir": "dist",
|
||||||
"preserveConstEnums": true,
|
"preserveConstEnums": true,
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"stripInternal": true
|
"stripInternal": true,
|
||||||
|
"moduleResolution": "node16"
|
||||||
},
|
},
|
||||||
"include": [
|
"include": [
|
||||||
"src"
|
"src"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user