change: Make credential extractors specialized.

This commit is contained in:
Ruben Verborgh
2020-11-27 00:17:40 +01:00
committed by Joachim Van Herwegen
parent 0407a36490
commit b0c50b8a7b
14 changed files with 164 additions and 68 deletions

View File

@@ -3,8 +3,8 @@ import type { HttpHandler,
import {
AllowEverythingAuthorizer,
AuthenticatedLdpHandler,
EmptyCredentialsExtractor,
MethodPermissionsExtractor,
UnsecureWebIdExtractor,
} from '../../index';
import type { ServerConfig } from './ServerConfig';
import { getOperationHandler, getInMemoryResourceStore, getBasicRequestParser, getResponseWriter } from './Util';
@@ -26,7 +26,7 @@ export class BasicConfig implements ServerConfig {
public getHttpHandler(): HttpHandler {
const requestParser = getBasicRequestParser();
const credentialsExtractor = new UnsecureWebIdExtractor();
const credentialsExtractor = new EmptyCredentialsExtractor();
const permissionsExtractor = new MethodPermissionsExtractor();
const authorizer = new AllowEverythingAuthorizer();