Skip to main content
Version: 11.14.0

AuthInterceptorFn

Intercepts HTTP requests to add authentication headers and handle CSRF tokens. When the user is logged in, the interceptor injects the CSRF token; when user override is active it sets override-user and override-domain headers. It also refreshes the CSRF token from response headers when present.

Usage

app.config.ts
import { authInterceptorFn } from '@sinequa/atomic-angular';

export const appConfig: ApplicationConfig = {
providers: [
provideHttpClient(withInterceptors([
authInterceptorFn,
])),
],
};