/** * @typedef {import('@simplewebauthn/browser').PublicKeyCredentialCreationOptionsJSON} PublicKeyCredentialCreationOptionsJSON * @typedef {import('@simplewebauthn/browser').RegistrationResponseJSON} RegistrationResponseJSON */ /** * Stimulus controller for WebAuthn registration (credential creation). * * Usage: * ```html *
* * * * *
* ``` */ export default class RegistrationController extends BaseController { static values: { optionsUrl: { type: StringConstructor; default: string; }; resultUrl: { type: StringConstructor; default: string; }; submitViaForm: { type: BooleanConstructor; default: boolean; }; successRedirectUri: StringConstructor; autoRegister: { type: BooleanConstructor; default: boolean; }; requestHeaders: { type: ObjectConstructor; default: { 'Content-Type': string; Accept: string; }; }; }; connect(): Promise; /** * Register a new WebAuthn credential. * * @param {Event} event Form submit event. * @returns {Promise} */ register(event: Event): Promise; /** * Start registration process. * * @private * @returns {Promise} */ private _startRegistration; /** * Process registration with WebAuthn. * * @private * @param {PublicKeyCredentialCreationOptionsJSON} options WebAuthn credential creation options. * @returns {Promise} */ private _processRegistration; } export type PublicKeyCredentialCreationOptionsJSON = import("@simplewebauthn/browser").PublicKeyCredentialCreationOptionsJSON; export type RegistrationResponseJSON = import("@simplewebauthn/browser").RegistrationResponseJSON; import BaseController from './base-controller.js';