feat: Move OIDC library behaviour to separate path

This commit is contained in:
Joachim Van Herwegen
2021-11-09 11:55:49 +01:00
parent 11192ed4df
commit 520e4fe42f
16 changed files with 121 additions and 47 deletions

View File

@@ -58,7 +58,7 @@ export class AuthorizingHttpHandler extends OperationHttpHandler {
this.operationHandler = args.operationHandler;
}
public async handle(input: OperationHttpHandlerInput): Promise<ResponseDescription | undefined> {
public async handle(input: OperationHttpHandlerInput): Promise<ResponseDescription> {
const { request, operation } = input;
const credentials: CredentialSet = await this.credentialsExtractor.handleSafe(request);
this.logger.verbose(`Extracted credentials: ${JSON.stringify(credentials)}`);

View File

@@ -9,8 +9,6 @@ export interface OperationHttpHandlerInput extends HttpHandlerInput {
/**
* An HTTP handler that makes use of an already parsed Operation.
* Can either return a ResponseDescription to be resolved by the calling class,
* or undefined if this class handles the response itself.
*/
export abstract class OperationHttpHandler
extends AsyncHandler<OperationHttpHandlerInput, ResponseDescription | undefined> {}
extends AsyncHandler<OperationHttpHandlerInput, ResponseDescription> {}