1 defmodule Pleroma.Web.Auth.PleromaDatabaseAuthenticator do
5 @behaviour Pleroma.Web.Auth.DatabaseAuthenticator
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