import { JwtPayload } from "jsonwebtoken"; /** * A public interface for auth tokens. * * @interface IAuthToken */ export interface IAuthToken { getAuthToken(): string; } /** * Strip "Bearer " from the passed header. * * @param {string} header - A Bearer token * @returns {string} The token after stripping "Bearer " */ export declare function stripBearer(header: string): string; /** * Implements ShopperJWT auth scheme. Gets ShopperJWT Bearer tokens of type * `guest` and `credentials`. * * @class ShopperToken * @implements {IAuthToken} */ export declare class ShopperToken implements IAuthToken { rawToken: string; decodedToken: null | JwtPayload | string; customerInfo: T; constructor(dto: T, token: string); /** * Returns the JWT. * * @returns {string} JWT * * @memberof ShopperToken */ getAuthToken(): string; /** * Returns a Bearer token i.e. `Bearer `. * * @returns {string} The JWT with "Bearer " added to the front * * @memberof ShopperToken */ getBearerHeader(): string; /** * Retrieves the customer information. * * @returns Customer information this object is instantiated with */ getCustomerInfo(): T; }