@yubion-dev-team/yubion-fido2-server-sdk-client-js
Version:
This project is a client-side SDK to support WebAuthn API calls for YubiOn FIDO2 Server Service.
25 lines (24 loc) • 1.4 kB
TypeScript
/**
* Converts a JSON-friendly `PublicKeyCredentialCreationOptions` object into the
* format expected by the `navigator.credentials.create()` method by decoding
* Base64URL strings into `ArrayBuffer`s.
* @param creationOptionsJson The JSON-friendly creation options.
* @returns The binary-compatible creation options.
*/
export declare function convertCreationOptionsToBinary(creationOptionsJson: PublicKeyCredentialCreationOptionsJSON): PublicKeyCredentialCreationOptions;
/**
* Converts a `PublicKeyCredential` object returned by the WebAuthn API into a
* JSON-serializable object by recursively encoding all `ArrayBuffer` and `TypedArray`
* instances into Base64URL strings.
* @param pubKeyCred The `PublicKeyCredential` object.
* @returns A JSON-serializable representation of the credential.
*/
export declare function convertPublicKeyCredentialToJsonable(pubKeyCred: PublicKeyCredential): PublicKeyCredentialJSON;
/**
* Converts a JSON-friendly `PublicKeyCredentialRequestOptions` object into the
* format expected by the `navigator.credentials.get()` method by decoding
* Base64URL strings into `ArrayBuffer`s.
* @param requestOptionsJson The JSON-friendly request options.
* @returns The binary-compatible request options.
*/
export declare function convertRequestOptionsToBinary(requestOptionsJson: PublicKeyCredentialRequestOptionsJSON): PublicKeyCredentialRequestOptions;