X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fplugs%2Fauthentication_plug.ex;h=14654f2e6ff6f73aa8d7aa86cc6872e914b139f4;hb=2a298d70f9938d1b6d5af04d8b8863fdd3299f46;hp=d47c3fdae75e63deee1b7fda2e9693ac54e0f4d0;hpb=c48c381e909240dcece9f961e4728fa712d089cc;p=akkoma diff --git a/lib/pleroma/plugs/authentication_plug.ex b/lib/pleroma/plugs/authentication_plug.ex index d47c3fdae..14654f2e6 100644 --- a/lib/pleroma/plugs/authentication_plug.ex +++ b/lib/pleroma/plugs/authentication_plug.ex @@ -1,11 +1,14 @@ defmodule Pleroma.Plugs.AuthenticationPlug do alias Comeonin.Pbkdf2 import Plug.Conn + alias Pleroma.User def init(options) do options end + def call(%{assigns: %{user: %User{}}} = conn, _), do: conn + def call(conn, opts) do with {:ok, username, password} <- decode_header(conn), {:ok, user} <- opts[:fetcher].(username),