1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Captcha.Service do
7 Request new captcha from a captcha service.
11 Type/Name of the service, the token to identify the captcha,
12 the data of the answer and service-specific data to use the newly created captcha
21 Validated the provided captcha solution.
24 * `token` the captcha is associated with
25 * `captcha` solution of the captcha to validate
26 * `answer_data` is the data needed to validate the answer (presumably encrypted)
30 `true` if captcha is valid, `false` if not
34 captcha :: String.t(),
36 ) :: :ok | {:error, String.t()}