mirror of
https://github.com/github/codeql-action.git
synced 2025-12-26 17:20:10 +08:00
Co-authored-by: Andrew Eisenberg <aeisenberg@github.com> Co-authored-by: Henry Mercer <henrymercer@github.com>
26 lines
429 B
TypeScript
26 lines
429 B
TypeScript
export class InvalidTokenError extends Error {}
|
|
|
|
export interface JwtDecodeOptions {
|
|
header?: boolean;
|
|
}
|
|
|
|
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;
|