Aeacus.Authenticator

Safely and easily authenticate identity/passwords from any schema

Summary

Functions

Authenticates a resource based on the map keys: :identity, :password. Optionally, all configuration may be passed on the fly to support authenticating different resources

Same as authenticate/1, except a pre-loaded resource is used

Functions

authenticate(map, configuration \\ %{})

Specs

authenticate(Map.t, Map.t | none) ::
  {:ok, term} |
  {:error, String.t}

Authenticates a resource based on the map keys: :identity, :password. Optionally, all configuration may be passed on the fly to support authenticating different resources.

ex.)

Aeacus.Authenticator.authenticate %{identity: "test@example.com",
password: "1234"}
authenticate_resource(resource, map, configuration \\ %{})

Specs

authenticate_resource(Map.t, Map.t, Map.t | none) ::
  {:ok, term} |
  {:error, String.t}

Same as authenticate/1, except a pre-loaded resource is used

ex.)

Aeacus.Authenticator.authenticate resource, %{identity: "test@example.com",
password: "1234"}