Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion cert_manager/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ def __init__(self, **kwargs):
auth_url: The full URL to the Sectigo OAuth2 token endpoint; the default is "https://auth.sso.sectigo.com/auth/realms/apiclients/protocol/openid-connect/token"
client_id: The Client ID to use for OAuth2 authentication
client_secret: The Client Secret to use for OAuth2 authentication
session: A requests.Session object to use instead of creating a new one; the default is None,
which will create a new session
"""
# Initialize class variables
self._base_url = None
Expand All @@ -51,7 +53,8 @@ def __init__(self, **kwargs):
self._user_key_file = None
self._username = None

self._session = requests.Session()
self._session = kwargs.get("session", requests.Session())

# Set the default HTTP headers
self._headers = {
"Accept": "application/json",
Expand Down
Loading