From 0473e5ab75ece62df8b7bb429c9e75db34ce71f6 Mon Sep 17 00:00:00 2001 From: Matthieu Huin Date: Wed, 16 Apr 2014 17:58:48 +0200 Subject: [PATCH] Add missing import, remove trailing ":" in middleware example Minor fixes to the external authentication example given in the documentation. Change-Id: I2bef7da8bf8278349fec80a513095637ea49f19a Closes-Bug: #1308634 Co-Authored-By: Florent Flament --- doc/source/external-auth.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/external-auth.rst b/doc/source/external-auth.rst index 7012884e86..932c71e00f 100644 --- a/doc/source/external-auth.rst +++ b/doc/source/external-auth.rst @@ -100,6 +100,7 @@ following the semantics below: .. code:: python from keystone.common import wsgi + from keystone import exception class MyMiddlewareAuth(wsgi.Middleware): def __init__(self, *args, **kwargs): @@ -114,7 +115,7 @@ following the semantics below: # Not applicable return self.application - username = self.do_auth(request): + username = self.do_auth(request) if username is not None: # User is authenticated request.environ['REMOTE_USER'] = username