Browse files

updated the custom auth policy example

  • Loading branch information...
1 parent b39dcef commit 517db0eaa9ec37480fdff52fc6aa3f079afa8393 @mmerickel mmerickel committed Sep 7, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 auth/custom.rst
@@ -3,15 +3,17 @@ Custom Authentication Policy
Here is an example of a custom AuthenticationPolicy, based off of
the native ``AuthTktAuthenticationPolicy``, but with added groups support.
-This example implies you have a ``user`` attribute on your request, like
-the ``RequestWithUserAttribute`` version of the request in
-:ref:`user object`, and it has a ``groups`` relation on it:
+This example implies you have a ``user`` attribute on your request
+(see :ref:`user object`) and that the ``user`` should have a
+``groups`` relation on it:
.. code-block:: python
+ from pyramid.authentication import AuthTktCookieHelper
+ from import Everyone, Authenticated
class MyAuthenticationPolicy(object):
- implements(IAuthenticationPolicy)
def __init__(self, settings):
self.cookie = AuthTktCookieHelper(

0 comments on commit 517db0e

Please sign in to comment.