with_credentials#
- ApiClientFactory.with_credentials(username, password, domain=None, authentication_scheme=AuthenticationScheme.AUTO)#
Set up client authentication for use with provided credentials.
The default operation of this method is to attempt to connect to the API and to use the provided
WWW-Authenticate
header to determine whether NTLM or Basic Authentication should be used. The selected authentication scheme will then be configured for use.- Parameters:
- username
str
Username for the connection.
- password
str
Password for the connection.
- domain
str
,optional
Domain to use for connection if required. The default is
None
.- authentication_scheme
AuthenticationScheme
The authentication scheme to use.
Added in version 2.1.
- username
- Returns:
ApiClientFactory
Original client factory object.
- Raises:
ConnectionError
If the server does not support Basic or NTLM authentication (Windows clients only).
Notes
NTLM authentication is not currently supported on Linux.