Skip to content

Commit

Permalink
Move types into index.ts (BETA) (#178)
Browse files Browse the repository at this point in the history
Co-authored-by: Frederik Prijck <frederik.prijck@auth0.com>
  • Loading branch information
cristobal and frederikprijck authored Aug 1, 2023
1 parent 175ce9f commit d56f606
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
19 changes: 0 additions & 19 deletions lib/global.ts

This file was deleted.

22 changes: 20 additions & 2 deletions lib/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
import base64_url_decode from "./base64_url_decode";
import { JwtDecodeOptions, JwtHeader, JwtPayload } from "./global";
export * from './global';

export interface JwtDecodeOptions {
header?: boolean;
}

export interface JwtHeader {
typ?: string;
alg?: string;
kid?: string;
}

export interface JwtPayload {
iss?: string;
sub?: string;
aud?: string[] | string;
exp?: number;
nbf?: number;
iat?: number;
jti?: string;
}

export class InvalidTokenError extends Error {
constructor(message: string) {
Expand Down

0 comments on commit d56f606

Please sign in to comment.