Skip to content

Commit d56f606

Browse files
Move types into index.ts (BETA) (#178)
Co-authored-by: Frederik Prijck <frederik.prijck@auth0.com>
1 parent 175ce9f commit d56f606

File tree

2 files changed

+20
-21
lines changed

2 files changed

+20
-21
lines changed

lib/global.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

lib/index.ts

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,24 @@
11
import base64_url_decode from "./base64_url_decode";
2-
import { JwtDecodeOptions, JwtHeader, JwtPayload } from "./global";
3-
export * from './global';
2+
3+
export interface JwtDecodeOptions {
4+
header?: boolean;
5+
}
6+
7+
export interface JwtHeader {
8+
typ?: string;
9+
alg?: string;
10+
kid?: string;
11+
}
12+
13+
export interface JwtPayload {
14+
iss?: string;
15+
sub?: string;
16+
aud?: string[] | string;
17+
exp?: number;
18+
nbf?: number;
19+
iat?: number;
20+
jti?: string;
21+
}
422

523
export class InvalidTokenError extends Error {
624
constructor(message: string) {

0 commit comments

Comments
 (0)