{"action":"created","issue":{"url":"https://api.github.com/repos/policycompass/policycompass/issues/91","labels_url":"https://api.github.com/repos/policycompass/policycompass/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/policycompass/policycompass/issues/91/comments","events_url":"https://api.github.com/repos/policycompass/policycompass/issues/91/events","html_url":"https://github.com/policycompass/policycompass/issues/91","id":78494454,"number":91,"title":"Document how to use Auth service","user":{"login":"nidico","id":457147,"avatar_url":"https://avatars.githubusercontent.com/u/457147?v=3","gravatar_id":"","url":"https://api.github.com/users/nidico","html_url":"https://github.com/nidico","followers_url":"https://api.github.com/users/nidico/followers","following_url":"https://api.github.com/users/nidico/following{/other_user}","gists_url":"https://api.github.com/users/nidico/gists{/gist_id}","starred_url":"https://api.github.com/users/nidico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nidico/subscriptions","organizations_url":"https://api.github.com/users/nidico/orgs","repos_url":"https://api.github.com/users/nidico/repos","events_url":"https://api.github.com/users/nidico/events{/privacy}","received_events_url":"https://api.github.com/users/nidico/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/policycompass/policycompass/labels/AUTH","name":"AUTH","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":{"login":"nidico","id":457147,"avatar_url":"https://avatars.githubusercontent.com/u/457147?v=3","gravatar_id":"","url":"https://api.github.com/users/nidico","html_url":"https://github.com/nidico","followers_url":"https://api.github.com/users/nidico/followers","following_url":"https://api.github.com/users/nidico/following{/other_user}","gists_url":"https://api.github.com/users/nidico/gists{/gist_id}","starred_url":"https://api.github.com/users/nidico/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nidico/subscriptions","organizations_url":"https://api.github.com/users/nidico/orgs","repos_url":"https://api.github.com/users/nidico/repos","events_url":"https://api.github.com/users/nidico/events{/privacy}","received_events_url":"https://api.github.com/users/nidico/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/policycompass/policycompass/milestones/4","html_url":"https://github.com/policycompass/policycompass/milestones/Sprint%204","labels_url":"https://api.github.com/repos/policycompass/policycompass/milestones/4/labels","id":1111818,"number":4,"title":"Sprint 4","description":"This is the fourth out of a total of six iterations (sprints) for WP3 Implementation of the Policy Compass platform.","creator":{"login":"rukala","id":11075214,"avatar_url":"https://avatars.githubusercontent.com/u/11075214?v=3","gravatar_id":"","url":"https://api.github.com/users/rukala","html_url":"https://github.com/rukala","followers_url":"https://api.github.com/users/rukala/followers","following_url":"https://api.github.com/users/rukala/following{/other_user}","gists_url":"https://api.github.com/users/rukala/gists{/gist_id}","starred_url":"https://api.github.com/users/rukala/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rukala/subscriptions","organizations_url":"https://api.github.com/users/rukala/orgs","repos_url":"https://api.github.com/users/rukala/repos","events_url":"https://api.github.com/users/rukala/events{/privacy}","received_events_url":"https://api.github.com/users/rukala/received_events","type":"User","site_admin":false},"open_issues":18,"closed_issues":9,"state":"open","created_at":"2015-05-15T08:57:33Z","updated_at":"2015-09-09T06:54:08Z","due_on":"2015-09-08T22:00:00Z","closed_at":null},"comments":3,"created_at":"2015-05-20T11:54:41Z","updated_at":"2015-09-09T07:33:41Z","closed_at":"2015-09-09T01:05:56Z","body":"Current documentation is here: https://github.com/policycompass/policycompass/wiki/Auth-Service\r\n\r\nThis should be extended by:\r\n\r\n- What *excactly* do the backend services need to call and check for in order to find out whether a token is valid and to which role a user belongs?\r\n- What does the frontend need to do in order to check whether a user is logged in or is admin? (Will be used by #121)\r\n- How to add users to a certain role (in particular `admin`)?\r\n"},"comment":{"url":"https://api.github.com/repos/policycompass/policycompass/issues/comments/138812657","html_url":"https://github.com/policycompass/policycompass/issues/91#issuecomment-138812657","issue_url":"https://api.github.com/repos/policycompass/policycompass/issues/91","id":138812657,"user":{"login":"mmilaprat","id":6602727,"avatar_url":"https://avatars.githubusercontent.com/u/6602727?v=3","gravatar_id":"","url":"https://api.github.com/users/mmilaprat","html_url":"https://github.com/mmilaprat","followers_url":"https://api.github.com/users/mmilaprat/followers","following_url":"https://api.github.com/users/mmilaprat/following{/other_user}","gists_url":"https://api.github.com/users/mmilaprat/gists{/gist_id}","starred_url":"https://api.github.com/users/mmilaprat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmilaprat/subscriptions","organizations_url":"https://api.github.com/users/mmilaprat/orgs","repos_url":"https://api.github.com/users/mmilaprat/repos","events_url":"https://api.github.com/users/mmilaprat/events{/privacy}","received_events_url":"https://api.github.com/users/mmilaprat/received_events","type":"User","site_admin":false},"created_at":"2015-09-09T07:33:41Z","updated_at":"2015-09-09T07:33:41Z","body":"About the front end. I checked the content of the header.html to know how to recover the user data and I have a question.\r\n\r\nI see that in the header.html we use the controller \"UserState\", but it is just used in the tag header. If we need to get the user information to show/hide any button (like edit/delete) we need to add this contoller in our \"container\"? the controller \"UserData\" can be placed in another place? the \"body\"? Then we can use the \"authState\" variable to the entire page.\r\n\r\nor probably I didn't understand correctly how to use the authorization in the front end."}}