Plug handlers for the WebAuthn strategy.
Handles registration challenges, registration, authentication challenges, and authentication via HTTP requests. Challenges are stored in the Plug session.
Summary
Functions
Handle an add_credential request — attach a new credential to the
authenticated user.
Generate and return a registration challenge for adding a credential to the current user.
Generate and return an authentication challenge.
Handle a registration request.
Generate and return a registration challenge.
Handle an authentication request.
Functions
@spec add_credential(Plug.Conn.t(), AshAuthentication.Strategy.WebAuthn.t()) :: Plug.Conn.t()
Handle an add_credential request — attach a new credential to the
authenticated user.
Requires an authenticated actor on the connection.
@spec add_credential_challenge(Plug.Conn.t(), AshAuthentication.Strategy.WebAuthn.t()) :: Plug.Conn.t()
Generate and return a registration challenge for adding a credential to the current user.
Requires an authenticated actor on the connection.
@spec authentication_challenge(Plug.Conn.t(), AshAuthentication.Strategy.WebAuthn.t()) :: Plug.Conn.t()
Generate and return an authentication challenge.
@spec register(Plug.Conn.t(), AshAuthentication.Strategy.WebAuthn.t()) :: Plug.Conn.t()
Handle a registration request.
@spec registration_challenge(Plug.Conn.t(), AshAuthentication.Strategy.WebAuthn.t()) :: Plug.Conn.t()
Generate and return a registration challenge.
@spec sign_in(Plug.Conn.t(), AshAuthentication.Strategy.WebAuthn.t()) :: Plug.Conn.t()
Handle an authentication request.