Esempio n. 1
0
def ooemail_authorized():
    '''
    This is a callback for when we are returning from the
    external auth provider.
    So, we use this to handle our sign-in
    '''
    usr = User.by_email(request.args.get('email'))
    if usr is None:
        abort(403)
    ok = usr.check_pw(request.args.get('password'))
    if ok:
        login_user(usr)
        return 'oo email authorized'
    else:
        abort(403)
Esempio n. 2
0
def ooemail_authorized():
    '''
    This is a callback for when we are returning from the
    external auth provider.
    So, we use this to handle our sign-in
    '''
    usr = User.by_email(request.args.get('email'))
    if usr is None:
        abort(403)
    ok = usr.check_pw(request.args.get('password'))
    if ok:
        login_user(usr)
        return 'oo email authorized'
    else:
        abort(403)