Skip to content

Class: ODataRequestContextInterceptor ​

Defined in: context/odata-request-context.ts:53

Global interceptor, registered by ODataModule.forRoot() / forRootAsync(), that makes the current ExecutionContext and request available through getODataRequestContext for the whole handler, including its asynchronous continuations.

It runs after guards, so anything a guard attaches to the request (an authenticated user) is visible to the hooks that read the context.

Implements ​

  • NestInterceptor

Constructors ​

Constructor ​

new ODataRequestContextInterceptor(): ODataRequestContextInterceptor

Returns ​

ODataRequestContextInterceptor

Methods ​

intercept() ​

intercept(context, next): Observable<unknown>

Defined in: context/odata-request-context.ts:54

Method to implement a custom interceptor.

Parameters ​

context ​

ExecutionContext

an ExecutionContext object providing methods to access the route handler and class about to be invoked.

next ​

CallHandler

a reference to the CallHandler, which provides access to an Observable representing the response stream from the route handler.

Returns ​

Observable<unknown>

Implementation of ​

NestInterceptor.intercept