@auth0/auth0-spa-js
Version:
Auth0 SDK for Single Page Applications using Authorization Code Grant Flow with PKCE
28 lines (27 loc) • 1.35 kB
TypeScript
import { type KeyPair } from './utils';
declare const TABLES: {
readonly NONCE: "nonce";
readonly KEYPAIR: "keypair";
};
type Table = (typeof TABLES)[keyof typeof TABLES];
export declare class DpopStorage {
protected readonly clientId: string;
protected dbHandle: IDBDatabase | undefined;
constructor(clientId: string);
protected getVersion(): number;
protected createDbHandle(): Promise<IDBDatabase>;
protected getDbHandle(): Promise<IDBDatabase>;
protected executeDbRequest<T = unknown>(table: string, mode: IDBTransactionMode, requestFactory: (table: IDBObjectStore) => IDBRequest<T>): Promise<T>;
protected buildKey(id?: string): string;
setNonce(nonce: string, id?: string): Promise<void>;
setKeyPair(keyPair: KeyPair): Promise<void>;
protected save(table: Table, key: IDBValidKey, obj: unknown): Promise<void>;
findNonce(id?: string): Promise<string | undefined>;
findKeyPair(): Promise<KeyPair | undefined>;
protected find<T = unknown>(table: Table, key: IDBValidKey): Promise<T | undefined>;
protected deleteBy(table: Table, predicate: (key: IDBValidKey) => boolean): Promise<void>;
protected deleteByClientId(table: Table, clientId: string): Promise<void>;
clearNonces(): Promise<void>;
clearKeyPairs(): Promise<void>;
}
export {};