示例#1
0
def post_assertion():
    # There's not much to check about the assertion
    audience = urlparse.urlparse(flask.request.url).netloc
    assertion = flask.request.form['assertion']
    recipient = flask.request.form['recipient']
    email = browserid.verify_assertion(assertion, audience)
    chat.post_assertion(email, recipient, assertion)
    return assertion
示例#2
0
def login(**kwargs):
    # Verify the certificate. If so, return a session
    assertion = flask.request.form['assertion']
    session = flask.session
    try:
        email = browserid.verify_assertion(assertion, 'browseridchat.com')
    except ValueError, e:
        raise e