|  | Home · All Classes · Modules

# QAuthenticator Class Reference
[QtNetwork module]

The QAuthenticator class provides an authentication object. More...

### Methods

- __init__ (self)
- __init__ (self, QAuthenticator)
- bool isNull (self)
- QStringQString password (self)
- QStringQString realm (self)
- setPassword (self, QStringQString)
- setUser (self, QStringQString)
- QStringQString user (self)

### Special Methods

- bool __eq__ (self, QAuthenticator)
- bool __ne__ (self, QAuthenticator)

## Detailed Description

The QAuthenticator class provides an authentication object.

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 1
- Digest-MD5

Note that, in particular, NTLM version 2 is not supported.

See also QSslSocket.

## Method Documentation

### QAuthenticator.__init__ (self)

Constructs an empty authentication object

### QAuthenticator.__init__ (self, QAuthenticator)

Constructs a copy of other.

### bool QAuthenticator.isNull (self)

returns true if the authenticator is null.

### QStringQString QAuthenticator.password (self)

returns the password used for authentication.

See also setPassword().

### QStringQString QAuthenticator.realm (self)

returns the realm requiring authentication.

### QAuthenticator.setPassword (self, QStringQString)

Sets the password used for authentication.

See also password().

### QAuthenticator.setUser (self, QStringQString)

Sets the user used for authentication.

See also user().

### QStringQString QAuthenticator.user (self)

returns the user used for authentication.

See also setUser().

### bool QAuthenticator.__eq__ (self, QAuthenticator)

### bool QAuthenticator.__ne__ (self, QAuthenticator)