2019-02-26 06:26:54 -07:00
|
|
|
# Pleroma: A lightweight social networking server
|
2021-01-12 23:49:20 -07:00
|
|
|
# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
|
2019-02-26 06:26:54 -07:00
|
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
|
2019-02-28 04:12:41 -07:00
|
|
|
defmodule Pleroma.Web.Auth.Authenticator do
|
2021-06-07 17:07:54 -06:00
|
|
|
@callback get_user(Plug.Conn.t()) :: {:ok, user :: struct()} | {:error, any()}
|
|
|
|
@callback create_from_registration(Plug.Conn.t(), registration :: struct()) ::
|
2019-03-15 08:08:03 -06:00
|
|
|
{:ok, User.t()} | {:error, any()}
|
2021-06-07 17:07:54 -06:00
|
|
|
@callback get_registration(Plug.Conn.t()) :: {:ok, registration :: struct()} | {:error, any()}
|
2019-02-26 05:27:01 -07:00
|
|
|
@callback handle_error(Plug.Conn.t(), any()) :: any()
|
2019-02-28 03:58:58 -07:00
|
|
|
@callback auth_template() :: String.t() | nil
|
2019-03-27 06:39:35 -06:00
|
|
|
@callback oauth_consumer_template() :: String.t() | nil
|
2019-02-26 05:27:01 -07:00
|
|
|
end
|