Auth subsystem refactoring and tweaks.
[akkoma] / lib / pleroma / web / plugs / user_fetcher_plug.ex
index 235c77d854e27cf80a01049030ec4eb343b3787a..89e16b49f0b278a92b57483ee248354ee49c94d1 100644 (file)
@@ -2,7 +2,13 @@
 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
 # SPDX-License-Identifier: AGPL-3.0-only
 
-defmodule Pleroma.Plugs.UserFetcherPlug do
+defmodule Pleroma.Web.Plugs.UserFetcherPlug do
+  @moduledoc """
+  Assigns `:auth_user` basing on `:auth_credentials`.
+
+  NOTE: no checks are performed at this step, auth_credentials/username could be easily faked.
+  """
+
   alias Pleroma.User
   import Plug.Conn