NAME
auth.h - Bark WebAuthn passkey registration and assertion primitives.
SYNOPSIS
Classes
Parsed WebAuthn registration or assertion result.
Typedefs
Opaque passkey vault handle.
Completion callback for asynchronous passkey ceremonies.
Completion callback for boolean capability probes.
Enumerations
Normalized WebAuthn ceremony error codes.
Functions
Open or create a passkey vault backed by store_path (ignored on WASM).
Destroy a passkey vault handle.
Synchronously register a P-256 passkey and serialize the response JSON into out_json.
Synchronously sign a WebAuthn assertion and serialize the response JSON into out_json.
Verify an ES256 WebAuthn assertion offline against a base64url SPKI public key.
Extract the relying-party hostname (rpId) from an origin URL such as https://host:8443/path".
Parse a raw bark_auth_cb_fn callback payload into bark_auth_result_t.
Start an asynchronous passkey registration ceremony (isomorphic native + browser WASM).
Start an asynchronous passkey assertion ceremony (isomorphic native + browser WASM).
Return non-zero if WebAuthn / passkeys are supported in this runtime.
Asynchronously probe whether a platform (built-in) passkey authenticator is available.
Detailed Description
Bark WebAuthn passkey registration and assertion primitives.
Headless WebAuthn / FIDO2 passkey authentication (ES256 P-256).
Provides identical passkey registration and assertion flows across native desktop hosts (local encrypted software passkey store) and browser WASM (navigator.credentials.create / navigator.credentials.get).
Typedef Documentation
typedef void(* bark_auth_cb_fn) (void *user, int ok, int is_register, const char *json_or_err)
Completion callback for asynchronous passkey ceremonies. Pass the raw parameters directly to bark_auth_parse_result() to unpack structured fields and normalized error codes.
Enumeration Type Documentation
enum bark_auth_err_t
Normalized WebAuthn ceremony error codes.
Enumerator
- BARK_AUTH_ERR_OK
- Ceremony succeeded.
- BARK_AUTH_ERR_UNAVAILABLE
- WebAuthn is unavailable in this runtime.
- BARK_AUTH_ERR_CANCELED
- User canceled or browser rejected prompt.
- BARK_AUTH_ERR_NO_CREDENTIAL
- No stored passkey matched the relying party.
- BARK_AUTH_ERR_BUSY
- Too many concurrent auth requests in flight.
- BARK_AUTH_ERR_FAILED
- Cryptographic, I/O, or generic ceremony failure.
Author
Generated automatically by Doxygen for Bark from the source code.