eric6/Documentation/Source/eric6.Helpviewer.Passwords.PasswordManager.html

branch
maintenance
changeset 7286
7eb04391adf7
parent 7226
babe80d84a3e
parent 7285
1ff497f33f31
child 7287
1c17f2191bdd
equal deleted inserted replaced
7226:babe80d84a3e 7286:7eb04391adf7
1 <!DOCTYPE html>
2 <html><head>
3 <title>eric6.Helpviewer.Passwords.PasswordManager</title>
4 <meta charset="UTF-8">
5 <style>
6 body {
7 background: #EDECE6;
8 margin: 0em 1em 10em 1em;
9 color: black;
10 }
11
12 h1 { color: white; background: #85774A; }
13 h2 { color: white; background: #85774A; }
14 h3 { color: white; background: #9D936E; }
15 h4 { color: white; background: #9D936E; }
16
17 a { color: #BA6D36; }
18
19 </style>
20 </head>
21 <body><a NAME="top" ID="top"></a>
22 <h1>eric6.Helpviewer.Passwords.PasswordManager</h1>
23 <p>
24 Module implementing the password manager.
25 </p>
26 <h3>Global Attributes</h3>
27 <table>
28 <tr><td>None</td></tr>
29 </table>
30 <h3>Classes</h3>
31 <table>
32 <tr>
33 <td><a href="#PasswordManager">PasswordManager</a></td>
34 <td>Class implementing the password manager.</td>
35 </tr>
36 </table>
37 <h3>Functions</h3>
38 <table>
39 <tr><td>None</td></tr>
40 </table>
41 <hr /><hr />
42 <a NAME="PasswordManager" ID="PasswordManager"></a>
43 <h2>PasswordManager</h2>
44 <p>
45 Class implementing the password manager.
46 </p><h3>Signals</h3>
47 <dl>
48 <dt>changed()</dt>
49 <dd>
50 emitted to indicate a change
51 </dd><dt>passwordsSaved()</dt>
52 <dd>
53 emitted after the passwords were saved
54 </dd>
55 </dl>
56 <h3>Derived from</h3>
57 QObject
58 <h3>Class Attributes</h3>
59 <table>
60 <tr><td>FORMS</td></tr><tr><td>NEVER</td></tr><tr><td>SEPARATOR</td></tr>
61 </table>
62 <h3>Class Methods</h3>
63 <table>
64 <tr><td>None</td></tr>
65 </table>
66 <h3>Methods</h3>
67 <table>
68 <tr>
69 <td><a href="#PasswordManager.__init__">PasswordManager</a></td>
70 <td>Constructor</td>
71 </tr><tr>
72 <td><a href="#PasswordManager.__createKey">__createKey</a></td>
73 <td>Private method to create the key string for the login credentials.</td>
74 </tr><tr>
75 <td><a href="#PasswordManager.__extractMultipartQueryItems">__extractMultipartQueryItems</a></td>
76 <td>Private method to extract the query items for a post operation.</td>
77 </tr><tr>
78 <td><a href="#PasswordManager.__findForm">__findForm</a></td>
79 <td>Private method to find the form used for logging in.</td>
80 </tr><tr>
81 <td><a href="#PasswordManager.__load">__load</a></td>
82 <td>Private method to load the saved login credentials.</td>
83 </tr><tr>
84 <td><a href="#PasswordManager.__loadNonXml">__loadNonXml</a></td>
85 <td>Private method to load non-XML password files.</td>
86 </tr><tr>
87 <td><a href="#PasswordManager.__stripUrl">__stripUrl</a></td>
88 <td>Private method to strip off all unneeded parts of a URL.</td>
89 </tr><tr>
90 <td><a href="#PasswordManager.allSiteNames">allSiteNames</a></td>
91 <td>Public method to get a list of all site names.</td>
92 </tr><tr>
93 <td><a href="#PasswordManager.clear">clear</a></td>
94 <td>Public slot to clear the saved passwords.</td>
95 </tr><tr>
96 <td><a href="#PasswordManager.close">close</a></td>
97 <td>Public method to close the passwords manager.</td>
98 </tr><tr>
99 <td><a href="#PasswordManager.fill">fill</a></td>
100 <td>Public slot to fill login forms with saved data.</td>
101 </tr><tr>
102 <td><a href="#PasswordManager.getFileName">getFileName</a></td>
103 <td>Public method to get the file name of the passwords file.</td>
104 </tr><tr>
105 <td><a href="#PasswordManager.getLogin">getLogin</a></td>
106 <td>Public method to get the login credentials.</td>
107 </tr><tr>
108 <td><a href="#PasswordManager.masterPasswordChanged">masterPasswordChanged</a></td>
109 <td>Public slot to handle the change of the master password.</td>
110 </tr><tr>
111 <td><a href="#PasswordManager.post">post</a></td>
112 <td>Public method to check, if the data to be sent contains login data.</td>
113 </tr><tr>
114 <td><a href="#PasswordManager.reload">reload</a></td>
115 <td>Public method to reload the login data.</td>
116 </tr><tr>
117 <td><a href="#PasswordManager.removePassword">removePassword</a></td>
118 <td>Public method to remove a password entry.</td>
119 </tr><tr>
120 <td><a href="#PasswordManager.save">save</a></td>
121 <td>Public slot to save the login entries to disk.</td>
122 </tr><tr>
123 <td><a href="#PasswordManager.setLogin">setLogin</a></td>
124 <td>Public method to set the login credentials.</td>
125 </tr><tr>
126 <td><a href="#PasswordManager.siteInfo">siteInfo</a></td>
127 <td>Public method to get a reference to the named site.</td>
128 </tr><tr>
129 <td><a href="#PasswordManager.sitesCount">sitesCount</a></td>
130 <td>Public method to get the number of available sites.</td>
131 </tr>
132 </table>
133 <h3>Static Methods</h3>
134 <table>
135 <tr><td>None</td></tr>
136 </table>
137 <a NAME="PasswordManager.__init__" ID="PasswordManager.__init__"></a>
138 <h4>PasswordManager (Constructor)</h4>
139 <b>PasswordManager</b>(<i>parent=None</i>)
140 <p>
141 Constructor
142 </p><dl>
143 <dt><i>parent</i></dt>
144 <dd>
145 reference to the parent object (QObject)
146 </dd>
147 </dl><a NAME="PasswordManager.__createKey" ID="PasswordManager.__createKey"></a>
148 <h4>PasswordManager.__createKey</h4>
149 <b>__createKey</b>(<i>url, realm</i>)
150 <p>
151 Private method to create the key string for the login credentials.
152 </p><dl>
153 <dt><i>url</i></dt>
154 <dd>
155 URL to get the credentials for (QUrl)
156 </dd><dt><i>realm</i></dt>
157 <dd>
158 realm to get the credentials for (string)
159 </dd>
160 </dl><dl>
161 <dt>Returns:</dt>
162 <dd>
163 key string (string)
164 </dd>
165 </dl><a NAME="PasswordManager.__extractMultipartQueryItems" ID="PasswordManager.__extractMultipartQueryItems"></a>
166 <h4>PasswordManager.__extractMultipartQueryItems</h4>
167 <b>__extractMultipartQueryItems</b>(<i>data, boundary</i>)
168 <p>
169 Private method to extract the query items for a post operation.
170 </p><dl>
171 <dt><i>data</i></dt>
172 <dd>
173 data to be sent (QByteArray)
174 </dd><dt><i>boundary</i></dt>
175 <dd>
176 boundary string (QByteArray)
177 </dd>
178 </dl><dl>
179 <dt>Returns:</dt>
180 <dd>
181 set of name, value pairs (set of tuple of string, string)
182 </dd>
183 </dl><a NAME="PasswordManager.__findForm" ID="PasswordManager.__findForm"></a>
184 <h4>PasswordManager.__findForm</h4>
185 <b>__findForm</b>(<i>webPage, data, boundary=None</i>)
186 <p>
187 Private method to find the form used for logging in.
188 </p><dl>
189 <dt><i>webPage</i></dt>
190 <dd>
191 reference to the web page (QWebPage)
192 </dd><dt><i>data</i></dt>
193 <dd>
194 data to be sent (QByteArray)
195 </dd><dt><i>boundary=</i></dt>
196 <dd>
197 boundary string (QByteArray) for multipart
198 encoded data, None for urlencoded data
199 </dd>
200 </dl><dl>
201 <dt>Returns:</dt>
202 <dd>
203 parsed form (LoginForm)
204 </dd>
205 </dl><a NAME="PasswordManager.__load" ID="PasswordManager.__load"></a>
206 <h4>PasswordManager.__load</h4>
207 <b>__load</b>(<i></i>)
208 <p>
209 Private method to load the saved login credentials.
210 </p><a NAME="PasswordManager.__loadNonXml" ID="PasswordManager.__loadNonXml"></a>
211 <h4>PasswordManager.__loadNonXml</h4>
212 <b>__loadNonXml</b>(<i>loginFile</i>)
213 <p>
214 Private method to load non-XML password files.
215 </p><p>
216 This method is to convert from the old, non-XML format to the new
217 XML based format.
218 </p><dl>
219 <dt><i>loginFile</i></dt>
220 <dd>
221 name of the non-XML password file (string)
222 </dd>
223 </dl><a NAME="PasswordManager.__stripUrl" ID="PasswordManager.__stripUrl"></a>
224 <h4>PasswordManager.__stripUrl</h4>
225 <b>__stripUrl</b>(<i>url</i>)
226 <p>
227 Private method to strip off all unneeded parts of a URL.
228 </p><dl>
229 <dt><i>url</i></dt>
230 <dd>
231 URL to be stripped (QUrl)
232 </dd>
233 </dl><dl>
234 <dt>Returns:</dt>
235 <dd>
236 stripped URL (QUrl)
237 </dd>
238 </dl><a NAME="PasswordManager.allSiteNames" ID="PasswordManager.allSiteNames"></a>
239 <h4>PasswordManager.allSiteNames</h4>
240 <b>allSiteNames</b>(<i></i>)
241 <p>
242 Public method to get a list of all site names.
243 </p><dl>
244 <dt>Returns:</dt>
245 <dd>
246 sorted list of all site names (list of strings)
247 </dd>
248 </dl><a NAME="PasswordManager.clear" ID="PasswordManager.clear"></a>
249 <h4>PasswordManager.clear</h4>
250 <b>clear</b>(<i></i>)
251 <p>
252 Public slot to clear the saved passwords.
253 </p><a NAME="PasswordManager.close" ID="PasswordManager.close"></a>
254 <h4>PasswordManager.close</h4>
255 <b>close</b>(<i></i>)
256 <p>
257 Public method to close the passwords manager.
258 </p><a NAME="PasswordManager.fill" ID="PasswordManager.fill"></a>
259 <h4>PasswordManager.fill</h4>
260 <b>fill</b>(<i>page</i>)
261 <p>
262 Public slot to fill login forms with saved data.
263 </p><dl>
264 <dt><i>page</i></dt>
265 <dd>
266 reference to the web page (QWebPage)
267 </dd>
268 </dl><a NAME="PasswordManager.getFileName" ID="PasswordManager.getFileName"></a>
269 <h4>PasswordManager.getFileName</h4>
270 <b>getFileName</b>(<i></i>)
271 <p>
272 Public method to get the file name of the passwords file.
273 </p><dl>
274 <dt>Returns:</dt>
275 <dd>
276 name of the passwords file (string)
277 </dd>
278 </dl><a NAME="PasswordManager.getLogin" ID="PasswordManager.getLogin"></a>
279 <h4>PasswordManager.getLogin</h4>
280 <b>getLogin</b>(<i>url, realm</i>)
281 <p>
282 Public method to get the login credentials.
283 </p><dl>
284 <dt><i>url</i></dt>
285 <dd>
286 URL to get the credentials for (QUrl)
287 </dd><dt><i>realm</i></dt>
288 <dd>
289 realm to get the credentials for (string)
290 </dd>
291 </dl><dl>
292 <dt>Returns:</dt>
293 <dd>
294 tuple containing the user name (string) and password (string)
295 </dd>
296 </dl><a NAME="PasswordManager.masterPasswordChanged" ID="PasswordManager.masterPasswordChanged"></a>
297 <h4>PasswordManager.masterPasswordChanged</h4>
298 <b>masterPasswordChanged</b>(<i>oldPassword, newPassword</i>)
299 <p>
300 Public slot to handle the change of the master password.
301 </p><dl>
302 <dt><i>oldPassword</i></dt>
303 <dd>
304 current master password (string)
305 </dd><dt><i>newPassword</i></dt>
306 <dd>
307 new master password (string)
308 </dd>
309 </dl><a NAME="PasswordManager.post" ID="PasswordManager.post"></a>
310 <h4>PasswordManager.post</h4>
311 <b>post</b>(<i>request, data</i>)
312 <p>
313 Public method to check, if the data to be sent contains login data.
314 </p><dl>
315 <dt><i>request</i></dt>
316 <dd>
317 reference to the network request (QNetworkRequest)
318 </dd><dt><i>data</i></dt>
319 <dd>
320 data to be sent (QByteArray)
321 </dd>
322 </dl><a NAME="PasswordManager.reload" ID="PasswordManager.reload"></a>
323 <h4>PasswordManager.reload</h4>
324 <b>reload</b>(<i></i>)
325 <p>
326 Public method to reload the login data.
327 </p><a NAME="PasswordManager.removePassword" ID="PasswordManager.removePassword"></a>
328 <h4>PasswordManager.removePassword</h4>
329 <b>removePassword</b>(<i>site</i>)
330 <p>
331 Public method to remove a password entry.
332 </p><dl>
333 <dt><i>site</i></dt>
334 <dd>
335 web site name (string)
336 </dd>
337 </dl><a NAME="PasswordManager.save" ID="PasswordManager.save"></a>
338 <h4>PasswordManager.save</h4>
339 <b>save</b>(<i></i>)
340 <p>
341 Public slot to save the login entries to disk.
342 </p><a NAME="PasswordManager.setLogin" ID="PasswordManager.setLogin"></a>
343 <h4>PasswordManager.setLogin</h4>
344 <b>setLogin</b>(<i>url, realm, username, password</i>)
345 <p>
346 Public method to set the login credentials.
347 </p><dl>
348 <dt><i>url</i></dt>
349 <dd>
350 URL to set the credentials for (QUrl)
351 </dd><dt><i>realm</i></dt>
352 <dd>
353 realm to set the credentials for (string)
354 </dd><dt><i>username</i></dt>
355 <dd>
356 username for the login (string)
357 </dd><dt><i>password</i></dt>
358 <dd>
359 password for the login (string)
360 </dd>
361 </dl><a NAME="PasswordManager.siteInfo" ID="PasswordManager.siteInfo"></a>
362 <h4>PasswordManager.siteInfo</h4>
363 <b>siteInfo</b>(<i>site</i>)
364 <p>
365 Public method to get a reference to the named site.
366 </p><dl>
367 <dt><i>site</i></dt>
368 <dd>
369 web site name (string)
370 </dd>
371 </dl><dl>
372 <dt>Returns:</dt>
373 <dd>
374 tuple containing the user name (string) and password (string)
375 </dd>
376 </dl><a NAME="PasswordManager.sitesCount" ID="PasswordManager.sitesCount"></a>
377 <h4>PasswordManager.sitesCount</h4>
378 <b>sitesCount</b>(<i></i>)
379 <p>
380 Public method to get the number of available sites.
381 </p><dl>
382 <dt>Returns:</dt>
383 <dd>
384 number of sites (integer)
385 </dd>
386 </dl>
387 <div align="right"><a href="#top">Up</a></div>
388 <hr />
389 </body></html>

eric ide

mercurial