AshAuthentication.Strategy.WebAuthn.Plug (ash_authentication v5.0.0-rc.6)

Copy Markdown View Source

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

add_credential(conn, strategy)

Handle an add_credential request — attach a new credential to the authenticated user.

Requires an authenticated actor on the connection.

add_credential_challenge(conn, strategy)

@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.

authentication_challenge(conn, strategy)

@spec authentication_challenge(Plug.Conn.t(), AshAuthentication.Strategy.WebAuthn.t()) ::
  Plug.Conn.t()

Generate and return an authentication challenge.

register(conn, strategy)

Handle a registration request.

registration_challenge(conn, strategy)

@spec registration_challenge(Plug.Conn.t(), AshAuthentication.Strategy.WebAuthn.t()) ::
  Plug.Conn.t()

Generate and return a registration challenge.

sign_in(conn, strategy)

Handle an authentication request.