AshAuthentication.Test.WebAuthnFixtures (ash_authentication v5.0.0-rc.7)

Copy Markdown View Source

Generates valid WebAuthn registration and authentication fixture data using programmatic EC key pairs and CBOR encoding.

This allows testing the full Wax verification pipeline without a browser. Uses "none" attestation format for simplicity.

Summary

Functions

Generate a WebAuthn authentication fixture that matches a previous registration.

Generate a complete WebAuthn registration fixture.

Functions

generate_authentication(registration, opts \\ [])

Generate a WebAuthn authentication fixture that matches a previous registration.

Takes the output of generate_registration/1 as input.

generate_registration(opts \\ [])

Generate a complete WebAuthn registration fixture.

Returns a map with all data needed to call Wax.register/3 and to persist the credential. Includes the private key for generating matching authentication fixtures.