UNPKG

1.24 kBTypeScriptView Raw
1import { HttpRequest, HttpHandler, HttpEvent, HttpInterceptor } from '@angular/common/http';
2import { JwtHelperService } from './jwthelper.service';
3import { Observable } from 'rxjs';
4import * as i0 from "@angular/core";
5export declare class JwtInterceptor implements HttpInterceptor {
6 jwtHelper: JwtHelperService;
7 private document;
8 tokenGetter: (request?: HttpRequest<any>) => string | null | Promise<string | null>;
9 headerName: string;
10 authScheme: string | ((request?: HttpRequest<any>) => string);
11 allowedDomains: Array<string | RegExp>;
12 disallowedRoutes: Array<string | RegExp>;
13 throwNoTokenError: boolean;
14 skipWhenExpired: boolean;
15 standardPorts: string[];
16 constructor(config: any, jwtHelper: JwtHelperService, document: Document);
17 isAllowedDomain(request: HttpRequest<any>): boolean;
18 isDisallowedRoute(request: HttpRequest<any>): boolean;
19 handleInterception(token: string | null, request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
20 intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
21 static ɵfac: i0.ɵɵFactoryDeclaration<JwtInterceptor, never>;
22 static ɵprov: i0.ɵɵInjectableDeclaration<JwtInterceptor>;
23}
24
\No newline at end of file