Beispiel #1
0
def get_key():
    '''Get a user key for a logged in user'''

    u = Users(session.get('logged_in_user'))
    # fetch/generate key
    key = u.get_key()

    return make_response(key.key, 200)
Beispiel #2
0
def get_key():
    '''Get a user key for a logged in user'''

    u = Users(session.get('logged_in_user'))
    # fetch/generate key
    key = u.get_key()

    return make_response(key.key, 200)
Beispiel #3
0
def generate_key():
    '''Generate/get a user key for the current user'''

    current_user_id = session.get('logged_in_user')

    useri = Users(current_user_id)

    # fetch/generate key
    key = useri.get_key()

    return render_template('admin_generate_user_key.html', **locals())