with_credentials#

ApiClientFactory.with_credentials(username, password, domain=None)#

Set up client authentication for use with provided credentials.

This method will attempt to connect to the API and uses the provided WWW-Authenticate header to determine whether Negotiate, NTLM, or Basic Authentication should be used. The selected authentication method will then be configured for use.

Parameters
usernamestr

Username for the connection.

passwordstr

Password for the connection.

domainstr, optional

Domain to use for connection if required. The default is None.

Returns
ApiClientFactory

Original client factory object.

Notes

NTLM authentication is not currently supported on Linux.