{"action":"created","issue":{"url":"https://api.github.com/repos/scheb/two-factor-bundle/issues/64","repository_url":"https://api.github.com/repos/scheb/two-factor-bundle","labels_url":"https://api.github.com/repos/scheb/two-factor-bundle/issues/64/labels{/name}","comments_url":"https://api.github.com/repos/scheb/two-factor-bundle/issues/64/comments","events_url":"https://api.github.com/repos/scheb/two-factor-bundle/issues/64/events","html_url":"https://github.com/scheb/two-factor-bundle/issues/64","id":170559284,"number":64,"title":"Before the trusted device is persisted it should first check if context allows to do so.","user":{"login":"zerkms","id":302295,"avatar_url":"https://avatars.githubusercontent.com/u/302295?v=3","gravatar_id":"","url":"https://api.github.com/users/zerkms","html_url":"https://github.com/zerkms","followers_url":"https://api.github.com/users/zerkms/followers","following_url":"https://api.github.com/users/zerkms/following{/other_user}","gists_url":"https://api.github.com/users/zerkms/gists{/gist_id}","starred_url":"https://api.github.com/users/zerkms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerkms/subscriptions","organizations_url":"https://api.github.com/users/zerkms/orgs","repos_url":"https://api.github.com/users/zerkms/repos","events_url":"https://api.github.com/users/zerkms/events{/privacy}","received_events_url":"https://api.github.com/users/zerkms/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-11T02:26:14Z","updated_at":"2016-08-14T09:53:46Z","closed_at":null,"body":"Currently the implementation (excerpt) in `\\Scheb\\TwoFactorBundle\\Security\\TwoFactor\\Trusted\\TrustedFilter` looks like\r\n\r\n```php\r\nif ($context->isAuthenticated() && $request->get($this->trustedName)) {\r\n    $cookie = $this->cookieManager->createTrustedCookie($request, $user);\r\n    $response->headers->setCookie($cookie);\r\n}\r\n```\r\n\r\nIt is prone to race condition (when trusted is disabled between requests) or when a user manually added a flag.\r\n\r\nSo it should additionally check for `$context->useTrustedOption()`."},"comment":{"url":"https://api.github.com/repos/scheb/two-factor-bundle/issues/comments/239665212","html_url":"https://github.com/scheb/two-factor-bundle/issues/64#issuecomment-239665212","issue_url":"https://api.github.com/repos/scheb/two-factor-bundle/issues/64","id":239665212,"user":{"login":"zerkms","id":302295,"avatar_url":"https://avatars.githubusercontent.com/u/302295?v=3","gravatar_id":"","url":"https://api.github.com/users/zerkms","html_url":"https://github.com/zerkms","followers_url":"https://api.github.com/users/zerkms/followers","following_url":"https://api.github.com/users/zerkms/following{/other_user}","gists_url":"https://api.github.com/users/zerkms/gists{/gist_id}","starred_url":"https://api.github.com/users/zerkms/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zerkms/subscriptions","organizations_url":"https://api.github.com/users/zerkms/orgs","repos_url":"https://api.github.com/users/zerkms/repos","events_url":"https://api.github.com/users/zerkms/events{/privacy}","received_events_url":"https://api.github.com/users/zerkms/received_events","type":"User","site_admin":false},"created_at":"2016-08-14T09:53:46Z","updated_at":"2016-08-14T09:53:46Z","body":"Yep, I will do tomorrow"}}
{"actor":{"display_login":"zerkms"}}