forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathangular-jwt.d.ts
30 lines (25 loc) · 780 Bytes
/
angular-jwt.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Type definitions for angular-jwt 0.0.8
// Project: https://github.com/auth0/angular-jwt
// Definitions by: Reto Rezzonico <https://github.com/rerezz>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../angularjs/angular.d.ts" />
declare module angular.jwt {
interface JwtToken {
iss: string;
sub: string;
aud: string;
exp: number;
nbf: number;
iat: number;
jti: string;
unique_name: string;
}
interface IJwtHelper {
decodeToken(token: string): JwtToken;
getTokenExpirationDate(token: any): Date;
isTokenExpired(token: any, offsetSeconds?: number): boolean;
}
interface IJwtInterceptor {
tokenGetter(): string;
}
}