diff options
author | Eli Collins <elic@assurancetechnologies.com> | 2012-04-17 23:14:51 -0400 |
---|---|---|
committer | Eli Collins <elic@assurancetechnologies.com> | 2012-04-17 23:14:51 -0400 |
commit | 64ab6fc89b497efa9169f11d55251e417c4db0ba (patch) | |
tree | b3f6f5dc27b87a6bc90cb3686fa98239ee8ff053 /docs/lib/passlib.apache.rst | |
parent | 8eb4c4d3b58eec6802c698ddbf357b2fd243a68c (diff) | |
parent | cd029846fdc0c3d7ffc7f53caad4579e7e0e8725 (diff) | |
download | passlib-ironpython-support-dev.tar.gz |
Merge from defaultironpython-support-dev
Diffstat (limited to 'docs/lib/passlib.apache.rst')
-rw-r--r-- | docs/lib/passlib.apache.rst | 33 |
1 files changed, 20 insertions, 13 deletions
diff --git a/docs/lib/passlib.apache.rst b/docs/lib/passlib.apache.rst index 731baed..8649e62 100644 --- a/docs/lib/passlib.apache.rst +++ b/docs/lib/passlib.apache.rst @@ -8,6 +8,13 @@ This module provides utilities for reading and writing Apache's htpasswd and htdigest files; though the use of two helper classes. +.. versionchanged:: 1.6 + The api for this module was updated to be more flexible, + and to have (hopefully) less confusing method names. + The old method and keyword names are supported but deprecated, and + will be removed in Passlib 1.8. + No more backwards-incompatible changes are currently planned. + .. index:: apache; htpasswd Htpasswd Files @@ -17,34 +24,34 @@ A quick summary of it's usage:: >>> from passlib.apache import HtpasswdFile - >>> #when creating a new file, set to autoload=False, add entries, and save. - >>> ht = HtpasswdFile("test.htpasswd", autoload=False) - >>> ht.update("someuser", "really secret password") + >>> # when creating a new file, set to new=True, add entries, and save. + >>> ht = HtpasswdFile("test.htpasswd", new=True) + >>> ht.set_password("someuser", "really secret password") >>> ht.save() - >>> #loading an existing file to update a password + >>> # loading an existing file to update a password >>> ht = HtpasswdFile("test.htpasswd") - >>> ht.update("someuser", "new secret password") + >>> ht.set_password("someuser", "new secret password") >>> ht.save() - >>> #examining file, verifying user's password + >>> # examining file, verifying user's password >>> ht = HtpasswdFile("test.htpasswd") >>> ht.users() [ "someuser" ] - >>> ht.verify("someuser", "wrong password") + >>> ht.check_password("someuser", "wrong password") False - >>> ht.verify("someuser", "new secret password") + >>> ht.check_password("someuser", "new secret password") True - >>> #making in-memory changes and exporting to string + >>> # making in-memory changes and exporting to string >>> ht = HtpasswdFile() - >>> ht.update("someuser", "mypass") - >>> ht.update("someuser", "anotherpass") + >>> ht.set_password("someuser", "mypass") + >>> ht.set_password("someuser", "anotherpass") >>> print ht.to_string() someuser:$apr1$T4f7D9ly$EobZDROnHblCNPCtrgh5i/ anotheruser:$apr1$vBdPWvh1$GrhfbyGvN/7HalW5cS9XB1 -.. autoclass:: HtpasswdFile(path, default=None, autoload=True) +.. autoclass:: HtpasswdFile(path=None, new=False, autosave=False, ...) .. index:: apache; htdigest @@ -53,7 +60,7 @@ Htdigest Files The :class:`!HtdigestFile` class allows management of htdigest files in a similar fashion to :class:`HtpasswdFile`. -.. autoclass:: HtdigestFile(path, autoload=True) +.. autoclass:: HtdigestFile(path, default_realm=None, new=False, autosave=False, ...) .. rubric:: Footnotes |