Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE)
public app: Application,
@inject(BootBindings.PROJECT_ROOT) projectRoot: string,
@config()
public interceptorConfig: ArtifactOptions = {},
) {
super(
projectRoot,
// Set InterceptorProvider Booter Options if passed in via bootConfig
Object.assign({}, InterceptorProviderDefaults, interceptorConfig),
);
}
constructor(
@inject(USER_REPO)
private userRepository: UserRepository,
@inject(AuthenticationBindings.USER_PROFILE_FACTORY)
public userProfileFactory: UserProfileFactory,
) {}
constructor(
@inject(SequenceActions.FIND_ROUTE) protected findRoute: FindRoute,
@inject(SequenceActions.PARSE_PARAMS)
protected parseParams: ParseParams,
@inject(SequenceActions.INVOKE_METHOD) protected invoke: InvokeMethod,
@inject(SequenceActions.SEND) protected send: Send,
@inject(SequenceActions.REJECT) protected reject: Reject,
@inject(EXAMPLE_LOG_BINDINGS.LOG_ACTION) protected logger: LogFn,
) {}
constructor(
@inject(SequenceActions.FIND_ROUTE) protected findRoute: FindRoute,
@inject(SequenceActions.PARSE_PARAMS) protected parseParams: ParseParams,
@inject(SequenceActions.INVOKE_METHOD) protected invoke: InvokeMethod,
@inject(SequenceActions.SEND) public send: Send,
@inject(SequenceActions.REJECT) public reject: Reject,
//add
@inject(AuthenticationBindings.AUTH_ACTION)
protected authenticateRequest: AuthenticateFn,
) {}
export function extensions(extensionPointName?: string) {
return inject('', {decorator: '@extensions'}, (ctx, injection, session) => {
extensionPointName =
extensionPointName ??
inferExtensionPointName(injection.target, session.currentBinding);
const bindingFilter = extensionFilter(extensionPointName);
return createViewGetter(
ctx,
bindingFilter,
injection.metadata.bindingComparator,
session,
);
});
}
constructor(
@inject(RestBindings.CONFIG, {optional: true})
restConfig: RestServerConfig = {},
@inject(RestExplorerBindings.CONFIG, {optional: true})
explorerConfig: RestExplorerConfig = {},
@inject(RestBindings.BASE_PATH) private serverBasePath: string,
@inject(RestBindings.SERVER) private restServer: RestServer,
@inject(RestBindings.Http.CONTEXT) private requestContext: RequestContext,
) {
this.useSelfHostedSpec = explorerConfig.useSelfHostedSpec !== false;
this.openApiSpecUrl = this.getOpenApiSpecUrl(restConfig);
}
constructor(@inject(RestBindings.Http.REQUEST) private req: Request) {}
constructor(
@inject(RestBindings.CONFIG, {optional: true})
restConfig: RestServerConfig = {},
@inject(RestExplorerBindings.CONFIG, {optional: true})
explorerConfig: RestExplorerConfig = {},
@inject(RestBindings.BASE_PATH) private serverBasePath: string,
@inject(RestBindings.SERVER) private restServer: RestServer,
@inject(RestBindings.Http.CONTEXT) private requestContext: RequestContext,
) {
this.useSelfHostedSpec = explorerConfig.useSelfHostedSpec !== false;
this.openApiSpecUrl = this.getOpenApiSpecUrl(restConfig);
}
constructor(
@inject(CoreBindings.APPLICATION_INSTANCE) public app: Application,
@inject(BootBindings.PROJECT_ROOT) private projectRoot: string,
) {}
constructor(@inject(RestBindings.Http.REQUEST) private req: Request) {}