Added missing copyright headers.
[akkoma] / lib / pleroma / web / auth / database_authenticator.ex
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Web.Auth.DatabaseAuthenticator do
6 alias Pleroma.User
7
8 @implementation Pleroma.Config.get(
9 Pleroma.Web.Auth.DatabaseAuthenticator,
10 Pleroma.Web.Auth.PleromaDatabaseAuthenticator
11 )
12
13 @callback get_user(Plug.Conn.t()) :: {:ok, User.t()} | {:error, any()}
14 defdelegate get_user(plug), to: @implementation
15
16 @callback handle_error(Plug.Conn.t(), any()) :: any()
17 defdelegate handle_error(plug, error), to: @implementation
18 end