UNPKG

1.27 kBTypeScriptView Raw
1import { HttpRequest } from '@angular/common/http';
2import * as i0 from "@angular/core";
3export declare class JwtHelperService {
4 tokenGetter: () => string | Promise<string>;
5 constructor(config?: any);
6 urlBase64Decode(str: string): string;
7 private b64decode;
8 private b64DecodeUnicode;
9 decodeToken<T = any>(token: string): T | null;
10 decodeToken<T = any>(token: Promise<string>): Promise<T | null>;
11 decodeToken<T = any>(): null | T | Promise<T | null>;
12 private _decodeToken;
13 getTokenExpirationDate(token: string): Date | null;
14 getTokenExpirationDate(token: Promise<string>): Promise<Date | null>;
15 getTokenExpirationDate(): null | Date | Promise<Date | null>;
16 private _getTokenExpirationDate;
17 isTokenExpired(token?: undefined, offsetSeconds?: number): boolean | Promise<boolean>;
18 isTokenExpired(token: string | null, offsetSeconds?: number): boolean;
19 isTokenExpired(token: Promise<string>, offsetSeconds?: number): Promise<boolean>;
20 private _isTokenExpired;
21 getAuthScheme(authScheme: Function | string | undefined, request: HttpRequest<any>): string | undefined;
22 static ɵfac: i0.ɵɵFactoryDeclaration<JwtHelperService, never>;
23 static ɵprov: i0.ɵɵInjectableDeclaration<JwtHelperService>;
24}