bc-node-sdk
Version:
BetterCommerce's NodeJS SDK encapsulates the base framework for all the Next.js applications.
18 lines (17 loc) • 584 B
TypeScript
/**
* Class {@link TokenUtil} encapsulates utility functions to work with JWT tokens.
*/
export default abstract class TokenUtil {
/**
* Decodes a JWT token and returns the payload as a JSON object
* @param token the JWT token to decode
* @returns the payload of the JWT token
*/
static decodeToken(token: any): unknown;
/**
* Determines if a JWT token is valid or not
* @param value the JWT token to check
* @returns true if the token is valid, false otherwise
*/
static isValidToken(value: any): boolean;
}