import Base, { MaybeRaw } from "../../Base"; import { Passkey, PasskeyAuthenticationCredential, PasskeyAuthenticationOptions, PasskeyRegistrationCredential, PasskeyRegistrationOptions } from "../../interfaces/idp/user/Passkey"; import { SuccessfulAuth } from "../../interfaces/idp/user/SuccessfulAuth"; export declare class IdpPasskey extends Base { /** * Requests options for registering a new passkey for the currently authenticated user. Pass the returned object * into `navigator.credentials.create()` to have the browser/authenticator create a new credential, then submit * the result to {@link verifyRegistration}. * @returns PasskeyRegistrationOptions object to be passed into `navigator.credentials.create()` */ createRegistrationOptions(raw?: { raw: R; }): Promise>; /** * Verifies a newly created passkey credential and, if valid, stores it for the currently authenticated user. * @param credential The credential returned by `navigator.credentials.create()`, together with a user-friendly name for the passkey * @returns The newly stored Passkey */ verifyRegistration(credential: PasskeyRegistrationCredential, raw?: { raw: R; }): Promise>; /** * Requests all passkeys registered for the currently authenticated user. * @returns Array of Passkey objects */ getPasskeys(raw?: { raw: R; }): Promise>; /** * Deletes a passkey registered for the currently authenticated user. * @param credentialId Base64url-encoded credential ID of the passkey to delete */ deletePasskey(credentialId: string, raw?: { raw: R; }): Promise>; /** * Requests options for logging in with a passkey. This endpoint requires no authentication and does not identify * the user upfront - any passkey registered for this relying party may be used. Pass the returned object into * `navigator.credentials.get()` to have the browser/authenticator produce an assertion, then submit the result * to {@link verifyAuthentication}. * @returns PasskeyAuthenticationOptions object to be passed into `navigator.credentials.get()` */ createAuthenticationOptions(raw?: { raw: R; }): Promise>; /** * Verifies a passkey authentication assertion. This endpoint requires no authentication. On success, the user is * logged in and the response carries the Authorization header and auth_token cookie of the new session. * @param credential The credential returned by `navigator.credentials.get()` * @returns SuccessfulAuth object holding the token and the authenticated user */ verifyAuthentication(credential: PasskeyAuthenticationCredential, raw?: { raw: R; }): Promise>; protected getEndpoint(endpoint: string): string; }