aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-07-16 01:56:44 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-07-16 01:56:44 +0200
commitff9af9afae670abd2944ad56705032285db08bc0 (patch)
tree65946828cd8237ef0907d5b73a0cf010b1766a18 /docs
parenta4cd1413badcf85553f2f3f62aba364289746c0e (diff)
downloadbugzilla-triage-ff9af9afae670abd2944ad56705032285db08bc0.tar.gz
A nucleus of the documentation for passwords module.
Diffstat (limited to 'docs')
-rw-r--r--docs/passwords.md51
1 files changed, 51 insertions, 0 deletions
diff --git a/docs/passwords.md b/docs/passwords.md
new file mode 100644
index 0000000..283c54b
--- /dev/null
+++ b/docs/passwords.md
@@ -0,0 +1,51 @@
+The `passwords` module provides access to the Firefox Password Manager.
+
+<api name="setPassword">
+@method
+The `setPassword` method sets new authentication pair to the encrypted
+Firefox's nsILoginManager.
+
+It is most useful for storing sensitive data with private information
+to the store. It is most useful in situation where script would need
+some personal information, but it is our responsibility to store it
+securely.
+
+@param username {string} login name
+@param pass {string} password
+@param domain {string} hostname of the server we are connecting to as URL.
+As for example "http://bugzilla.mozilla.org"
+@param realm {string} String distinguishing this login to other ones for
+the same hostname.
+
+@returns {string}
+</api>
+
+<api name="getPassword">
+@method
+The `getPassword` method returns the password specified by the
+parameters of this function.
+
+@param username {string} login name
+@param domain {string} the same as in `setPassword` method.
+@param realm {string} the same as in `setPassword` method.
+
+@returns {string}
+</api>
+
+<api name="removePassword">
+@method
+The `removePassword` method remove the login information from the storage.
+Note that the serach parameters of this function must much **EXACTLY**
+parameters of the corresponding call to `setPassword`.
+
+@param username {string} login name
+@param domain {string} the same as in `setPassword` method.
+@param realm {string} the same as in `setPassword` method.
+
+@returns {string}
+</api>
+
+Examples
+--------
+
+For examples see `tests/test-password.js` \ No newline at end of file