BasicAuthDecoderPlug module name
This commit is contained in:
parent
970932689f
commit
c1777e7479
@ -2,7 +2,7 @@
|
|||||||
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
|
||||||
# SPDX-License-Identifier: AGPL-3.0-only
|
# SPDX-License-Identifier: AGPL-3.0-only
|
||||||
|
|
||||||
defmodule Pleroma.Plugs.BasicAuthDecoderPlug do
|
defmodule Pleroma.Web.Plugs.BasicAuthDecoderPlug do
|
||||||
import Plug.Conn
|
import Plug.Conn
|
||||||
|
|
||||||
def init(options) do
|
def init(options) do
|
||||||
|
@ -26,7 +26,7 @@ defmodule Pleroma.Web.Router do
|
|||||||
|
|
||||||
pipeline :authenticate do
|
pipeline :authenticate do
|
||||||
plug(Pleroma.Web.Plugs.OAuthPlug)
|
plug(Pleroma.Web.Plugs.OAuthPlug)
|
||||||
plug(Pleroma.Plugs.BasicAuthDecoderPlug)
|
plug(Pleroma.Web.Plugs.BasicAuthDecoderPlug)
|
||||||
plug(Pleroma.Web.Plugs.UserFetcherPlug)
|
plug(Pleroma.Web.Plugs.UserFetcherPlug)
|
||||||
plug(Pleroma.Web.Plugs.SessionAuthenticationPlug)
|
plug(Pleroma.Web.Plugs.SessionAuthenticationPlug)
|
||||||
plug(Pleroma.Web.Plugs.LegacyAuthenticationPlug)
|
plug(Pleroma.Web.Plugs.LegacyAuthenticationPlug)
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
defmodule Pleroma.Web.Plugs.BasicAuthDecoderPlugTest do
|
defmodule Pleroma.Web.Plugs.BasicAuthDecoderPlugTest do
|
||||||
use Pleroma.Web.ConnCase, async: true
|
use Pleroma.Web.ConnCase, async: true
|
||||||
|
|
||||||
alias Pleroma.Plugs.BasicAuthDecoderPlug
|
alias Pleroma.Web.Plugs.BasicAuthDecoderPlug
|
||||||
|
|
||||||
defp basic_auth_enc(username, password) do
|
defp basic_auth_enc(username, password) do
|
||||||
"Basic " <> Base.encode64("#{username}:#{password}")
|
"Basic " <> Base.encode64("#{username}:#{password}")
|
||||||
|
Loading…
Reference in New Issue
Block a user