{"action":"created","issue":{"url":"https://api.github.com/repos/playframework/playframework/issues/5847","repository_url":"https://api.github.com/repos/playframework/playframework","labels_url":"https://api.github.com/repos/playframework/playframework/issues/5847/labels{/name}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/5847/comments","events_url":"https://api.github.com/repos/playframework/playframework/issues/5847/events","html_url":"https://github.com/playframework/playframework/issues/5847","id":139821249,"number":5847,"title":"CSRFFilter is hard to initialize correctly unless you rely on global state or on javax.inject","user":{"login":"julienrf","id":332812,"avatar_url":"https://avatars.githubusercontent.com/u/332812?v=3","gravatar_id":"","url":"https://api.github.com/users/julienrf","html_url":"https://github.com/julienrf","followers_url":"https://api.github.com/users/julienrf/followers","following_url":"https://api.github.com/users/julienrf/following{/other_user}","gists_url":"https://api.github.com/users/julienrf/gists{/gist_id}","starred_url":"https://api.github.com/users/julienrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienrf/subscriptions","organizations_url":"https://api.github.com/users/julienrf/orgs","repos_url":"https://api.github.com/users/julienrf/repos","events_url":"https://api.github.com/users/julienrf/events{/privacy}","received_events_url":"https://api.github.com/users/julienrf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-03-10T08:34:02Z","updated_at":"2016-03-10T15:49:02Z","closed_at":"2016-03-10T15:32:18Z","body":"The actual constructor relies on the global state or javax.inject because the default value of the `tokenProvider` parameter explicitly uses `Crypto.crypto`, which itself uses either `Play.privateMaybeApplication` or `Application.instanceCache`.\r\n\r\nMore generally, it is currently quite hard to write code that does **not** indirectly rely on javax.inject or the global state. We should definitely push more effort into making these situations more explicit so that they can not happen unbeknownst to the developer."},"comment":{"url":"https://api.github.com/repos/playframework/playframework/issues/comments/194916053","html_url":"https://github.com/playframework/playframework/issues/5847#issuecomment-194916053","issue_url":"https://api.github.com/repos/playframework/playframework/issues/5847","id":194916053,"user":{"login":"julienrf","id":332812,"avatar_url":"https://avatars.githubusercontent.com/u/332812?v=3","gravatar_id":"","url":"https://api.github.com/users/julienrf","html_url":"https://github.com/julienrf","followers_url":"https://api.github.com/users/julienrf/followers","following_url":"https://api.github.com/users/julienrf/following{/other_user}","gists_url":"https://api.github.com/users/julienrf/gists{/gist_id}","starred_url":"https://api.github.com/users/julienrf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/julienrf/subscriptions","organizations_url":"https://api.github.com/users/julienrf/orgs","repos_url":"https://api.github.com/users/julienrf/repos","events_url":"https://api.github.com/users/julienrf/events{/privacy}","received_events_url":"https://api.github.com/users/julienrf/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T15:49:01Z","updated_at":"2016-03-10T15:49:01Z","body":"I just opened #5856"}}