summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAlvaro Lopez Garcia <aloga@ifca.unican.es>2013-02-19 15:25:31 +0100
committerAlvaro Lopez Garcia <aloga@ifca.unican.es>2013-04-05 13:58:36 +0200
commit31c6cd80e45466912836daa9303a4e8c154698c4 (patch)
tree41e4b22ac5c93afc73ea1599de45dc9ed8e00902 /doc
parenta2fe23613e2286f71f5b5cc2ee726ed326eed998 (diff)
downloadkeystone-31c6cd80e45466912836daa9303a4e8c154698c4.tar.gz
keystone-31c6cd80e45466912836daa9303a4e8c154698c4.tar.xz
keystone-31c6cd80e45466912836daa9303a4e8c154698c4.zip
Fix example in documentation.
The example lacked the import of keystone.common.wsgi that could be misleading for new developers. Change-Id: I20be59f5792507a775d033867a69d31c5216633c
Diffstat (limited to 'doc')
-rw-r--r--doc/source/external-auth.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/source/external-auth.rst b/doc/source/external-auth.rst
index dd2a17a1..b7767416 100644
--- a/doc/source/external-auth.rst
+++ b/doc/source/external-auth.rst
@@ -66,6 +66,8 @@ be issued.
Your code should set the ``REMOTE_USER`` if the user is properly authenticated,
following the semantics below::
+ from keystone.common import wsgi
+
class MyMiddlewareAuth(wsgi.Middleware):
def __init__(self, *args, **kwargs):
super(MyMiddlewareAuth, self).__init__(*args, **kwargs)
@@ -84,7 +86,7 @@ following the semantics below::
# User is authenticated
request.environ['REMOTE_USER'] = username
else:
- # User is not authenticated
+ # User is not authenticated, render exception
raise exception.Unauthorized("Invalid user")