Skip to content

Commit

Permalink
docs: config/auth: clarify auth_username, etc
Browse files Browse the repository at this point in the history
  • Loading branch information
half-duplex committed Jun 15, 2021
1 parent e2d8439 commit e792611
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
20 changes: 16 additions & 4 deletions docs/source/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,13 @@ And for **nick-based** methods:
* ``Q``
* ``userserv``

These additional options can be used to configure the authentication method
and the required credentials:
Several additional options can be used to configure the authentication method
and the required credentials. You can follow the link for each to find more
details:

* :attr:`~CoreSection.auth_username`: account's username, if required
* :attr:`~CoreSection.auth_password`: account's password
* :attr:`~CoreSection.auth_username`: account's username, if used by
the ``auth_method``
* :attr:`~CoreSection.auth_password`: password for authentication
* :attr:`~CoreSection.auth_target`: authentication method's target, if required
by the ``auth_method``:

Expand All @@ -429,6 +431,16 @@ And here is an example of server-based authentication using SASL::
auth_password = SopelIsGreat! # your bot's password
auth_target = PLAIN # default sasl mechanism

Example of authentication to a ZNC bouncer::

[core]
auth_method = server # select server-based auth
# auth_username is not used with server authentication, so instead
# we combine the ZNC username, network name, and password here:
auth_password = Sopel/libera:SopelIsGreat!

Don't forget to configure your ZNC to log in to the real network!


Multi-stage
-----------
Expand Down
12 changes: 8 additions & 4 deletions sopel/config/core_section.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,19 +173,23 @@ class CoreSection(StaticSection):
:default:
* ``NickServ`` if using the ``nickserv`` :attr:`auth_method`
* ``UserServ`` if using the ``userserv`` :attr:`auth_method`
* ``PLAIN`` if using the ``sasl`` :attr:`auth_method`
The nickname of the NickServ service, or the name of the desired SASL
mechanism, if :attr:`auth_method` is set to one of these methods. This value
is otherwise ignored.
The nickname of the NickServ or UserServ service, or the name of the
desired SASL mechanism, if :attr:`auth_method` is set to one of these
methods. This value is otherwise ignored.
See :ref:`Authentication`.
"""

auth_username = ValidatedAttribute('auth_username')
"""The user/account name to use when authenticating.
May not apply, depending on :attr:`auth_method`. See :ref:`Authentication`.
Required for an :attr:`auth_method` of ``authserv``, ``Q``, or
``userserv`` — otherwise ignored.
See :ref:`Authentication`.
"""

auto_url_schemes = ListAttribute(
Expand Down

0 comments on commit e792611

Please sign in to comment.