PythonQt.Qt.QAuthenticator
QAuthenticator
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
The QAuthenticator class is usually used in the authenticationRequired() and proxyAuthenticationRequired() signals of QNetworkAccessManager and QAbstractSocket. The class provides a way to pass back the required authentication information to the socket when accessing services that require authentication.
QAuthenticator supports the following authentication methods:
- Basic
- NTLM version 2
- Digest-MD5
- SPNEGO/Negotiate
Options
In addition to the username and password required for authentication, a QAuthenticator object can also contain additional options. The options() function can be used to query incoming options sent by the server; the 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.
Basic
| Option | Direction | Type | Description |
|---|---|---|---|
realm |
Incoming | QString | Contains the realm of the authentication, the same as realm() |
The Basic authentication mechanism supports no outgoing options.
NTLM version 2
The NTLM authentication mechanism currently supports no incoming or outgoing options. On Windows, if no user has been set, domain\user credentials will be searched for on the local system to enable Single-Sign-On functionality.
Digest-MD5
| Option | Direction | Type | Description |
|---|---|---|---|
realm |
Incoming | QString | Contains the realm of the authentication, the same as realm() |
The Digest-MD5 authentication mechanism supports no outgoing options.
SPNEGO/Negotiate
This authentication mechanism currently supports no incoming or outgoing options.
Source: https://doc.qt.io/archives/qt-5.15/qauthenticator.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
isNull |
function | (self) -> bool |
X.isNull() -> bool (shared captured text) |
option |
function | (self, opt: str) -> Any |
X.option(opt) -> object (shared captured text) |
options |
function | (self) -> dict |
X.options() -> dict (shared captured text) |
password |
function | (self) -> str |
X.password() -> str (shared captured text) |
realm |
function | (self) -> str |
X.realm() -> str (shared captured text) |
setOption |
function | (self, opt: str, value: Any) -> None |
X.setOption(opt, value) (shared captured text) |
setPassword |
function | (self, password: str) -> None |
Sets the password used for authentication. (shared captured text) |
setRealm |
function | (self, realm: str) -> None |
(shared captured text) |
setUser |
function | (self, user: str) -> None |
Sets the user used for authentication. (shared captured text) |
user |
function | (self) -> str |
X.user() -> str (shared captured text) |