--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Documentation/Source/eric5.Helpviewer.Passwords.PasswordManager.html Sat Jan 02 18:19:35 2010 +0000 @@ -0,0 +1,392 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' +'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'> +<html><head> +<title>eric5.Helpviewer.Passwords.PasswordManager</title> +<style> +b'body {\n background:white;\n margin: 0em 1em 10em 1em;\n color: black;\n}\n\nh1 { color: white; background: #4FA4FF; }\nh2 { color: white; background: #4FA4FF; }\nh3 { color: white; background: #00557F; }\nh4 { color: white; background: #00557F; }\n \na { color: #AA5500; }\n' +</style> +</head> +<body><a NAME="top" ID="top"></a> +<h1>eric5.Helpviewer.Passwords.PasswordManager</h1> +<p> +Module implementing the password manager. +</p> +<h3>Global Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> +<table> +<tr> +<td><a href="#LoginForm">LoginForm</a></td> +<td>Class implementing a data structure for login forms.</td> +</tr><tr> +<td><a href="#PasswordManager">PasswordManager</a></td> +<td>Class implementing the password manager.</td> +</tr> +</table> +<h3>Functions</h3> +<table> +<tr><td>None</td></tr> +</table> +<hr /><hr /> +<a NAME="LoginForm" ID="LoginForm"></a> +<h2>LoginForm</h2> +<p> + Class implementing a data structure for login forms. +</p> +<h3>Derived from</h3> +object +<h3>Class Attributes</h3> +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#LoginForm.__init__">LoginForm</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#LoginForm.isValid">isValid</a></td> +<td>Public method to test for validity.</td> +</tr><tr> +<td><a href="#LoginForm.load">load</a></td> +<td>Public method to load the form data from a file.</td> +</tr><tr> +<td><a href="#LoginForm.save">save</a></td> +<td>Public method to save the form data to a file.</td> +</tr> +</table> +<a NAME="LoginForm.__init__" ID="LoginForm.__init__"></a> +<h4>LoginForm (Constructor)</h4> +<b>LoginForm</b>(<i></i>) +<p> + Constructor +</p><a NAME="LoginForm.isValid" ID="LoginForm.isValid"></a> +<h4>LoginForm.isValid</h4> +<b>isValid</b>(<i></i>) +<p> + Public method to test for validity. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating a valid form (boolean) +</dd> +</dl><a NAME="LoginForm.load" ID="LoginForm.load"></a> +<h4>LoginForm.load</h4> +<b>load</b>(<i>data</i>) +<p> + Public method to load the form data from a file. +</p><dl> +<dt><i>data</i></dt> +<dd> +list of strings to load data from (list of strings) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating success (boolean) +</dd> +</dl><a NAME="LoginForm.save" ID="LoginForm.save"></a> +<h4>LoginForm.save</h4> +<b>save</b>(<i>f</i>) +<p> + Public method to save the form data to a file. +</p><dl> +<dt><i>f</i></dt> +<dd> +file or file like object open for writing +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +flag indicating success (booelan) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="PasswordManager" ID="PasswordManager"></a> +<h2>PasswordManager</h2> +<p> + Class implementing the password manager. +</p><h4>Signals</h4> +<dl> +<dt>changed()</dt> +<dd> +emitted to indicate a change +</dd> +</dl> +<h3>Derived from</h3> +QObject +<h3>Class Attributes</h3> +<table> +<tr><td>FORMS</td></tr><tr><td>NEVER</td></tr><tr><td>SEPARATOR</td></tr> +</table> +<h3>Methods</h3> +<table> +<tr> +<td><a href="#PasswordManager.__init__">PasswordManager</a></td> +<td>Constructor</td> +</tr><tr> +<td><a href="#PasswordManager.__createKey">__createKey</a></td> +<td>Private method to create the key string for the login credentials.</td> +</tr><tr> +<td><a href="#PasswordManager.__extractMultipartQueryItems">__extractMultipartQueryItems</a></td> +<td>Private method to extract the query items for a post operation.</td> +</tr><tr> +<td><a href="#PasswordManager.__findForm">__findForm</a></td> +<td>Private method to find the form used for logging in.</td> +</tr><tr> +<td><a href="#PasswordManager.__load">__load</a></td> +<td>Private method to load the saved login credentials.</td> +</tr><tr> +<td><a href="#PasswordManager.__stripUrl">__stripUrl</a></td> +<td>Private method to strip off all unneeded parts of a URL.</td> +</tr><tr> +<td><a href="#PasswordManager.allSiteNames">allSiteNames</a></td> +<td>Public method to get a list of all site names.</td> +</tr><tr> +<td><a href="#PasswordManager.clear">clear</a></td> +<td>Public slot to clear the saved passwords.</td> +</tr><tr> +<td><a href="#PasswordManager.close">close</a></td> +<td>Public method to close the open search engines manager.</td> +</tr><tr> +<td><a href="#PasswordManager.fill">fill</a></td> +<td>Public slot to fill login forms with saved data.</td> +</tr><tr> +<td><a href="#PasswordManager.getLogin">getLogin</a></td> +<td>Public method to get the login credentials.</td> +</tr><tr> +<td><a href="#PasswordManager.post">post</a></td> +<td>Public method to check, if the data to be sent contains login data.</td> +</tr><tr> +<td><a href="#PasswordManager.removePassword">removePassword</a></td> +<td>Public method to remove a password entry.</td> +</tr><tr> +<td><a href="#PasswordManager.save">save</a></td> +<td>Public slot to save the login entries to disk.</td> +</tr><tr> +<td><a href="#PasswordManager.setLogin">setLogin</a></td> +<td>Public method to set the login credentials.</td> +</tr><tr> +<td><a href="#PasswordManager.siteInfo">siteInfo</a></td> +<td>Public method to get a reference to the named site.</td> +</tr><tr> +<td><a href="#PasswordManager.sitesCount">sitesCount</a></td> +<td>Public method to get the number of available sites.</td> +</tr> +</table> +<a NAME="PasswordManager.__init__" ID="PasswordManager.__init__"></a> +<h4>PasswordManager (Constructor)</h4> +<b>PasswordManager</b>(<i>parent = None</i>) +<p> + Constructor +</p><dl> +<dt><i>parent</i></dt> +<dd> +reference to the parent object (QObject) +</dd> +</dl><a NAME="PasswordManager.__createKey" ID="PasswordManager.__createKey"></a> +<h4>PasswordManager.__createKey</h4> +<b>__createKey</b>(<i>url, realm</i>) +<p> + Private method to create the key string for the login credentials. +</p><dl> +<dt><i>url</i></dt> +<dd> +URL to get the credentials for (QUrl) +</dd><dt><i>realm</i></dt> +<dd> +realm to get the credentials for (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +key string (string) +</dd> +</dl><a NAME="PasswordManager.__extractMultipartQueryItems" ID="PasswordManager.__extractMultipartQueryItems"></a> +<h4>PasswordManager.__extractMultipartQueryItems</h4> +<b>__extractMultipartQueryItems</b>(<i>data, boundary</i>) +<p> + Private method to extract the query items for a post operation. +</p><dl> +<dt><i>data</i></dt> +<dd> +data to be sent (QByteArray) +</dd><dt><i>boundary</i></dt> +<dd> +boundary string (QByteArray) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +set of name, value pairs (set of tuple of string, string) +</dd> +</dl><a NAME="PasswordManager.__findForm" ID="PasswordManager.__findForm"></a> +<h4>PasswordManager.__findForm</h4> +<b>__findForm</b>(<i>webPage, data, boundary = None</i>) +<p> + Private method to find the form used for logging in. +</p><dl> +<dt><i>webPage</i></dt> +<dd> +reference to the web page (QWebPage) +</dd><dt><i>data</i></dt> +<dd> +data to be sent (QByteArray) +</dd><dt><i>boundary=</i></dt> +<dd> +boundary string (QByteArray) for multipart encoded data, + None for urlencoded data +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +parsed form (LoginForm) +</dd> +</dl><a NAME="PasswordManager.__load" ID="PasswordManager.__load"></a> +<h4>PasswordManager.__load</h4> +<b>__load</b>(<i></i>) +<p> + Private method to load the saved login credentials. +</p><a NAME="PasswordManager.__stripUrl" ID="PasswordManager.__stripUrl"></a> +<h4>PasswordManager.__stripUrl</h4> +<b>__stripUrl</b>(<i>url</i>) +<p> + Private method to strip off all unneeded parts of a URL. +</p><dl> +<dt><i>url</i></dt> +<dd> +URL to be stripped (QUrl) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +stripped URL (QUrl) +</dd> +</dl><a NAME="PasswordManager.allSiteNames" ID="PasswordManager.allSiteNames"></a> +<h4>PasswordManager.allSiteNames</h4> +<b>allSiteNames</b>(<i></i>) +<p> + Public method to get a list of all site names. +</p><dl> +<dt>Returns:</dt> +<dd> +sorted list of all site names (list of strings) +</dd> +</dl><a NAME="PasswordManager.clear" ID="PasswordManager.clear"></a> +<h4>PasswordManager.clear</h4> +<b>clear</b>(<i></i>) +<p> + Public slot to clear the saved passwords. +</p><a NAME="PasswordManager.close" ID="PasswordManager.close"></a> +<h4>PasswordManager.close</h4> +<b>close</b>(<i></i>) +<p> + Public method to close the open search engines manager. +</p><a NAME="PasswordManager.fill" ID="PasswordManager.fill"></a> +<h4>PasswordManager.fill</h4> +<b>fill</b>(<i>page</i>) +<p> + Public slot to fill login forms with saved data. +</p><dl> +<dt><i>page</i></dt> +<dd> +reference to the web page (QWebPage) +</dd> +</dl><a NAME="PasswordManager.getLogin" ID="PasswordManager.getLogin"></a> +<h4>PasswordManager.getLogin</h4> +<b>getLogin</b>(<i>url, realm</i>) +<p> + Public method to get the login credentials. +</p><dl> +<dt><i>url</i></dt> +<dd> +URL to get the credentials for (QUrl) +</dd><dt><i>realm</i></dt> +<dd> +realm to get the credentials for (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +tuple containing the user name (string) and password (string) +</dd> +</dl><a NAME="PasswordManager.post" ID="PasswordManager.post"></a> +<h4>PasswordManager.post</h4> +<b>post</b>(<i>request, data</i>) +<p> + Public method to check, if the data to be sent contains login data. +</p><dl> +<dt><i>request</i></dt> +<dd> +reference to the network request (QNetworkRequest) +</dd><dt><i>data</i></dt> +<dd> +data to be sent (QByteArray) +</dd> +</dl><a NAME="PasswordManager.removePassword" ID="PasswordManager.removePassword"></a> +<h4>PasswordManager.removePassword</h4> +<b>removePassword</b>(<i>site</i>) +<p> + Public method to remove a password entry. +</p><dl> +<dt><i>site</i></dt> +<dd> +web site name (string) +</dd> +</dl><a NAME="PasswordManager.save" ID="PasswordManager.save"></a> +<h4>PasswordManager.save</h4> +<b>save</b>(<i></i>) +<p> + Public slot to save the login entries to disk. +</p><a NAME="PasswordManager.setLogin" ID="PasswordManager.setLogin"></a> +<h4>PasswordManager.setLogin</h4> +<b>setLogin</b>(<i>url, realm, username, password</i>) +<p> + Public method to set the login credentials. +</p><dl> +<dt><i>url</i></dt> +<dd> +URL to set the credentials for (QUrl) +</dd><dt><i>realm</i></dt> +<dd> +realm to set the credentials for (string) +</dd><dt><i>username</i></dt> +<dd> +username for the login (string) +</dd><dt><i>password</i></dt> +<dd> +password for the login (string) +</dd> +</dl><a NAME="PasswordManager.siteInfo" ID="PasswordManager.siteInfo"></a> +<h4>PasswordManager.siteInfo</h4> +<b>siteInfo</b>(<i>site</i>) +<p> + Public method to get a reference to the named site. +</p><dl> +<dt><i>site</i></dt> +<dd> +web site name (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +tuple containing the user name (string) and password (string) +</dd> +</dl><a NAME="PasswordManager.sitesCount" ID="PasswordManager.sitesCount"></a> +<h4>PasswordManager.sitesCount</h4> +<b>sitesCount</b>(<i></i>) +<p> + Public method to get the number of available sites. +</p><dl> +<dt>Returns:</dt> +<dd> +number of sites (integer) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file