u2f_ex v0.1.0 U2FEx

Handles registration and authentication of incoming U2F requests.

Link to this section Summary

Functions

Finishes authentication for a known U2F token

Verifies registration is complete by checking the challenge

Starts authentication against a known U2F token

Begins a registration request by creating a challenge

Link to this section Functions

Link to this function finish_authentication(user_id, device_response)
finish_authentication(user_id :: any(), device_response :: binary()) :: %{}

Finishes authentication for a known U2F token.

Link to this function finish_registration(challenge, device_response)
finish_registration(challenge :: String.t(), device_response :: binary()) ::
  boolean()

Verifies registration is complete by checking the challenge.

Link to this function start_authentication(user_id)
start_authentication(user_id :: any()) :: %{}

Starts authentication against a known U2F token.

Link to this function start_registration(username)
start_registration(username :: String.t()) ::
  {:ok, binary()} | {:error, :failed_to_store_challenge}

Begins a registration request by creating a challenge.