QAuthenticator Class ReferenceThe QAuthenticator class provides an authentication object. More... #include <QAuthenticator> Note: All functions in this class are reentrant. This class was introduced in Qt 4.3. Public Functions
Detailed DescriptionThe 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:
Note that, in particular, NTLM version 2 is not supported. OptionsIn 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
The Basic authentication mechanism supports no outgoing options. NTLM version 1The NTLM authentication mechanism currently supports no incoming or outgoing options. Digest-MD5
The Digest-MD5 authentication mechanism supports no outgoing options. See also QSslSocket. Member Function DocumentationQAuthenticator::QAuthenticator ()Constructs an empty authentication object QAuthenticator::QAuthenticator ( const QAuthenticator & other )Constructs a copy of other. QAuthenticator::~QAuthenticator ()Destructs the object bool QAuthenticator::isNull () constReturns true if the authenticator is null. QVariant QAuthenticator::option ( const QString & opt ) constReturns 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 QVariant will be returned. This function was introduced in Qt 4.7. See also setOption(), options(), and QAuthenticator#Options. QVariantHash QAuthenticator::options () constReturns all incoming options set in this QAuthenticator object by parsing the server reply. See QAuthenticator#Options for more information on incoming options. This function was introduced in Qt 4.7. See also option() and QAuthenticator#Options. QString QAuthenticator::password () constreturns the password used for authentication. See also setPassword(). QString QAuthenticator::realm () constreturns the realm requiring authentication. void QAuthenticator::setOption ( const QString & opt, const QVariant & value )Sets the outgoing option opt to value value. See QAuthenticator#Options for more information on outgoing options. This function was introduced in Qt 4.7. See also options(), option(), and QAuthenticator#Options. 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 () constreturns the user used for authentication. See also setUser(). bool QAuthenticator::operator!= ( const QAuthenticator & other ) constReturns 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 ) constReturns true if this authenticator is identical to other; otherwise returns false. X
|
Попытка перевода Qt документации. Если есть желание присоединиться, или если есть замечания или пожелания, то заходите на форум: Перевод Qt документации на русский язык... Люди внесшие вклад в перевод: Команда переводчиков |