From 6af6bb95110aad0f81841102e27df7fb8f9b31e3 Mon Sep 17 00:00:00 2001
From: Michael B. Trausch <mbt@naunetcorp.com>
Date: Sat, 25 Feb 2012 14:56:40 -0500
Subject: [PATCH 1/2] fixed #17764 -- bring docs up-to-date with authentication package
---
docs/topics/auth.txt | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/docs/topics/auth.txt b/docs/topics/auth.txt
index 3b6ad1b..a792069 100644
|
a
|
b
|
Django provides two functions in :mod:`django.contrib.auth`:
|
| 760 | 760 | Manually managing a user's password |
| 761 | 761 | ----------------------------------- |
| 762 | 762 | |
| 763 | | .. currentmodule:: django.contrib.auth.utils |
| | 763 | .. currentmodule:: django.contrib.auth.hashers |
| 764 | 764 | |
| 765 | 765 | .. versionadded:: 1.4 |
| 766 | | The :mod:`django.contrib.auth.utils` module provides a set of functions |
| | 766 | The :mod:`django.contrib.auth.hashers` module provides a set of functions |
| 767 | 767 | to create and validate hashed password. You can use them independently |
| 768 | 768 | from the ``User`` model. |
| 769 | 769 | |
| … |
… |
Manually managing a user's password
|
| 771 | 771 | |
| 772 | 772 | If you'd like to manually authenticate a user by comparing a plain-text |
| 773 | 773 | password to the hashed password in the database, use the convenience |
| 774 | | function :func:`django.contrib.auth.utils.check_password`. It takes two |
| | 774 | function :func:`django.contrib.auth.hashers.check_password`. It takes two |
| 775 | 775 | arguments: the plain-text password to check, and the full value of a |
| 776 | 776 | user's ``password`` field in the database to check against, and returns |
| 777 | 777 | ``True`` if they match, ``False`` otherwise. |
| … |
… |
Manually managing a user's password
|
| 785 | 785 | Currently supported algorithms are: ``'sha1'``, ``'md5'`` and ``'crypt'`` |
| 786 | 786 | if you have the ``crypt`` library installed. If the second argument is |
| 787 | 787 | ``None``, an unusable password is returned (a one that will be never |
| 788 | | accepted by :func:`django.contrib.auth.utils.check_password`). |
| | 788 | accepted by :func:`django.contrib.auth.hashers.check_password`). |
| 789 | 789 | |
| 790 | 790 | .. function:: is_password_usable() |
| 791 | 791 | |
| 792 | 792 | .. versionadded:: 1.4 |
| 793 | 793 | |
| 794 | 794 | Checks if the given string is a hashed password that has a chance |
| 795 | | of being verified against :func:`django.contrib.auth.utils.check_password`. |
| | 795 | of being verified against :func:`django.contrib.auth.hashers.check_password`. |
| 796 | 796 | |
| 797 | 797 | |
| 798 | 798 | How to log a user out |