AshAuthentication.Strategy.WebAuthn.Helpers (ash_authentication v5.0.0-rc.7)

Copy Markdown View Source

Helper functions for the WebAuthn strategy.

Handles multi-tenant rp_id/rp_name resolution and Wax option building.

Summary

Functions

Resolve the origin, which may be explicit, dynamic per tenant, or derived from rp_id.

Resolve the Relying Party ID, which may be static or dynamic per tenant.

Resolve the Relying Party name, which may be static or dynamic per tenant.

Build Wax options from the strategy, resolving dynamic values for the given tenant.

Functions

resolve_origin(strategy, tenant)

@spec resolve_origin(AshAuthentication.Strategy.WebAuthn.t(), any()) :: String.t()

Resolve the origin, which may be explicit, dynamic per tenant, or derived from rp_id.

resolve_rp_id(map, tenant)

@spec resolve_rp_id(AshAuthentication.Strategy.WebAuthn.t(), any()) :: String.t()

Resolve the Relying Party ID, which may be static or dynamic per tenant.

resolve_rp_name(map, tenant)

@spec resolve_rp_name(AshAuthentication.Strategy.WebAuthn.t(), any()) :: String.t()

Resolve the Relying Party name, which may be static or dynamic per tenant.

wax_opts(strategy, tenant)

Build Wax options from the strategy, resolving dynamic values for the given tenant.