Browse Source

Add refs back to interface and API in the plugin specs

Alec Nikolas Reiter 7 years ago
parent
commit
fe88bc571a
2 changed files with 21 additions and 1 deletions
  1. 3 1
      docs/hooks.rst
  2. 18 0
      flaskbb/plugins/spec.py

+ 3 - 1
docs/hooks.rst

@@ -17,6 +17,9 @@ A hook needs a hook specification which are defined in
 :mod:`flaskbb.plugins.spec`. All hooks have to be prefixed with
 :mod:`flaskbb.plugins.spec`. All hooks have to be prefixed with
 ``flaskbb_`` and template hooks with ``flaskbb_tpl_``.
 ``flaskbb_`` and template hooks with ``flaskbb_tpl_``.
 
 
+Be sure to also check out the :ref:`api` documentation for interfaces that
+interact with these plugins in interesting ways.
+
 
 
 Python Hooks
 Python Hooks
 ------------
 ------------
@@ -77,7 +80,6 @@ FlaskBB Form Hooks
 
 
 .. autofunction:: flaskbb_form_new_post_save
 .. autofunction:: flaskbb_form_new_post_save
 .. autofunction:: flaskbb_form_new_post
 .. autofunction:: flaskbb_form_new_post
-
 .. autofunction:: flaskbb_form_new_topic
 .. autofunction:: flaskbb_form_new_topic
 .. autofunction:: flaskbb_form_new_topic_save
 .. autofunction:: flaskbb_form_new_topic_save
 
 

+ 18 - 0
flaskbb/plugins/spec.py

@@ -166,6 +166,9 @@ def flaskbb_authenticate(identifier, secret):
     authentication is tried last to give others an attempt to
     authentication is tried last to give others an attempt to
     authenticate the user instead.
     authenticate the user instead.
 
 
+    See also:
+    :class:`AuthenticationProvider<flaskbb.core.auth.AuthenticationProvider>`
+
     Example of alternative auth::
     Example of alternative auth::
 
 
         def ldap_auth(identifier, secret):
         def ldap_auth(identifier, secret):
@@ -222,6 +225,9 @@ def flaskbb_post_authenticate(user):
     :class:`flaskbb.core.exceptions.StopAuthentication`
     :class:`flaskbb.core.exceptions.StopAuthentication`
     and include why the login was prevented.
     and include why the login was prevented.
 
 
+    See also:
+    :class:`PostAuthenticationHandler<flaskbb.core.auth.PostAuthenticationHandler>`
+
     Example::
     Example::
 
 
         def post_auth(user):
         def post_auth(user):
@@ -243,6 +249,9 @@ def flaskbb_authentication_failed(identifier):
     :class:`flaskbb.core.exceptions.StopAuthentication`
     :class:`flaskbb.core.exceptions.StopAuthentication`
     is raised during the login process.
     is raised during the login process.
 
 
+    See also:
+    :class:`AuthenticationFailureHandler<flaskbb.core.auth.AuthenticationFailureHandler>`
+
     Example::
     Example::
 
 
         def mark_failed_logins(identifier):
         def mark_failed_logins(identifier):
@@ -277,6 +286,9 @@ def flaskbb_reauth_attempt(user, secret):
     If a hook decides that a reauthenticate attempt should
     If a hook decides that a reauthenticate attempt should
     cease, it may raise StopAuthentication.
     cease, it may raise StopAuthentication.
 
 
+    See also:
+    :class:`ReauthenticateProvider<flaskbb.core.auth.ReauthenticateProvider>`
+
     Example of checking secret or passing to the next implementer::
     Example of checking secret or passing to the next implementer::
 
 
         @impl
         @impl
@@ -303,6 +315,9 @@ def flaskbb_post_reauth(user):
     may still force a reauth to fail by raising StopAuthentication.
     may still force a reauth to fail by raising StopAuthentication.
 
 
     Results from these hooks are not considered.
     Results from these hooks are not considered.
+
+    See also:
+    :class:`PostReauthenticateHandler<flaskbb.core.auth.PostAuthenticationHandler>`
     """
     """
 
 
 @spec
 @spec
@@ -316,6 +331,9 @@ def flaskbb_reauth_failed(user):
     If an implementation raises ForceLogout it should register
     If an implementation raises ForceLogout it should register
     itself as trylast to give other reauth failed handlers an
     itself as trylast to give other reauth failed handlers an
     opprotunity to run first.
     opprotunity to run first.
+
+    See also:
+    :class:`ReauthenticateFailureHandler<flaskbb.core.auth.ReauthenticateFailureHandler>`
     """
     """
 
 
 # Form hooks
 # Form hooks