diff options
| author | Eli Collins <elic@assurancetechnologies.com> | 2016-06-26 16:20:04 -0400 |
|---|---|---|
| committer | Eli Collins <elic@assurancetechnologies.com> | 2016-06-26 16:20:04 -0400 |
| commit | 7c8af0a27ca1a8dbfec8aca488ad68608e7f05c5 (patch) | |
| tree | fc35336f44a2a4c9294c7ded2bcc2a62f528e105 /docs/lib | |
| parent | ce4fabb2fd0b1fdbe2d2a3547d906e8fb0c0c9a4 (diff) | |
| download | passlib-7c8af0a27ca1a8dbfec8aca488ad68608e7f05c5.tar.gz | |
Enhanced disabled hash management
* PasswordHash.is_disabled flag now present, to programmatically detect
disabled hashers (unix_disabled, etc)
* CryptContext now offers methods for disabling, enabling, and testing
hashes to see if they're tied to a real hash or not.
* disabled hashers now offer .disable() and .enable() helpers,
as backend for CryptContext methods.
* django_disabled now appends random alphanumeric string, per Django.
* adjusted HandlerCase:
- checks handler.is_disabled,
- handle django_disabled via disabled_contains_salt flag
- tests .disable() and .enable() api if present
Diffstat (limited to 'docs/lib')
| -rw-r--r-- | docs/lib/passlib.context.rst | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/lib/passlib.context.rst b/docs/lib/passlib.context.rst index a7ed687..312f55c 100644 --- a/docs/lib/passlib.context.rst +++ b/docs/lib/passlib.context.rst @@ -408,6 +408,21 @@ hashes will want to use one of the following methods: .. rst-class:: html-toggle expanded +.. _context-disabled-hashes: + +Disabled Hash Managment +----------------------- +.. versionadded:: 1.7 + +It's frequently useful to disable a user's ability to login by +replacing their password hash with a standin that's guaranteed +to never verify, against *any* password. CryptContext offers +some convenience methods for this through the following API. + +.. automethod:: CryptContext.disable +.. automethod:: CryptContext.enable +.. automethod:: CryptContext.is_enabled + Alternate Constructors ---------------------- In addition to the main class constructor, which accepts a configuration |
