예제 #1
0
def oauth_authorized(resp):
    next_url = request.args.get('next') or url_for('routing.index')
    if not resp:
        session['unauthorized'] = True
        return redirect(url_for("routing.index"))

    session["indico_mobile_oauthtok"] = (resp['oauth_token'], resp['oauth_token_secret'])
    session['unauthorized'] = False
    session['indico_user'] = resp['user_id']
    user_info = get_user_info(resp['user_id'])
    session['indico_user_name'] = "%s %s %s"%(user_info.get('title'), user_info.get('firstName'), user_info.get('familyName'))
    return redirect(next_url)
예제 #2
0
def oauth_authorized(resp):
    next_url = request.args.get('next') or url_for('routing.index')
    if not resp:
        session['unauthorized'] = True
        return redirect(url_for("routing.index"))

    session.permanent = True
    session["indico_mobile_oauthtok"] = (resp['oauth_token'], resp['oauth_token_secret'])
    session['unauthorized'] = False
    session['indico_user'] = resp['user_id']
    session['oauth_token_expiration_timestamp'] = resp['oauth_token_expiration_timestamp']
    session['oauth_token_ttl'] = int(resp['oauth_token_ttl'])
    user_info = get_user_info(resp['user_id'])
    session['indico_user_name'] = "%s %s %s" % (user_info.get('title'), user_info.get('firstName'),
                                                user_info.get('familyName'))
    return redirect(next_url)
예제 #3
0
def get_user_info(user_id):
    from indicomobile.core.indico_api import get_user_info
    return get_user_info(user_id)
예제 #4
0
def get_user_info(user_id):
    from indicomobile.core.indico_api import get_user_info
    return get_user_info(user_id)