3
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/src/network/kernel/qauthenticator.cpp -->
5
<!-- qauthenticator.cpp -->
7
<title>Qt 4.5: QAuthenticator Class Reference</title>
7
<title>Qt 4.6: QAuthenticator Class Reference</title>
8
8
<link href="classic.css" rel="stylesheet" type="text/css" />
11
<a name="//apple_ref/cpp/cl//QAuthenticator" />
11
12
<table border="0" cellpadding="0" cellspacing="0" width="100%">
13
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="namespaces.html"><font color="#004faf">All Namespaces</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="modules.html"><font color="#004faf">Modules</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">QAuthenticator Class Reference<br /><span class="small-subtitle">[<a href="qtnetwork.html">QtNetwork</a> module]</span>
14
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
15
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
16
</tr></table><h1 class="title">QAuthenticator Class Reference<br /><span class="small-subtitle">[<a href="qtnetwork.html">QtNetwork</a> module]</span>
17
18
<p>The QAuthenticator class provides an authentication object. <a href="#details">More...</a></p>
18
<pre> #include <QAuthenticator></pre><p><b>Note:</b> All the functions in this class are <a href="threads.html#reentrant">reentrant</a>.</p>
19
<pre> #include <QAuthenticator></pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p>
20
<p><b>Note:</b> All functions in this class are <a href="threads-reentrancy.html#reentrant">reentrant</a>.</p>
19
21
<p>This class was introduced in Qt 4.3.</p>
21
23
<li><a href="qauthenticator-members.html">List of all members, including inherited members</a></li>
23
26
<a name="public-functions"></a>
24
<h3>Public Functions</h3>
26
<li><div class="fn"></div><b><a href="qauthenticator.html#QAuthenticator">QAuthenticator</a></b> ()</li>
27
<li><div class="fn"></div><b><a href="qauthenticator.html#QAuthenticator-2">QAuthenticator</a></b> ( const QAuthenticator & <i>other</i> )</li>
28
<li><div class="fn"></div><b><a href="qauthenticator.html#dtor.QAuthenticator">~QAuthenticator</a></b> ()</li>
29
<li><div class="fn"></div>bool <b><a href="qauthenticator.html#isNull">isNull</a></b> () const</li>
30
<li><div class="fn"></div>QString <b><a href="qauthenticator.html#password">password</a></b> () const</li>
31
<li><div class="fn"></div>QString <b><a href="qauthenticator.html#realm">realm</a></b> () const</li>
32
<li><div class="fn"></div>void <b><a href="qauthenticator.html#setPassword">setPassword</a></b> ( const QString & <i>password</i> )</li>
33
<li><div class="fn"></div>void <b><a href="qauthenticator.html#setUser">setUser</a></b> ( const QString & <i>user</i> )</li>
34
<li><div class="fn"></div>QString <b><a href="qauthenticator.html#user">user</a></b> () const</li>
35
<li><div class="fn"></div>bool <b><a href="qauthenticator.html#operator-not-eq">operator!=</a></b> ( const QAuthenticator & <i>other</i> ) const</li>
36
<li><div class="fn"></div>QAuthenticator & <b><a href="qauthenticator.html#operator-eq">operator=</a></b> ( const QAuthenticator & <i>other</i> )</li>
37
<li><div class="fn"></div>bool <b><a href="qauthenticator.html#operator-eq-eq">operator==</a></b> ( const QAuthenticator & <i>other</i> ) const</li>
27
<h2>Public Functions</h2>
28
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
29
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#QAuthenticator">QAuthenticator</a></b> ()</td></tr>
30
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#QAuthenticator-2">QAuthenticator</a></b> ( const QAuthenticator & <i>other</i> )</td></tr>
31
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#dtor.QAuthenticator">~QAuthenticator</a></b> ()</td></tr>
32
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#isNull">isNull</a></b> () const</td></tr>
33
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#password">password</a></b> () const</td></tr>
34
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#realm">realm</a></b> () const</td></tr>
35
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#setPassword">setPassword</a></b> ( const QString & <i>password</i> )</td></tr>
36
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#setUser">setUser</a></b> ( const QString & <i>user</i> )</td></tr>
37
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#user">user</a></b> () const</td></tr>
38
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#operator-not-eq">operator!=</a></b> ( const QAuthenticator & <i>other</i> ) const</td></tr>
39
<tr><td class="memItemLeft" align="right" valign="top">QAuthenticator & </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#operator-eq">operator=</a></b> ( const QAuthenticator & <i>other</i> )</td></tr>
40
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qauthenticator.html#operator-eq-eq">operator==</a></b> ( const QAuthenticator & <i>other</i> ) const</td></tr>
39
42
<a name="details"></a>
41
44
<h2>Detailed Description</h2>
42
45
<p>The QAuthenticator class provides an authentication object.</p>
43
<p>The QAuthenticator class is usually used in the <a href="qhttp.html#authenticationRequired">authenticationRequired()</a> and <a href="qhttp.html#proxyAuthenticationRequired">proxyAuthenticationRequired()</a> signals of <a href="qhttp.html">QHttp</a> and <a href="qabstractsocket.html">QAbstractSocket</a>. The class provides a way to pass back the required authentication information to the socket when accessing services that require authentication.</p>
46
<p>The QAuthenticator class is usually used in the <a href="qnetworkaccessmanager.html#authenticationRequired">authenticationRequired()</a> and <a href="qnetworkaccessmanager.html#proxyAuthenticationRequired">proxyAuthenticationRequired()</a> signals of <a href="qnetworkaccessmanager.html">QNetworkAccessManager</a> and <a href="qabstractsocket.html">QAbstractSocket</a>. The class provides a way to pass back the required authentication information to the socket when accessing services that require authentication.</p>
44
47
<p>QAuthenticator supports the following authentication methods:</p>
51
54
<p>See also <a href="qsslsocket.html">QSslSocket</a>.</p>
53
56
<h2>Member Function Documentation</h2>
57
<a name="//apple_ref/cpp/instm/QAuthenticator/QAuthenticator" />
54
58
<h3 class="fn"><a name="QAuthenticator"></a>QAuthenticator::QAuthenticator ()</h3>
55
59
<p>Constructs an empty authentication object</p>
56
60
<h3 class="fn"><a name="QAuthenticator-2"></a>QAuthenticator::QAuthenticator ( const QAuthenticator & <i>other</i> )</h3>
57
61
<p>Constructs a copy of <i>other</i>.</p>
62
<a name="//apple_ref/cpp/instm/QAuthenticator/~QAuthenticator" />
58
63
<h3 class="fn"><a name="dtor.QAuthenticator"></a>QAuthenticator::~QAuthenticator ()</h3>
59
64
<p>Destructs the object</p>
65
<a name="//apple_ref/cpp/instm/QAuthenticator/isNull" />
60
66
<h3 class="fn"><a name="isNull"></a>bool QAuthenticator::isNull () const</h3>
61
67
<p>returns true if the authenticator is null.</p>
68
<a name="//apple_ref/cpp/instm/QAuthenticator/password" />
62
69
<h3 class="fn"><a name="password"></a><a href="qstring.html">QString</a> QAuthenticator::password () const</h3>
63
70
<p>returns the password used for authentication.</p>
64
71
<p>See also <a href="qauthenticator.html#setPassword">setPassword</a>().</p>
72
<a name="//apple_ref/cpp/instm/QAuthenticator/realm" />
65
73
<h3 class="fn"><a name="realm"></a><a href="qstring.html">QString</a> QAuthenticator::realm () const</h3>
66
74
<p>returns the realm requiring authentication.</p>
75
<a name="//apple_ref/cpp/instm/QAuthenticator/setPassword" />
67
76
<h3 class="fn"><a name="setPassword"></a>void QAuthenticator::setPassword ( const <a href="qstring.html">QString</a> & <i>password</i> )</h3>
68
77
<p>Sets the <i>password</i> used for authentication.</p>
69
78
<p>See also <a href="qauthenticator.html#password">password</a>().</p>
79
<a name="//apple_ref/cpp/instm/QAuthenticator/setUser" />
70
80
<h3 class="fn"><a name="setUser"></a>void QAuthenticator::setUser ( const <a href="qstring.html">QString</a> & <i>user</i> )</h3>
71
81
<p>Sets the <i>user</i> used for authentication.</p>
72
82
<p>See also <a href="qauthenticator.html#user">user</a>().</p>
83
<a name="//apple_ref/cpp/instm/QAuthenticator/user" />
73
84
<h3 class="fn"><a name="user"></a><a href="qstring.html">QString</a> QAuthenticator::user () const</h3>
74
85
<p>returns the user used for authentication.</p>
75
86
<p>See also <a href="qauthenticator.html#setUser">setUser</a>().</p>
87
<a name="//apple_ref/cpp/instm/QAuthenticator/operator!=" />
76
88
<h3 class="fn"><a name="operator-not-eq"></a>bool QAuthenticator::operator!= ( const QAuthenticator & <i>other</i> ) const</h3>
77
89
<p>Returns true if this authenticator is different from <i>other</i>; otherwise returns false.</p>
90
<a name="//apple_ref/cpp/instm/QAuthenticator/operator=" />
78
91
<h3 class="fn"><a name="operator-eq"></a>QAuthenticator & QAuthenticator::operator= ( const QAuthenticator & <i>other</i> )</h3>
79
92
<p>Assigns the contents of <i>other</i> to this authenticator.</p>
93
<a name="//apple_ref/cpp/instm/QAuthenticator/operator==" />
80
94
<h3 class="fn"><a name="operator-eq-eq"></a>bool QAuthenticator::operator== ( const QAuthenticator & <i>other</i> ) const</h3>
81
95
<p>Returns true if this authenticator is identical to <i>other</i>; otherwise returns false.</p>
82
96
<p /><address><hr /><div align="center">
83
97
<table width="100%" cellspacing="0" border="0"><tr class="address">
84
<td width="30%" align="left">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
85
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
86
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
87
</tr></table></div></address></body>
98
<td width="40%" align="left">Copyright © 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
99
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
100
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
101
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>