1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Web.Auth.WrapperAuthenticator do
6 @behaviour Pleroma.Web.Auth.Authenticator
10 Pleroma.Web.Auth.Authenticator,
11 Pleroma.Web.Auth.PleromaAuthenticator
16 def get_user(plug), do: implementation().get_user(plug)
19 def create_from_registration(plug, registration),
20 do: implementation().create_from_registration(plug, registration)
23 def get_registration(plug), do: implementation().get_registration(plug)
26 def handle_error(plug, error),
27 do: implementation().handle_error(plug, error)
31 # Note: `config :pleroma, :auth_template, "..."` support is deprecated
32 implementation().auth_template() ||
33 Pleroma.Config.get(:auth_template) ||
38 def oauth_consumer_template do
39 implementation().oauth_consumer_template() ||
40 Pleroma.Config.get([:auth, :oauth_consumer_template], "consumer.html")