UNPKG

@cauca-911/core

Version:

Run `npm install @cauca-911/core` to add this library to your project

28 lines (27 loc) 1.13 kB
import { HttpEvent, HttpHandler, HttpRequest, HttpInterceptor } from '@angular/common/http'; import { Observable } from 'rxjs'; import { BaseLogoutHandler } from '../services/logout-handler'; import * as i0 from "@angular/core"; export declare class HttpTokenWriterInterceptor implements HttpInterceptor { private logoutHandler; private errorPrefix; private readonly tokenProvider; private readonly coreService; private readonly logService; private readonly router; constructor(logoutHandler?: BaseLogoutHandler); intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>; private executeRequest; private handleRetry; private handleExecutionError; private getRequestWithToken; private generateHeaders; private setupHeaders; private checkIfWeCanManageError; private retryWithNewToken; private handleRefreshResponse; private logout; private resendAsHTML; static ɵfac: i0.ɵɵFactoryDeclaration<HttpTokenWriterInterceptor, [{ optional: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration<HttpTokenWriterInterceptor>; }