get_basic_auth_credentials
get_basic_auth_credentials
Retrieve the current HTTP Basic Auth credentials used by this service. Every SWMLService instance has auth credentials — either explicitly provided in the constructor, read from environment variables, or auto-generated at startup.
Parameters
include_source
When True, returns a 3-tuple that includes the credential source as the third
element. The source is one of:
"environment"— credentials came fromSWML_BASIC_AUTH_USERandSWML_BASIC_AUTH_PASSWORDenvironment variables"auto-generated"— credentials were randomly generated at startup
Returns
tuple[str, str] — A (username, password) tuple when include_source is False.
tuple[str, str, str] — A (username, password, source) tuple when include_source is True.