def auth_put(): username = utils.filter_str(flask.request.json.get('username')) password = flask.request.json['password'] token = flask.request.json.get('token') utils.set_auth(username, password, token) return utils.jsonify(utils.get_auth())
def auth_put(): username = utils.filter_str(flask.request.json.get('username')) password = flask.request.json['password'] utils.set_auth(username, password) return utils.jsonify({ 'username': utils.get_auth(), })
def auth_put(): username = utils.filter_str(flask.request.json.get('username')) password = flask.request.json['password'] token = flask.request.json.get('token') email_from = flask.request.json.get('email_from') email_api_key = flask.request.json.get('email_api_key') utils.set_auth(username, password, token) if email_from: persist_db.dict_set('auth', 'email_from', email_from) else: persist_db.dict_remove('auth', 'email_from') if email_api_key: persist_db.dict_set('auth', 'email_api_key', email_api_key) else: persist_db.dict_remove('auth', 'email_api_key') return utils.jsonify(utils.get_auth())
def auth_get(): return utils.jsonify(utils.get_auth())
def auth_get(): return utils.jsonify({ 'authenticated': utils.check_session(), 'username': utils.get_auth(), })