.. _configuration_options:

Configuration Options
=====================

Credmgr's configuration options are broken down into the following categories:

- :ref:`auth_settings`
- :ref:`server_options`

All of these options can be provided in any of the ways mentioned in
:ref:`configuration`.

.. _auth_settings:

Authentication Configuration Options
------------------------------------

:apitoken: (Strongly recommended) The API Token that will be used for interacting with
    CredentialManager

.. _server_options:

CredentialManager Server Configuration Options
----------------------------------------------

Credmgr can be configured to work with instances of CredentialManager which are not at
`credmgr.jesassn.org <https://credmgr.jesassn.org>`_. The following options may need to
be updated in order to interact a local dev server for instance.

:server: The server credmgr will use when interacting with CredentialManager (default
    `https://credmgr.jesassn.org`)
:endpoint: The endpoint credmgr will use when interacting with CredentialManager
    (default `/api/v1`)

.. _custom_options:

Custom Configuration Options
----------------------------

Your application can utilize credmgr's configuration system in order to provide its own
custom settings.

For example, you might want to set a global ``bot_name: bot_name`` option to your
application's ``.credmgr.ini`` file. To access the value of this custom option from an
instance of :py:class:`.CredentialManager` you can execute:

.. code-block:: python

    credmgr.config.custom["bot_name"]

.. note::

    Custom CredentialManager configuration environment variables are not supported. You
    can directly access environment variables via ``os.getenv``.
