Skip to content

Commit

Permalink
Merge pull request #107 from dschaller/jwtClaims
Browse files Browse the repository at this point in the history
add reserved claims types
  • Loading branch information
Sambego committed Nov 16, 2020
2 parents c92d4a7 + 8172c82 commit d16ecfd
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,22 @@ export interface JwtDecodeOptions {
header?: boolean;
}

export default function jwtDecode(token: string, options?: JwtDecodeOptions): unknown;
export interface JwtHeader {
type?: string;
alg?: string;
}

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

export default function jwtDecode<T = unknown>(
token: string,
options?: JwtDecodeOptions
): T;

0 comments on commit d16ecfd

Please sign in to comment.