Chris McDonough
2010-10-03 4a8793edfc53df93a806d9eab896c5bae103d6ae
appease emacs
3 files modified
7 ■■■■ changed files
docs/examples/hybrid/example.py 2 ●●● patch | view | raw | blame | history
docs/examples/standalone_login.py 2 ●●●●● patch | view | raw | blame | history
docs/examples/standalone_login_no_who.py 3 ●●●● patch | view | raw | blame | history
docs/examples/hybrid/example.py
@@ -1,7 +1,7 @@
""" Simple BFG application demonstrating use of repoze.who in "hybrid" mode.
- repoze.who middleware intercepts and validates existing request credentials,
  leaving 'REMOTE_USER' in the WSGI environ if they are OK>
  leaving 'REMOTE_USER' in the WSGI environ if they are OK.
- Application handles login / logout directly, using the repoze.who API
  to validate credentials and set headers.
docs/examples/standalone_login.py
@@ -65,6 +65,8 @@
plugins =
"""
# oh emacs python-mode, you disappoint me """
api_factory = None
def _configure_api_factory():
docs/examples/standalone_login_no_who.py
@@ -30,6 +30,8 @@
</html>
"""
# oh emacs python-mode, you disappoint me """
# Clients have to know about these values out-of-band
SECRET = 's33kr1t'
COOKIE_NAME = 'auth_cookie'
@@ -70,7 +72,6 @@
        login_name = request.POST['login_name']
        password = request.POST['password']
        remote_addr = environ['REMOTE_ADDR']
        tokens = userdata = ''
        if _validate(login_name, password):
            headers = [('Location', came_from)]
            ticket = auth_tkt.AuthTicket(SECRET, login_name, remote_addr,