1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Plugs.SessionAuthenticationPlug do
13 with saved_user_id <- get_session(conn, :user_id),
14 %{auth_user: %{id: ^saved_user_id}} <- conn.assigns do
16 |> assign(:user, conn.assigns.auth_user)