Skip to content

Commit

Permalink
Add kwargs to auth_source_plugin docs (conan-io#3860)
Browse files Browse the repository at this point in the history
  • Loading branch information
AbrilRBS authored Sep 30, 2024
1 parent d225e5a commit 31eb56c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions reference/extensions/authorization_plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ This one is a Python script that receives an ``url`` as a parameter and outputs
access token. It can also return ``None`` to indicate that Conan should proceed with its normal login flow.

This plugin is located at the path ``<CONAN_HOME>/extensions/plugins/auth_source.py`` and must be manually created with the name
``auth_source.py``, containing a function named ``auth_source_plugin(url)``.
``auth_source.py``, containing a function named ``auth_source_plugin(url, **kwargs)``.

The order for retrieving the credentials is as follows:

Expand All @@ -53,7 +53,7 @@ Here we can see an example of a plugin implementation.

.. code-block:: python
def auth_source_plugin(url):
def auth_source_plugin(url, **kwargs):
if url.startswith("https://my-sources-user-password.my-org/"):
return {'user': 'my-user', 'password': 'my-password'}
elif url.startswith("https://my-private-token-sources.my-org/"):
Expand Down

0 comments on commit 31eb56c

Please sign in to comment.