Skip to content

Commit

Permalink
RST improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
fluffy-critter committed Apr 15, 2023
1 parent 7d0ce7a commit 4ff3958
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 12 deletions.
6 changes: 3 additions & 3 deletions authl/flask.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ class AuthlFlask:
: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`
property; for example, the :py:class:`authl.handlers.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
Expand All @@ -173,7 +173,7 @@ class AuthlFlask:
This function takes the following arguments; note that more may
be added so it should also take a ``**kwargs`` for future compatibility:
* ``auth``: the authl.Authl object
* ``auth``: the :py:class:`authl.Authl` object
* ``login_url``: the URL to use for the login form
Expand Down Expand Up @@ -220,7 +220,7 @@ class AuthlFlask:
:param function on_verified: A function to call on successful login (called
after setting the session value)
This function receives the :py:class:`disposition.Verified` object, and
This function receives the :py:class:`authl.disposition.Verified` object, and
may return a Flask response of its own, which should ideally be a
``flask.redirect()``. This can be used to capture more information about
the user (such as filling out a user profile) or to redirect certain
Expand Down
2 changes: 1 addition & 1 deletion authl/handlers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def handles_url(self, url: str) -> typing.Optional[str]:
It is okay to check for an API endpoint (relative to the URL) in
implementing this. However, if the content kept at the URL itself needs
to be parsed to make the determination, implement that in
:py:func:`handles_page` instead.
:py:meth:`handles_page` instead.
Whatever value this returns will be passed back in to initiate_auth, so
if that value matters, return a reasonable URL.
Expand Down
9 changes: 5 additions & 4 deletions authl/handlers/email_addr.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
documentation for the appropriate configuration. This should also be able to
work with your regular email provider.
See :py:func:`from_config` for the simplest configuration mechanism.
See :py:func:`authl.from_config` for the simplest configuration mechanism.
This handler registers itself with a ``cb_id`` of ``"e"``.
Expand Down Expand Up @@ -224,8 +224,8 @@ def simple_sendmail(connector, sender_address, subject):
:param function connector: A factory-type function that returns an
:py:class:`smtplib.SMTP`-compatible object in the connected state.
Use :py:func:`smtplib_connector` for an easy-to-use general-purpose
connector.
Use :py:func:`authl.handlers.email_addr.smtplib_connector` for an
easy-to-use general-purpose connector.
:param str sender_address: The email address to use for the sender
:param str subject: the subject line to attach to the message
Expand Down Expand Up @@ -255,7 +255,8 @@ def from_config(config, token_store: tokens.TokenStore):
keys:
* ``EMAIL_SENDMAIL``: a function to call to send the email; if omitted,
generates one using :py:func:`simple_sendmail` configured with:
generates one using :py:func:`authl.handlers.email_addr.simple_sendmail`
configured with:
* ``EMAIL_FROM``: the ``From:`` address to use when sending an email
Expand Down
2 changes: 1 addition & 1 deletion authl/handlers/fediverse.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<https://joinmastodon.org>`_ and `Pleroma <https://pleroma.social>`_ are
supported, as is anything else with basic support for the Mastodon client API.
See :py:func:`from_config` for the simplest configuration mechanism.
See :py:func:`authl.from_config` for the simplest configuration mechanism.
This handler registers itself with a ``cb_id`` of ``"fv"``.
Expand Down
4 changes: 2 additions & 2 deletions authl/handlers/indieauth.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
This handler allows people to log in from their own websites using the
`IndieAuth <https://indieauth.net/>`_ federated protocol. See
:py:func:`from_config` for the simplest configuration mechanism.
:py:func:`authl.from_config` for the simplest configuration mechanism.
Note that the client ID must match the domain name of your website. If you're
using this with :py:mod:`authl.flask`, there is a function,
Expand Down Expand Up @@ -314,7 +314,7 @@ def handles_url(self, url):
"""
If this page is already known to have an IndieAuth endpoint, we reuse
that; otherwise this returns ``None`` so the Authl instance falls
through to :py:func:`handles_page`.
through to :py:meth:`authl.handlers.indieauth.IndieAuth.handles_page`.
"""
if url in _ENDPOINT_CACHE:
return _ENDPOINT_CACHE[url][1]
Expand Down
2 changes: 1 addition & 1 deletion authl/handlers/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
``client_secret`` in an environment variable rather than by checked-in code, as
a basic security precaution against credential leaks.
See :py:func:`from_config` for the simplest configuration mechanism.
See :py:func:`authl.from_config` for the simplest configuration mechanism.
This handler registers itself with a ``cb_id`` of ``"t"``.
Expand Down

0 comments on commit 4ff3958

Please sign in to comment.