SparkJava Variables Scope
I'm developing a SparkJava (not Apache Spark) app, and I'd like to share an object between a before filter and a post route. The filter and the route are defined in different classes. I'm not willing to go on with sessions, cause it's a mobile app json api and theoretically speaking, it should be session free. The variable scope should be from the beginning of the request handling until the end. before(Main.API_PROTECTED + "/*", (req, res) -> { String token = req.headers("Authorization"); if (token == null | "".equals(token)) { halt(401, "You're not welcome."); } else { Partner partner = new