@teamhanko/hanko-frontend-sdk
Version:
A package for simplifying UI integration with the Hanko API. It is meant for use in browsers only.
39 lines (38 loc) • 1 kB
TypeScript
/**
* Options for SessionStorage
*
* @category SDK
* @subcategory Internal
* @property {string} keyName - The name of the sessionStorage session token entry set from the SDK.
*/
interface SessionStorageOptions {
keyName: string;
}
/**
* A class to manage sessionStorage.
*
* @category SDK
* @subcategory Internal
* @param {SessionStorageOptions} options - The options that can be used.
*/
export declare class SessionStorage {
keyName: string;
constructor(options: SessionStorageOptions);
/**
* Return the session token that was stored in the sessionStorage.
*
* @return {string}
*/
getSessionToken(): string;
/**
* Stores the session token in the sessionStorage.
*
* @param {string} token - The session token to be stored.
*/
setSessionToken(token: string): void;
/**
* Removes the session token used for authentication.
*/
removeSessionToken(): void;
}
export {};