import { Injector } from "@angular/core"; import { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from "@angular/common/http"; import { Observable } from "rxjs"; /** * Interceptor que adiciona o Token em cada requisição. */ export declare class W3AuthInterceptor implements HttpInterceptor { private injector; /** * Is refresh token is being executed */ private refreshInProgress; /** * Notify all outstanding requests through this subject */ private refreshSubject; constructor(injector: Injector); /** * Intercept an outgoing `HttpRequest` */ intercept(req: HttpRequest, delegate: HttpHandler): Observable>; /** * Process all the requests via custom interceptors. */ private processIntercept; /** * Request interceptor. Delays request if refresh is in progress * otherwise adds token to the headers */ private request; /** * Failed request interceptor, check if it has to be processed with refresh */ private responseError; /** * Add access token to headers or the request */ private addToken; /** * Delay request, by subscribing on refresh event, once it finished, process it * otherwise throw error */ private delayRequest; /** * Retry request, by subscribing on refresh event, once it finished, process it * otherwise throw error */ private retryRequest; }