aboutsummaryrefslogtreecommitdiffstats
path: root/docs/authenticators.rst
diff options
context:
space:
mode:
authortom christie tom@tomchristie.com2011-01-26 08:58:09 +0000
committertom christie tom@tomchristie.com2011-01-26 08:58:09 +0000
commit6807cf014cb0fde611f63c64bc352038206176cc (patch)
treeb5ebd4414852bf39efdf5380c57875c91e798ee2 /docs/authenticators.rst
parenteff54c00d514e1edd74fbc789f9064d09db40b02 (diff)
downloaddjango-rest-framework-6807cf014cb0fde611f63c64bc352038206176cc.tar.bz2
Added pygments_api example
Diffstat (limited to 'docs/authenticators.rst')
-rw-r--r--docs/authenticators.rst27
1 files changed, 27 insertions, 0 deletions
diff --git a/docs/authenticators.rst b/docs/authenticators.rst
new file mode 100644
index 00000000..e8cc9e51
--- /dev/null
+++ b/docs/authenticators.rst
@@ -0,0 +1,27 @@
+:mod:`authenticators`
+=====================
+
+.. module:: authenticators
+
+The authenticators module provides a standard set of authentication methods that can be plugged in to a :class:`Resource`, as well as providing a template by which to write custom authentication methods.
+
+The base class
+--------------
+
+All authenticators must subclass the :class:`BaseAuthenticator` class and override it's :func:`authenticate` method.
+
+.. class:: BaseAuthenticator
+
+ .. method:: authenticate(request)
+
+ Authenticate the request and return the authentication context or None.
+
+ The default permission checking on :class:`.Resource` will use the allowed_methods attribute for permissions if the authentication context is not None, and use anon_allowed_methods otherwise.
+
+ The authentication context is passed to the method calls (eg :meth:`.Resource.get`, :meth:`.Resource.post` etc...) in order to allow them to apply any more fine grained permission checking at the point the response is being generated.
+
+ This function must be overridden to be implemented.
+
+Provided authenticators
+-----------------------
+