zopefoundation/zope.pluggableauth — pull request #1 by mgedmin (2013-04-09 12:59:27+00:00)
Title: Extracted a reusable function redirectWithComeFrom()

This should make the life easier for people writing alternative credentials plugins (e.g. me).

Example usage:
```python
from zope.pluggableauth.plugins.session import redirectWithComeFrom
...
class MyCredentialsPlugin(Persistent, Contained):
def challenge(self, request):
if not IHTTPRequest.providedBy(request):
return False
login_url = absoluteURL(getSite(), '@@login.html')
redirectWithComeFrom(request, login_url)
return True
```