|  | 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)
- QString password (self)
- QString realm (self)
- setPassword (self, QString)
- setUser (self, QString)
- QString 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.

### QString QAuthenticator.password (self)

returns the password used for authentication.

See also setPassword().

### QString QAuthenticator.realm (self)

returns the realm requiring authentication.

### QAuthenticator.setPassword (self, QString)

Sets the password used for authentication.

See also password().

### QAuthenticator.setUser (self, QString)

Sets the user used for authentication.

See also user().

### QString QAuthenticator.user (self)

returns the user used for authentication.

See also setUser().

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

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