|  | Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |

# QAuthenticator Class Reference
[QtNetwork module]

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

     #include <QAuthenticator>

Note: All the functions in this class are reentrant.

This class was introduced in Qt 4.3.

- List of all members, including inherited members

### Public Functions

- QAuthenticator ()
- QAuthenticator ( const QAuthenticator & other )
- ~QAuthenticator ()
- bool isNull () const
- QString password () const
- QString realm () const
- void setPassword ( const QString & password )
- void setUser ( const QString & user )
- QString user () const
- bool operator!= ( const QAuthenticator & other ) const
- QAuthenticator & operator= ( const QAuthenticator & other )
- bool operator== ( const QAuthenticator & other ) const

## Detailed Description

The QAuthenticator class provides an authentication object.

The QAuthenticator class is usually used in the authenticationRequired() and proxyAuthenticationRequired() signals of QHttp and QAbstractSocket. The class provides a way to pass back the required authentication information to the socket when accessing services that require authentication.

See also QSslSocket.

## Member Function Documentation

### QAuthenticator::QAuthenticator ()

Constructs an empty authentication object

### QAuthenticator::QAuthenticator ( const QAuthenticator & other )

Constructs a copy of other.

### QAuthenticator::~QAuthenticator ()

Destructs the object

### bool QAuthenticator::isNull () const

returns true if the authenticator is null.

### QString QAuthenticator::password () const

returns the password used for authentication.

See also setPassword().

### QString QAuthenticator::realm () const

returns the realm requiring authentication.

### void QAuthenticator::setPassword ( const QString & password )

Sets the password used for authentication.

See also password().

### void QAuthenticator::setUser ( const QString & user )

Sets the user used for authentication.

See also user().

### QString QAuthenticator::user () const

returns the user used for authentication.

See also setUser().

### bool QAuthenticator::operator!= ( const QAuthenticator & other ) const

Returns true if this authenticator is different from other; otherwise returns false.

### QAuthenticator & QAuthenticator::operator= ( const QAuthenticator & other )

Assigns the contents of other to this authenticator.

### bool QAuthenticator::operator== ( const QAuthenticator & other ) const

Returns true if this authenticator is identical to other; otherwise returns false.