{"action":"created","issue":{"url":"https://api.github.com/repos/owncloud/core/issues/19752","labels_url":"https://api.github.com/repos/owncloud/core/issues/19752/labels{/name}","comments_url":"https://api.github.com/repos/owncloud/core/issues/19752/comments","events_url":"https://api.github.com/repos/owncloud/core/issues/19752/events","html_url":"https://github.com/owncloud/core/pull/19752","id":111277094,"number":19752,"title":"[EARLY WIP] Move authentication code out of base.php + Two Factor Auth","user":{"login":"LukasReschke","id":878997,"avatar_url":"https://avatars.githubusercontent.com/u/878997?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasReschke","html_url":"https://github.com/LukasReschke","followers_url":"https://api.github.com/users/LukasReschke/followers","following_url":"https://api.github.com/users/LukasReschke/following{/other_user}","gists_url":"https://api.github.com/users/LukasReschke/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasReschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasReschke/subscriptions","organizations_url":"https://api.github.com/users/LukasReschke/orgs","repos_url":"https://api.github.com/users/LukasReschke/repos","events_url":"https://api.github.com/users/LukasReschke/events{/privacy}","received_events_url":"https://api.github.com/users/LukasReschke/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/owncloud/core/labels/1%20-%20To%20develop","name":"1 - To develop","color":"ededed"},{"url":"https://api.github.com/repos/owncloud/core/labels/enhancement","name":"enhancement","color":"02e10c"},{"url":"https://api.github.com/repos/owncloud/core/labels/security","name":"security","color":"e11d21"},{"url":"https://api.github.com/repos/owncloud/core/labels/technical%20debt","name":"technical debt","color":"FFFF00"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/48","html_url":"https://github.com/owncloud/core/milestones/9.0-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/48/labels","id":1196845,"number":48,"title":"9.0-current","description":"","creator":{"login":"cmonteroluque","id":879976,"avatar_url":"https://avatars.githubusercontent.com/u/879976?v=3","gravatar_id":"","url":"https://api.github.com/users/cmonteroluque","html_url":"https://github.com/cmonteroluque","followers_url":"https://api.github.com/users/cmonteroluque/followers","following_url":"https://api.github.com/users/cmonteroluque/following{/other_user}","gists_url":"https://api.github.com/users/cmonteroluque/gists{/gist_id}","starred_url":"https://api.github.com/users/cmonteroluque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmonteroluque/subscriptions","organizations_url":"https://api.github.com/users/cmonteroluque/orgs","repos_url":"https://api.github.com/users/cmonteroluque/repos","events_url":"https://api.github.com/users/cmonteroluque/events{/privacy}","received_events_url":"https://api.github.com/users/cmonteroluque/received_events","type":"User","site_admin":false},"open_issues":529,"closed_issues":344,"state":"open","created_at":"2015-07-07T14:21:23Z","updated_at":"2015-11-11T16:12:38Z","due_on":"2016-02-09T05:00:00Z","closed_at":null},"comments":3,"created_at":"2015-10-13T21:39:39Z","updated_at":"2015-11-11T16:14:31Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/19752","html_url":"https://github.com/owncloud/core/pull/19752","diff_url":"https://github.com/owncloud/core/pull/19752.diff","patch_url":"https://github.com/owncloud/core/pull/19752.patch"},"body":":warning: :warning: :warning: :warning: :warning: **Early WIP - do not merge** :warning: :warning: :warning: :warning: :warning: \r\n\r\nThis refactors the authentication logic out of base.php into it's own controller and also adds support for Two-Factor-Authentication by offering an easy and extensible interface. Also token-based auth and other magic :speak_no_evil: \r\n\r\nIt's in an early WIP phase and just there so that people can comment on the approach. Yes, it has bugs at the moment :wink: \r\n\r\n**Todo**:\r\n- [ ] Verify that a logout does also delete remember me tokens\r\n- [ ] Verify that Basic Auth is still possible on official API endpoints\r\n- [ ] Add middleware for Apache Auth \r\n- [ ] Write and fix existing unit tests\r\n- [ ] Full regression testing \r\n- [ ] Remove example app. That's only here for the reference for now. \r\n- [ ] Add logic for remember me tokens \r\n- [ ] Copyright headers \r\n- [ ] Adjust other endpoints using `\\OCP\\IUserSession::login` to check if two factor auth is enabled\r\n  - [ ] Make application specific tokens live in core…? Also related to  https://github.com/owncloud/core/issues/19529\r\n- [ ] Once done: Split into proper commits. \r\n- [ ] …\r\n\r\n<hr/>\r\n\r\n**Regular authentication:**\r\n![regular](https://cloud.githubusercontent.com/assets/878997/10608211/52f3be2c-773e-11e5-9efd-d55d136e858f.png)\r\n\r\n**Second factor authentication:**\r\n![second-factor](https://cloud.githubusercontent.com/assets/878997/10608216/56de4dd6-773e-11e5-8b5d-8293736fb6aa.png)\r\n\r\n**Valid token:**\r\n![valid-token](https://cloud.githubusercontent.com/assets/878997/10608220/5b029516-773e-11e5-8d35-beed00bced37.png)\r\n\r\n:warning: :warning: :warning: :warning: :warning: **Early WIP - do not merge** :warning: :warning: :warning: :warning: :warning: \r\n"},"comment":{"url":"https://api.github.com/repos/owncloud/core/issues/comments/155831087","html_url":"https://github.com/owncloud/core/pull/19752#issuecomment-155831087","issue_url":"https://api.github.com/repos/owncloud/core/issues/19752","id":155831087,"user":{"login":"danimo","id":1315934,"avatar_url":"https://avatars.githubusercontent.com/u/1315934?v=3","gravatar_id":"","url":"https://api.github.com/users/danimo","html_url":"https://github.com/danimo","followers_url":"https://api.github.com/users/danimo/followers","following_url":"https://api.github.com/users/danimo/following{/other_user}","gists_url":"https://api.github.com/users/danimo/gists{/gist_id}","starred_url":"https://api.github.com/users/danimo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danimo/subscriptions","organizations_url":"https://api.github.com/users/danimo/orgs","repos_url":"https://api.github.com/users/danimo/repos","events_url":"https://api.github.com/users/danimo/events{/privacy}","received_events_url":"https://api.github.com/users/danimo/received_events","type":"User","site_admin":false},"created_at":"2015-11-11T16:14:31Z","updated_at":"2015-11-11T16:14:31Z","body":"@MTRichards Here's the TF PR I was talking about."}}