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