{"action":"created","issue":{"url":"https://api.github.com/repos/theforeman/foreman/issues/4045","repository_url":"https://api.github.com/repos/theforeman/foreman","labels_url":"https://api.github.com/repos/theforeman/foreman/issues/4045/labels{/name}","comments_url":"https://api.github.com/repos/theforeman/foreman/issues/4045/comments","events_url":"https://api.github.com/repos/theforeman/foreman/issues/4045/events","html_url":"https://github.com/theforeman/foreman/pull/4045","id":191507691,"number":4045,"title":"Fixes #8016 - support sessions for api calls","user":{"login":"tstrachota","id":1186631,"avatar_url":"https://avatars.githubusercontent.com/u/1186631?v=3","gravatar_id":"","url":"https://api.github.com/users/tstrachota","html_url":"https://github.com/tstrachota","followers_url":"https://api.github.com/users/tstrachota/followers","following_url":"https://api.github.com/users/tstrachota/following{/other_user}","gists_url":"https://api.github.com/users/tstrachota/gists{/gist_id}","starred_url":"https://api.github.com/users/tstrachota/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tstrachota/subscriptions","organizations_url":"https://api.github.com/users/tstrachota/orgs","repos_url":"https://api.github.com/users/tstrachota/repos","events_url":"https://api.github.com/users/tstrachota/events{/privacy}","received_events_url":"https://api.github.com/users/tstrachota/received_events","type":"User","site_admin":false},"labels":[{"id":79040689,"url":"https://api.github.com/repos/theforeman/foreman/labels/Needs%20testing","name":"Needs testing","color":"fbca04","default":false},{"id":79040085,"url":"https://api.github.com/repos/theforeman/foreman/labels/Not%20yet%20reviewed","name":"Not yet reviewed","color":"009800","default":false},{"id":79040111,"url":"https://api.github.com/repos/theforeman/foreman/labels/Waiting%20on%20contributor","name":"Waiting on contributor","color":"f7c6c7","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-11-24T12:24:08Z","updated_at":"2016-11-24T12:24:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/theforeman/foreman/pulls/4045","html_url":"https://github.com/theforeman/foreman/pull/4045","diff_url":"https://github.com/theforeman/foreman/pull/4045.diff","patch_url":"https://github.com/theforeman/foreman/pull/4045.patch"},"body":"- authenticated api calls save user to session and set flag api_authenticated_session\r\n- sessions with such flag allow posting requests without CSRF token\r\n- api sessions exipre the same way as UI sessions\r\n- api sessions don't store any additional data to keep the requests stateless\r\n\r\nThis way the standard UI requests as well as API requests authenticated with session created from UI remain protected against CSRF. At the same time applications using API (such as hammer) can benefit from using session authentication and avoid the need of storing two tokens (CSRF and _session_id)."},"comment":{"url":"https://api.github.com/repos/theforeman/foreman/issues/comments/262764620","html_url":"https://github.com/theforeman/foreman/pull/4045#issuecomment-262764620","issue_url":"https://api.github.com/repos/theforeman/foreman/issues/4045","id":262764620,"user":{"login":"theforeman-bot","id":3763234,"avatar_url":"https://avatars.githubusercontent.com/u/3763234?v=3","gravatar_id":"","url":"https://api.github.com/users/theforeman-bot","html_url":"https://github.com/theforeman-bot","followers_url":"https://api.github.com/users/theforeman-bot/followers","following_url":"https://api.github.com/users/theforeman-bot/following{/other_user}","gists_url":"https://api.github.com/users/theforeman-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/theforeman-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/theforeman-bot/subscriptions","organizations_url":"https://api.github.com/users/theforeman-bot/orgs","repos_url":"https://api.github.com/users/theforeman-bot/repos","events_url":"https://api.github.com/users/theforeman-bot/events{/privacy}","received_events_url":"https://api.github.com/users/theforeman-bot/received_events","type":"User","site_admin":false},"created_at":"2016-11-24T12:24:11Z","updated_at":"2016-11-24T12:24:11Z","body":"@tstrachota, the Redmine ticket used is for a different project than the one associated with this GitHub repository. Please either:\n\n* Move [ticket #8016](http://projects.theforeman.org/issues/8016) from Hammer CLI to the Foreman project.\n* File a new ticket in the [Foreman project](http://projects.theforeman.org/projects/foreman/issues/new), update the PR title and the commit message (using `git commit --amend`).\n\n---------------------------------------\nThis message was auto-generated by Foreman's [prprocessor](http://projects.theforeman.org/projects/foreman/wiki/PrProcessor)\n"}}
{"actor":{"display_login":"theforeman-bot"}}