1 defmodule Pleroma.Web.Authenticator do
5 @behaviour Pleroma.Web.AuthenticatorAdapter
7 def get_user(%Plug.Conn{} = conn) do
8 %{"authorization" => %{"name" => name, "password" => password}} = conn.params
10 with {_, %User{} = user} <- {:user, User.get_by_nickname_or_email(name)},
11 {_, true} <- {:checkpw, Pbkdf2.checkpw(password, user.password_hash)} do
19 def handle_error(%Plug.Conn{} = _conn, error) do