import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest } from '@angular/common/http'; import { Injector } from '@angular/core'; import { Router } from '@angular/router'; import { Observable } from 'rxjs'; import { AuthService } from '../../providers/auth/auth.service'; import { LocalStorageService } from '../../providers/local-storage/local-storage.service'; import { DataService } from './data.service'; import * as i0 from "@angular/core"; export declare const AUTH_REDIRECT_PARAM = "redirectTo"; /** * The default interceptor examines all HTTP requests & responses and automatically updates the requesting state * and shows error notifications. */ export declare class DefaultInterceptor implements HttpInterceptor { private dataService; private injector; private authService; private router; private localStorageService; private readonly tokenMethod; private readonly authTokenHeaderKey; constructor(dataService: DataService, injector: Injector, authService: AuthService, router: Router, localStorageService: LocalStorageService); intercept(req: HttpRequest, next: HttpHandler): Observable>; private notifyOnError; private extractErrorFromHttpResponse; /** * We need to lazily inject the NotificationService since it depends on the I18nService which * eventually depends on the HttpClient (used to load messages from json files). If we were to * directly inject NotificationService into the constructor, we get a cyclic dependency. */ private displayErrorNotification; /** * If the server is configured to use the "bearer" tokenMethod, each response should be checked * for the existence of an auth token. */ private checkForAuthToken; /** * Determine if two urls are on the same origin. */ private areUrlsOnSameOrigin; /** * If the provided `loginUrl` is on the same origin than the AdminUI, return the path * after the `/admin`. * Else, return the whole login url. */ private getPathFromLoginUrl; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }