changeset 51:12342551537b

bitsyauth/persona.py
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 30 Dec 2013 23:03:55 -0800
parents 5517ac16c9fb
children aabc968611bc
files bitsyauth/persona.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/bitsyauth/persona.py
+++ b/bitsyauth/persona.py
@@ -9,12 +9,15 @@ from webob import Request, Response, exc
 
 __all__ = ['BitsyauthPersona', 'persona_js']
 
 # persona javascript file path
 here = os.path.abspath(os.path.dirname(__file__))
 persona_js = None # TODO
 
 class BitsyauthPersona(object):
-    def __init__(self, app=None):
+    onload = """persona(%(loggedInUser)s, %(onloginURL)s, %(onlogoutURL)s);"""
+
+    def __init__(self, app=None, path='/auth'):
         self.app = app
+        self.path = path.rstrip('/')
     def __call__(self, environ, start_response):
         request = Request(environ)