The PySide.QtNetwork.QAuthenticator class provides an authentication object.
The PySide.QtNetwork.QAuthenticator class is usually used in the PySide.QtNetwork.QNetworkAccessManager.authenticationRequired() and PySide.QtNetwork.QNetworkAccessManager.proxyAuthenticationRequired() signals of PySide.QtNetwork.QNetworkAccessManager and PySide.QtNetwork.QAbstractSocket . The class provides a way to pass back the required authentication information to the socket when accessing services that require authentication.
PySide.QtNetwork.QAuthenticator supports the following authentication methods:
- Basic
- NTLM version 1
- Digest-MD5
Note that, in particular, NTLM version 2 is not supported.
In addition to the username and password required for authentication, a PySide.QtNetwork.QAuthenticator object can also contain additional options. The PySide.QtNetwork.QAuthenticator.options() function can be used to query incoming options sent by the server; the PySide.QtNetwork.QAuthenticator.setOption() function can be used to set outgoing options, to be processed by the authenticator calculation. The options accepted and provided depend on the authentication type (see method()).
The following tables list known incoming options as well as accepted outgoing options. The list of incoming options is not exhaustive, since servers may include additional information at any time. The list of outgoing options is exhaustive, however, and no unknown options will be treated or sent back to the server.
Option Direction Description realm Incoming Contains the realm of the authentication, the same as PySide.QtNetwork.QAuthenticator.realm() The Basic authentication mechanism supports no outgoing options.
The NTLM authentication mechanism currently supports no incoming or outgoing options.
Option Direction Description realm Incoming Contains the realm of the authentication, the same as PySide.QtNetwork.QAuthenticator.realm() The Digest-MD5 authentication mechanism supports no outgoing options.
See also
Parameters: | other – PySide.QtNetwork.QAuthenticator |
---|
Constructs an empty authentication object
Constructs a copy of other .
Return type: | PySide.QtCore.bool |
---|
Returns true if the authenticator is null.
Parameters: | other – PySide.QtNetwork.QAuthenticator |
---|---|
Return type: | PySide.QtCore.bool |
Returns true if this authenticator is different from other ; otherwise returns false.
Parameters: | other – PySide.QtNetwork.QAuthenticator |
---|---|
Return type: | PySide.QtCore.bool |
Returns true if this authenticator is identical to other ; otherwise returns false.
Parameters: | opt – unicode |
---|---|
Return type: | object |
Returns the value related to option opt if it was set by the server. See QAuthenticator#Options for more information on incoming options. If option opt isn’t found, an invalid PySide.QtCore.QVariant will be returned.
See also
PySide.QtNetwork.QAuthenticator.setOption() PySide.QtNetwork.QAuthenticator.options() QAuthenticator#Options
Return type: |
---|
Returns all incoming options set in this PySide.QtNetwork.QAuthenticator object by parsing the server reply. See QAuthenticator#Options for more information on incoming options.
See also
PySide.QtNetwork.QAuthenticator.option() QAuthenticator#Options
Return type: | unicode |
---|
returns the password used for authentication.
Return type: | unicode |
---|
returns the realm requiring authentication.
Parameters: |
|
---|
Sets the outgoing option opt to value value . See QAuthenticator#Options for more information on outgoing options.
See also
PySide.QtNetwork.QAuthenticator.options() PySide.QtNetwork.QAuthenticator.option() QAuthenticator#Options
Parameters: | password – unicode |
---|
Sets the password used for authentication.
Parameters: | user – unicode |
---|
Sets the user used for authentication.
Return type: | unicode |
---|
returns the user used for authentication.