diff --git a/config/http/static/default.json b/config/http/static/default.json index d59aa9fb2..956579b69 100644 --- a/config/http/static/default.json +++ b/config/http/static/default.json @@ -12,7 +12,7 @@ }, { "StaticAssetHandler:_assets_key": "/idp/style.css", - "StaticAssetHandler:_assets_value": "$PACKAGE_ROOT/templates/views/email-password-interaction/main.css" + "StaticAssetHandler:_assets_value": "$PACKAGE_ROOT/templates/idp/email-password-interaction/main.css" } ] } diff --git a/src/identity/interaction/email-password/EmailPasswordUtil.ts b/src/identity/interaction/email-password/EmailPasswordUtil.ts index 32eb6d0b1..3eab2dfd0 100644 --- a/src/identity/interaction/email-password/EmailPasswordUtil.ts +++ b/src/identity/interaction/email-password/EmailPasswordUtil.ts @@ -9,9 +9,9 @@ import { IdpInteractionError } from '../util/IdpInteractionError'; * @param error - Error to create an IdPInteractionError from. * @param prefilled - Prefilled data for IdpInteractionError. */ -export function throwIdpInteractionError(error: unknown, prefilled?: any): never { +export function throwIdpInteractionError(error: unknown, prefilled: Record = {}): never { if (IdpInteractionError.isInstance(error)) { - if (prefilled) { + if (Object.keys(prefilled).length > 0) { throw new IdpInteractionError(error.statusCode, error.message, { ...error.prefilled, ...prefilled }); } else { throw error; diff --git a/src/index.ts b/src/index.ts index cbec33090..3142edeb0 100644 --- a/src/index.ts +++ b/src/index.ts @@ -45,15 +45,18 @@ export * from './identity/interaction/util/IdpRenderHandler'; export * from './identity/interaction/util/IdpRouteController'; export * from './identity/interaction/util/InitialInteractionHandler'; export * from './identity/interaction/util/InteractionCompleter'; -export * from './identity/interaction/util/OwnershipValidator'; export * from './identity/interaction/util/TemplateRenderer'; -export * from './identity/interaction/util/TokenOwnershipValidator'; // Identity/Interaction export * from './identity/interaction/InteractionHttpHandler'; export * from './identity/interaction/InteractionPolicy'; export * from './identity/interaction/SessionHttpHandler'; +// Identity/Ownership +export * from './identity/ownership/NoCheckOwnershipValidator'; +export * from './identity/ownership/OwnershipValidator'; +export * from './identity/ownership/TokenOwnershipValidator'; + // Identity/Storage export * from './identity/storage/AdapterFactory'; export * from './identity/storage/ExpiringAdapterFactory'; @@ -178,14 +181,11 @@ export * from './pods/generate/TemplatedResourcesGenerator'; // Pods/Settings export * from './pods/settings/PodSettings'; -export * from './pods/settings/PodSettingsJsonParser'; -export * from './pods/settings/PodSettingsParser'; // Pods export * from './pods/ConfigPodManager'; export * from './pods/GeneratedPodManager'; export * from './pods/PodManager'; -export * from './pods/PodManagerHttpHandler'; // Server export * from './server/BaseHttpServerFactory'; diff --git a/test/integration/LdpHandlerWithAuth.test.ts b/test/integration/LdpHandlerWithAuth.test.ts index 34c507952..a44692a98 100644 --- a/test/integration/LdpHandlerWithAuth.test.ts +++ b/test/integration/LdpHandlerWithAuth.test.ts @@ -39,7 +39,6 @@ describe.each(stores)('An LDP handler with auth using %s', (name, { storeConfig, beforeAll(async(): Promise => { const variables: Record = { - 'urn:solid-server:default:variable:port': port, 'urn:solid-server:default:variable:baseUrl': baseUrl, 'urn:solid-server:default:variable:rootFilePath': rootFilePath, }; diff --git a/test/integration/LdpHandlerWithoutAuth.test.ts b/test/integration/LdpHandlerWithoutAuth.test.ts index 853027491..009c7c5f0 100644 --- a/test/integration/LdpHandlerWithoutAuth.test.ts +++ b/test/integration/LdpHandlerWithoutAuth.test.ts @@ -33,7 +33,6 @@ describe.each(stores)('An LDP handler allowing all requests %s', (name, { storeC beforeAll(async(): Promise => { const variables: Record = { - 'urn:solid-server:default:variable:port': port, 'urn:solid-server:default:variable:baseUrl': baseUrl, 'urn:solid-server:default:variable:rootFilePath': rootFilePath, }; diff --git a/test/integration/Middleware.test.ts b/test/integration/Middleware.test.ts index 4a8335e0f..9410cc7f0 100644 --- a/test/integration/Middleware.test.ts +++ b/test/integration/Middleware.test.ts @@ -24,7 +24,6 @@ describe('An http server with middleware', (): void => { getTestConfigPath('server-middleware.json'), { 'urn:solid-server:default:LdpHandler': new SimpleHttpHandler(), - 'urn:solid-server:default:variable:port': port, 'urn:solid-server:default:variable:baseUrl': 'https://example.pod/', }, ) as BaseHttpServerFactory; diff --git a/test/integration/RedisResourceLockerIntegration.test.ts b/test/integration/RedisResourceLockerIntegration.test.ts index 85039236b..7c5c71584 100644 --- a/test/integration/RedisResourceLockerIntegration.test.ts +++ b/test/integration/RedisResourceLockerIntegration.test.ts @@ -1,7 +1,6 @@ import type { Server } from 'http'; import fetch from 'cross-fetch'; import type { RedisResourceLocker } from '../../src'; -import { joinFilePath } from '../../src'; import type { HttpServerFactory } from '../../src/server/HttpServerFactory'; import { describeIf, getPort } from '../util/Util'; import { getTestConfigPath, instantiateFromConfig } from './Config'; @@ -22,7 +21,6 @@ describeIf('docker', 'A server with a RedisResourceLocker as ResourceLocker', () getTestConfigPath('run-with-redlock.json'), { 'urn:solid-server:default:variable:baseUrl': baseUrl, - 'urn:solid-server:default:variable:podTemplateFolder': joinFilePath(__dirname, '../assets/templates'), }, ) as Record; ({ factory, locker } = instances); diff --git a/test/integration/ServerFetch.test.ts b/test/integration/ServerFetch.test.ts index d373dacda..c91b87e1f 100644 --- a/test/integration/ServerFetch.test.ts +++ b/test/integration/ServerFetch.test.ts @@ -21,7 +21,6 @@ describe('A Solid server', (): void => { 'urn:solid-server:test:Instances', getTestConfigPath('server-memory.json'), { - 'urn:solid-server:default:variable:port': port, 'urn:solid-server:default:variable:baseUrl': baseUrl, 'urn:solid-server:default:variable:idpTemplateFolder': '', }, diff --git a/test/integration/SparqlStorage.test.ts b/test/integration/SparqlStorage.test.ts index 34db815b0..490433b98 100644 --- a/test/integration/SparqlStorage.test.ts +++ b/test/integration/SparqlStorage.test.ts @@ -17,7 +17,6 @@ describeIf('docker', 'A server with a SPARQL endpoint as storage', (): void => { beforeAll(async(): Promise => { const variables: Record = { - 'urn:solid-server:default:variable:port': port, 'urn:solid-server:default:variable:baseUrl': baseUrl, 'urn:solid-server:default:variable:sparqlEndpoint': 'http://localhost:4000/sparql', }; diff --git a/test/integration/WebSocketsProtocol.test.ts b/test/integration/WebSocketsProtocol.test.ts index 6ba554b03..17cdeefdd 100644 --- a/test/integration/WebSocketsProtocol.test.ts +++ b/test/integration/WebSocketsProtocol.test.ts @@ -17,7 +17,6 @@ describe('A server with the Solid WebSockets API behind a proxy', (): void => { 'urn:solid-server:default:ServerFactory', getTestConfigPath('server-without-auth.json'), { - 'urn:solid-server:default:variable:port': port, 'urn:solid-server:default:variable:baseUrl': 'https://example.pod/', }, ) as HttpServerFactory; diff --git a/test/integration/config/server-without-auth.json b/test/integration/config/server-without-auth.json index c17307e9b..320f43e72 100644 --- a/test/integration/config/server-without-auth.json +++ b/test/integration/config/server-without-auth.json @@ -43,11 +43,6 @@ { "@id": "urn:solid-server:default:IdentityProviderHandler", "@type": "UnsupportedAsyncHandler" - }, - - { - "@id": "urn:solid-server:default:ResourcesGenerator", - "TemplatedResourcesGenerator:_templateFolder": "$PACKAGE_ROOT/test/assets/templates" } ] }