| import { JwtHeader, JwtPayload, SupportedStorage, User } from './types'; |
| import { Uint8Array_ } from './webauthn.dom'; |
| export declare function expiresAt(expiresIn: number): number; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| export declare function generateCallbackId(): symbol; |
| export declare const isBrowser: () => boolean; |
| |
| |
| |
| export declare const supportsLocalStorage: () => boolean; |
| |
| |
| |
| export declare function parseParametersFromURL(href: string): { |
| [parameter: string]: string; |
| }; |
| type Fetch = typeof fetch; |
| export declare const resolveFetch: (customFetch?: Fetch) => Fetch; |
| export declare const looksLikeFetchResponse: (maybeResponse: unknown) => maybeResponse is Response; |
| export declare const setItemAsync: (storage: SupportedStorage, key: string, data: any) => Promise<void>; |
| export declare const getItemAsync: (storage: SupportedStorage, key: string) => Promise<unknown>; |
| export declare const removeItemAsync: (storage: SupportedStorage, key: string) => Promise<void>; |
| |
| |
| |
| |
| |
| export declare class Deferred<T = any> { |
| static promiseConstructor: PromiseConstructor; |
| readonly promise: PromiseLike<T>; |
| readonly resolve: (value?: T | PromiseLike<T>) => void; |
| readonly reject: (reason?: any) => any; |
| constructor(); |
| } |
| export declare function decodeJWT(token: string): { |
| header: JwtHeader; |
| payload: JwtPayload; |
| signature: Uint8Array_; |
| raw: { |
| header: string; |
| payload: string; |
| }; |
| }; |
| |
| |
| |
| export declare function sleep(time: number): Promise<null>; |
| |
| |
| |
| |
| |
| export declare function retryable<T>(fn: (attempt: number) => Promise<T>, isRetryable: (attempt: number, error: any | null, result?: T) => boolean): Promise<T>; |
| export declare function generatePKCEVerifier(): string; |
| export declare function generatePKCEChallenge(verifier: string): Promise<string>; |
| export declare function getCodeChallengeAndMethod(storage: SupportedStorage, storageKey: string, isPasswordRecovery?: boolean): Promise<string[]>; |
| export declare function parseResponseAPIVersion(response: Response): Date | null; |
| export declare function validateExp(exp: number): void; |
| export declare function getAlgorithm(alg: 'HS256' | 'RS256' | 'ES256' | (string & {})): RsaHashedImportParams | EcKeyImportParams; |
| export declare function validateUUID(str: string): void; |
| export declare function assertPasskeyExperimentalEnabled(experimental: { |
| passkey?: boolean; |
| }): void; |
| export declare function userNotAvailableProxy(): User; |
| |
| |
| |
| |
| |
| |
| |
| |
| export declare function insecureUserWarningProxy(user: User, suppressWarningRef: { |
| value: boolean; |
| }): User; |
| |
| |
| |
| |
| export declare function deepClone<T>(obj: T): T; |
| export {}; |
| |