@tree-house/authentication
Version:
Tree House Authentication
13 lines (12 loc) • 546 B
TypeScript
/// <reference types="node" />
import { SignOptions, DecodeOptions, VerifyOptions } from 'jsonwebtoken';
export declare const createJwt: (payload: Object, options?: CustomSignOptions) => Promise<string>;
export declare const decodeJwt: (token: string, options?: DecodeOptions) => string | {
[key: string]: any;
} | null;
export declare const verifyJwt: (token: string, jwtSettings?: VerifyOptions & {
secretOrKey: string | Buffer;
}) => Promise<object>;
export interface CustomSignOptions extends SignOptions {
secretOrKey: string;
}