def METHOD_NAME():
    history_id = self.cur_history_id
    data = request.get_json()
    username = data.get("username", session.get("name")).strip()
    if self.validate_username(username):
        session["name"] = username
        self.web.add_request(
            request.path,
            {"id": history_id, "status_code": 200},
        )
        self.web.add_request(self.web.REQUEST_LOAD, request.path)
        r = make_response(
            jsonify(
                username=session.get("name"),
                success=True,
            )
        )
    else:
        self.web.add_request(
            request.path,
            {"id": history_id, "status_code": 403},
        )
        r = make_response(
            jsonify(
                username=session.get("name"),
                success=False,
            )
        )
    return r