1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Helpers.AuthHelper do
6 alias Pleroma.Web.Plugs.OAuthScopesPlug
9 Skips OAuth permissions (scopes) checks, assigns nil `:token`.
10 Intended to be used with explicit authentication and only when OAuth token cannot be determined.
12 def skip_oauth(conn) do
14 |> Plug.Conn.assign(:token, nil)
15 |> OAuthScopesPlug.skip_plug()