Skip to content

Commit

Permalink
Merge pull request #112 from PlaidWeb/feature/update-cb-docs
Browse files Browse the repository at this point in the history
Updating callback docs
  • Loading branch information
fluffy-critter committed Apr 15, 2023
2 parents 2bfe2d2 + 0db6bf7 commit 7d0ce7a
Show file tree
Hide file tree
Showing 7 changed files with 151 additions and 159 deletions.
6 changes: 5 additions & 1 deletion authl/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ class AuthlFlask:
:param str callback_name: The endpoint name for the callback handler,
for flask.url_for()
:param str callback_path: The mount point of the callback handler endpoint
:param str callback_path: The mount point of the callback handler endpoints.
For example, if this is set to ``/login_cb`` then your actual handler
callbacks will be at ``/login_cb/{cb_id}`` for the handler's ``cb_id``
property; for example, the py:class:`handler.email_addr.EmailAddress`
handler's callback will be mounted at ``/login_cb/e``.
:param str tester_name: The endpoint name for the URL tester, for
flask.url_for()
Expand Down
4 changes: 3 additions & 1 deletion authl/handlers/email_addr.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
See :py:func:`from_config` for the simplest configuration mechanism.
This handler registers itself with a ``cb_id`` of ``"e"``.
"""

import email
Expand Down Expand Up @@ -49,7 +51,7 @@ class EmailAddress(Handler):
:param int expires_time: how long the email link should be valid for, in
seconds (default: 900)
:param dict pending_storage: Storage to keep track of pending email addresses,
for DDOS/abuse mitigation. Defaults to an ExpiringDict that expires
for DDOS/abuse mitigation. Defaults to an :py:class:`ExpiringDict` that expires
after ``expires_time``
:param str email_template_text: the plaintext template for the sent
email, provided as a template string
Expand Down
2 changes: 2 additions & 0 deletions authl/handlers/fediverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
See :py:func:`from_config` for the simplest configuration mechanism.
This handler registers itself with a ``cb_id`` of ``"fv"``.
"""

import logging
Expand Down
4 changes: 3 additions & 1 deletion authl/handlers/indieauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
whatever framework you're using. Please note also that the scheme (``http`` vs.
``https``) must match.
This handler registers itself with a ``cb_id`` of ``"ia"``.
"""

import logging
Expand Down Expand Up @@ -112,7 +114,7 @@ def _derive_endpoint(links, content, rel) -> typing.Optional[str]:
'ticket_endpoint',
'webmention',
'micropub',
'microsub',
'microsub'
):
endpoint = _derive_endpoint(links, content, rel)
if endpoint:
Expand Down
2 changes: 2 additions & 0 deletions authl/handlers/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
See :py:func:`from_config` for the simplest configuration mechanism.
This handler registers itself with a ``cb_id`` of ``"t"``.
"""

import logging
Expand Down
280 changes: 130 additions & 150 deletions poetry.lock

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
beautifulsoup4==4.11.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" \
--hash=sha256:0e79446b10b3ecb499c1556f7e228a53e64a2bfcebd455f370d8927cb5b59e39 \
--hash=sha256:bc4bdda6717de5a2987436fb8d72f45dc90dd856bdfd512a1314ce90349a0106
beautifulsoup4==4.12.2 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" \
--hash=sha256:492bbc69dca35d12daac71c4db1bfff0c876c00ef4a2ffacce226d4638eb72da \
--hash=sha256:bd2520ca0d9d7d12694a53d44ac482d181b4ec1888909b035a3dbf40d0f57d4a
blurhash==1.1.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" \
--hash=sha256:7611c1bc41383d2349b6129208587b5d61e8792ce953893cb49c38beeb400d1d \
--hash=sha256:da56b163e5a816e4ad07172f5639287698e09d7f3dc38d18d9726d9c1dbc4cee
Expand Down Expand Up @@ -124,9 +124,9 @@ six==1.16.0 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" \
soupsieve==2.4 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" \
--hash=sha256:49e5368c2cda80ee7e84da9dbe3e110b70a4575f196efb74e51b94549d921955 \
--hash=sha256:e28dba9ca6c7c00173e34e4ba57448f0688bb681b7c5e8bf4971daafc093d69a
urllib3==1.26.14 ; python_full_version >= "3.8.1" and python_version < "4" \
--hash=sha256:076907bf8fd355cde77728471316625a4d2f7e713c125f51953bb5b3eecf4f72 \
--hash=sha256:75edcdc2f7d85b137124a6c3c9fc3933cdeaa12ecb9a6a959f22797a0feca7e1
urllib3==1.26.15 ; python_full_version >= "3.8.1" and python_version < "4" \
--hash=sha256:8a388717b9476f934a21484e8c8e61875ab60644d29b9b39e11e4b9dc1c6b305 \
--hash=sha256:aa751d169e23c7479ce47a0cb0da579e3ede798f994f5816a74e4f4500dcea42
validate-email==1.3 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" \
--hash=sha256:784719dc5f780be319cdd185dc85dd93afebdb6ebb943811bc4c7c5f9c72aeaf
webencodings==0.5.1 ; python_full_version >= "3.8.1" and python_full_version < "4.0.0" \
Expand Down

0 comments on commit 7d0ce7a

Please sign in to comment.