user: check that the follow request actually has an active account associated with it
[akkoma] / lib / pleroma / captcha / captcha_service.ex
index ae1d6e7c715a0f71bc66eb8e31501ac3fc272784..a820751a8f6622ec7619caf77bfbf961ed9a3fb4 100644 (file)
@@ -1,5 +1,8 @@
-defmodule Pleroma.Captcha.Service do
+# Pleroma: A lightweight social networking server
+# Copyright © 2017-2019 Pleroma Authors <https://pleroma.social/>
+# SPDX-License-Identifier: AGPL-3.0-only
 
+defmodule Pleroma.Captcha.Service do
   @doc """
   Request new captcha from a captcha service.
 
@@ -20,5 +23,10 @@ defmodule Pleroma.Captcha.Service do
 
   `true` if captcha is valid, `false` if not
   """
-  @callback validate(token :: String.t, captcha :: String.t) :: boolean
+  @callback validate(token :: String.t(), captcha :: String.t()) :: boolean
+
+  @doc """
+  This function is called periodically to clean up old captchas
+  """
+  @callback cleanup() :: :ok
 end