summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorChris McDonough <chrism@plope.com>2011-01-25 01:28:09 -0500
committerChris McDonough <chrism@plope.com>2011-01-25 01:28:09 -0500
commitd3a028f3eab91f9bb26761af59fa1d71085a2921 (patch)
treede619348fc67487f775ed04f8c0482866ea1b395 /docs
parent2b529a0d2099b45cf79d2794c0f1375ceab49e0e (diff)
downloadpyramid-d3a028f3eab91f9bb26761af59fa1d71085a2921.tar.gz
pyramid-d3a028f3eab91f9bb26761af59fa1d71085a2921.tar.bz2
pyramid-d3a028f3eab91f9bb26761af59fa1d71085a2921.zip
add example of reconfiguring challenge decider for r.who users
Diffstat (limited to 'docs')
-rw-r--r--docs/whatsnew-1.0.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/whatsnew-1.0.rst b/docs/whatsnew-1.0.rst
index 5d7167908..91253b29b 100644
--- a/docs/whatsnew-1.0.rst
+++ b/docs/whatsnew-1.0.rst
@@ -412,7 +412,15 @@ Backwards Incompatibilities
cause problems for users of Pyramid with :mod:`repoze.who`, which
intercepts ``401 Unauthorized`` by default, but allows ``403 Forbidden`` to
pass through. Those deployments will need to configure :mod:`repoze.who`
- to also react to ``403 Forbidden``.
+ to also react to ``403 Forbidden``. To do so, use a repoze.who
+ ``challenge_decider`` that looks like this::
+
+ import zope.interface
+ from repoze.who.interfaces import IChallengeDecider
+
+ def challenge_decider(environ, status, headers):
+ return status.startswith('403') or status.startswith('401')
+ zope.interface.directlyProvides(challenge_decider, IChallengeDecider)
- The ``paster bfgshell`` command is now known as ``paster pshell``.