view bitsyauth/persona.py @ 52:aabc968611bc

STUB: bitsyauth/__init__.py
author Jeff Hammel <k0scist@gmail.com>
date Sun, 23 Feb 2014 17:08:13 -0800
parents 12342551537b
children
line wrap: on
line source

"""
bitsyauth Mozilla persona implementation

https://login.persona.org/
"""

import os
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):
    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)