{"action":"created","issue":{"url":"https://api.github.com/repos/sahat/satellizer/issues/262","labels_url":"https://api.github.com/repos/sahat/satellizer/issues/262/labels{/name}","comments_url":"https://api.github.com/repos/sahat/satellizer/issues/262/comments","events_url":"https://api.github.com/repos/sahat/satellizer/issues/262/events","html_url":"https://github.com/sahat/satellizer/pull/262","id":55655916,"number":262,"title":"Support token in a nested object","user":{"login":"artmees","id":347712,"avatar_url":"https://avatars.githubusercontent.com/u/347712?v=3","gravatar_id":"","url":"https://api.github.com/users/artmees","html_url":"https://github.com/artmees","followers_url":"https://api.github.com/users/artmees/followers","following_url":"https://api.github.com/users/artmees/following{/other_user}","gists_url":"https://api.github.com/users/artmees/gists{/gist_id}","starred_url":"https://api.github.com/users/artmees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artmees/subscriptions","organizations_url":"https://api.github.com/users/artmees/orgs","repos_url":"https://api.github.com/users/artmees/repos","events_url":"https://api.github.com/users/artmees/events{/privacy}","received_events_url":"https://api.github.com/users/artmees/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-27T18:31:44Z","updated_at":"2015-01-27T20:07:05Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sahat/satellizer/pulls/262","html_url":"https://github.com/sahat/satellizer/pull/262","diff_url":"https://github.com/sahat/satellizer/pull/262.diff","patch_url":"https://github.com/sahat/satellizer/pull/262.patch"},"body":"Support setting the `token` in a nested object like in the following example\r\n\r\n```json\r\n{\r\n  \"users\": {\r\n    \"id\":\"54c7b08f4162646d3c190000\",\r\n    \"token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...\",\r\n    \"type\":\"users\",\r\n    \"links\":{\r\n       \"posts\": [ \"some\", \"post\", \"objects\", \"....\" ]\r\n    }\r\n  }\r\n}\r\n```\r\n\r\nadding the following configuration to the `$authProvider` will make it work.\r\n```js\r\n$authProvider.rootElement = 'users'\r\n```"},"comment":{"url":"https://api.github.com/repos/sahat/satellizer/issues/comments/71718191","html_url":"https://github.com/sahat/satellizer/pull/262#issuecomment-71718191","issue_url":"https://api.github.com/repos/sahat/satellizer/issues/262","id":71718191,"user":{"login":"artmees","id":347712,"avatar_url":"https://avatars.githubusercontent.com/u/347712?v=3","gravatar_id":"","url":"https://api.github.com/users/artmees","html_url":"https://github.com/artmees","followers_url":"https://api.github.com/users/artmees/followers","following_url":"https://api.github.com/users/artmees/following{/other_user}","gists_url":"https://api.github.com/users/artmees/gists{/gist_id}","starred_url":"https://api.github.com/users/artmees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/artmees/subscriptions","organizations_url":"https://api.github.com/users/artmees/orgs","repos_url":"https://api.github.com/users/artmees/repos","events_url":"https://api.github.com/users/artmees/events{/privacy}","received_events_url":"https://api.github.com/users/artmees/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T20:07:05Z","updated_at":"2015-01-27T20:07:05Z","body":"yeah `tokenRoot` sounds better :+1: ... will rename it and after reviewing the PR and before merge, I can squash all the commits into 1 commit if you want :smile: "}}