{"action":"created","comment":{"url":"https://api.github.com/repos/ably/ably-js/pulls/comments/59782412","id":59782412,"diff_hunk":"@@ -97,7 +108,33 @@ var Auth = (function() {\n \t\t\tLogger.logAction(Logger.LOG_ERROR, 'Auth()', msg);\n \t\t\tthrow new Error(msg);\n \t\t}\n-\t}\n+\t};\n+\n+\t/**\n+\t * Update the authentication options for this client;\n+\t * this will also update these options on the realtime connection\n+\t * so that they take effect immediately\n+\t * @param options\n+\t */\n+\tAuth.prototype.setOptions = function(options) {","path":"common/lib/client/auth.js","position":61,"original_position":61,"commit_id":"2b295d3a45921cf7916666fec74d05b6f5868c49","original_commit_id":"2b295d3a45921cf7916666fec74d05b6f5868c49","user":{"login":"paddybyers","id":1137574,"avatar_url":"https://avatars.githubusercontent.com/u/1137574?v=3","gravatar_id":"","url":"https://api.github.com/users/paddybyers","html_url":"https://github.com/paddybyers","followers_url":"https://api.github.com/users/paddybyers/followers","following_url":"https://api.github.com/users/paddybyers/following{/other_user}","gists_url":"https://api.github.com/users/paddybyers/gists{/gist_id}","starred_url":"https://api.github.com/users/paddybyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paddybyers/subscriptions","organizations_url":"https://api.github.com/users/paddybyers/orgs","repos_url":"https://api.github.com/users/paddybyers/repos","events_url":"https://api.github.com/users/paddybyers/events{/privacy}","received_events_url":"https://api.github.com/users/paddybyers/received_events","type":"User","site_admin":false},"body":"`authorise()` just forces the generation of a new token using current options.\r\n\r\n`setOptions` sets the options on which `authorise()` acts. What if you are setting a token explicitly in `options` ? What if you change the token capabilities by specifying different params in the `authURL` ? You can't change either of those things just by calling `authorise()`.","created_at":"2016-04-14T20:08:41Z","updated_at":"2016-04-14T20:08:41Z","html_url":"https://github.com/ably/ably-js/pull/260#discussion_r59782412","pull_request_url":"https://api.github.com/repos/ably/ably-js/pulls/260","_links":{"self":{"href":"https://api.github.com/repos/ably/ably-js/pulls/comments/59782412"},"html":{"href":"https://github.com/ably/ably-js/pull/260#discussion_r59782412"},"pull_request":{"href":"https://api.github.com/repos/ably/ably-js/pulls/260"}}},"pull_request":{"url":"https://api.github.com/repos/ably/ably-js/pulls/260","id":66296772,"html_url":"https://github.com/ably/ably-js/pull/260","diff_url":"https://github.com/ably/ably-js/pull/260.diff","patch_url":"https://github.com/ably/ably-js/pull/260.patch","issue_url":"https://api.github.com/repos/ably/ably-js/issues/260","number":260,"state":"open","locked":false,"title":"First proposal for auth.setOptions()","user":{"login":"paddybyers","id":1137574,"avatar_url":"https://avatars.githubusercontent.com/u/1137574?v=3","gravatar_id":"","url":"https://api.github.com/users/paddybyers","html_url":"https://github.com/paddybyers","followers_url":"https://api.github.com/users/paddybyers/followers","following_url":"https://api.github.com/users/paddybyers/following{/other_user}","gists_url":"https://api.github.com/users/paddybyers/gists{/gist_id}","starred_url":"https://api.github.com/users/paddybyers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paddybyers/subscriptions","organizations_url":"https://api.github.com/users/paddybyers/orgs","repos_url":"https://api.github.com/users/paddybyers/repos","events_url":"https://api.github.com/users/paddybyers/events{/privacy}","received_events_url":"https://api.github.com/users/paddybyers/received_events","type":"User","site_admin":false},"body":"@SimonWoolf this is my suggestion for enabling \"transparent\" reauth, prior to having the ability to do this within an active transport.\r\n\r\nIt's not tested.\r\n\r\nCan you have a look?","created_at":"2016-04-13T10:15:40Z","updated_at":"2016-04-14T20:08:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"869cbc9f90f14e9df29bfbf7242d3bd1dc91326c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ably/ably-js/pulls/260/commits","review_comments_url":"https://api.github.com/repos/ably/ably-js/pulls/260/comments","review_comment_url":"https://api.github.com/repos/ably/ably-js/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ably/ably-js/issues/260/comments","statuses_url":"https://api.github.com/repos/ably/ably-js/statuses/2b295d3a45921cf7916666fec74d05b6f5868c49","head":{"label":"ably:reauth","ref":"reauth","sha":"2b295d3a45921cf7916666fec74d05b6f5868c49","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":6676523,"name":"ably-js","full_name":"ably/ably-js","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/ably-js","description":"Ably Realtime Messaging Javascript library to connect from your browser or Node.js","fork":false,"url":"https://api.github.com/repos/ably/ably-js","forks_url":"https://api.github.com/repos/ably/ably-js/forks","keys_url":"https://api.github.com/repos/ably/ably-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/ably-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/ably-js/teams","hooks_url":"https://api.github.com/repos/ably/ably-js/hooks","issue_events_url":"https://api.github.com/repos/ably/ably-js/issues/events{/number}","events_url":"https://api.github.com/repos/ably/ably-js/events","assignees_url":"https://api.github.com/repos/ably/ably-js/assignees{/user}","branches_url":"https://api.github.com/repos/ably/ably-js/branches{/branch}","tags_url":"https://api.github.com/repos/ably/ably-js/tags","blobs_url":"https://api.github.com/repos/ably/ably-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/ably-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/ably-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/ably-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/ably-js/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/ably-js/languages","stargazers_url":"https://api.github.com/repos/ably/ably-js/stargazers","contributors_url":"https://api.github.com/repos/ably/ably-js/contributors","subscribers_url":"https://api.github.com/repos/ably/ably-js/subscribers","subscription_url":"https://api.github.com/repos/ably/ably-js/subscription","commits_url":"https://api.github.com/repos/ably/ably-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/ably-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/ably-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/ably-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/ably-js/contents/{+path}","compare_url":"https://api.github.com/repos/ably/ably-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/ably-js/merges","archive_url":"https://api.github.com/repos/ably/ably-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/ably-js/downloads","issues_url":"https://api.github.com/repos/ably/ably-js/issues{/number}","pulls_url":"https://api.github.com/repos/ably/ably-js/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/ably-js/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/ably-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/ably-js/labels{/name}","releases_url":"https://api.github.com/repos/ably/ably-js/releases{/id}","deployments_url":"https://api.github.com/repos/ably/ably-js/deployments","created_at":"2012-11-13T19:41:13Z","updated_at":"2016-04-13T20:07:34Z","pushed_at":"2016-04-13T10:15:40Z","git_url":"git://github.com/ably/ably-js.git","ssh_url":"git@github.com:ably/ably-js.git","clone_url":"https://github.com/ably/ably-js.git","svn_url":"https://github.com/ably/ably-js","homepage":null,"size":12734,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":41,"forks":4,"open_issues":41,"watchers":6,"default_branch":"master"}},"base":{"label":"ably:master","ref":"master","sha":"e6319f9dc8d5ea802cdbfb6b24b09175231f7300","user":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"repo":{"id":6676523,"name":"ably-js","full_name":"ably/ably-js","owner":{"login":"ably","id":1859245,"avatar_url":"https://avatars.githubusercontent.com/u/1859245?v=3","gravatar_id":"","url":"https://api.github.com/users/ably","html_url":"https://github.com/ably","followers_url":"https://api.github.com/users/ably/followers","following_url":"https://api.github.com/users/ably/following{/other_user}","gists_url":"https://api.github.com/users/ably/gists{/gist_id}","starred_url":"https://api.github.com/users/ably/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ably/subscriptions","organizations_url":"https://api.github.com/users/ably/orgs","repos_url":"https://api.github.com/users/ably/repos","events_url":"https://api.github.com/users/ably/events{/privacy}","received_events_url":"https://api.github.com/users/ably/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ably/ably-js","description":"Ably Realtime Messaging Javascript library to connect from your browser or Node.js","fork":false,"url":"https://api.github.com/repos/ably/ably-js","forks_url":"https://api.github.com/repos/ably/ably-js/forks","keys_url":"https://api.github.com/repos/ably/ably-js/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/ably-js/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/ably-js/teams","hooks_url":"https://api.github.com/repos/ably/ably-js/hooks","issue_events_url":"https://api.github.com/repos/ably/ably-js/issues/events{/number}","events_url":"https://api.github.com/repos/ably/ably-js/events","assignees_url":"https://api.github.com/repos/ably/ably-js/assignees{/user}","branches_url":"https://api.github.com/repos/ably/ably-js/branches{/branch}","tags_url":"https://api.github.com/repos/ably/ably-js/tags","blobs_url":"https://api.github.com/repos/ably/ably-js/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/ably-js/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/ably-js/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/ably-js/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/ably-js/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/ably-js/languages","stargazers_url":"https://api.github.com/repos/ably/ably-js/stargazers","contributors_url":"https://api.github.com/repos/ably/ably-js/contributors","subscribers_url":"https://api.github.com/repos/ably/ably-js/subscribers","subscription_url":"https://api.github.com/repos/ably/ably-js/subscription","commits_url":"https://api.github.com/repos/ably/ably-js/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/ably-js/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/ably-js/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/ably-js/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/ably-js/contents/{+path}","compare_url":"https://api.github.com/repos/ably/ably-js/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/ably-js/merges","archive_url":"https://api.github.com/repos/ably/ably-js/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/ably-js/downloads","issues_url":"https://api.github.com/repos/ably/ably-js/issues{/number}","pulls_url":"https://api.github.com/repos/ably/ably-js/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/ably-js/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/ably-js/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/ably-js/labels{/name}","releases_url":"https://api.github.com/repos/ably/ably-js/releases{/id}","deployments_url":"https://api.github.com/repos/ably/ably-js/deployments","created_at":"2012-11-13T19:41:13Z","updated_at":"2016-04-13T20:07:34Z","pushed_at":"2016-04-13T10:15:40Z","git_url":"git://github.com/ably/ably-js.git","ssh_url":"git@github.com:ably/ably-js.git","clone_url":"https://github.com/ably/ably-js.git","svn_url":"https://github.com/ably/ably-js","homepage":null,"size":12734,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":41,"forks":4,"open_issues":41,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ably/ably-js/pulls/260"},"html":{"href":"https://github.com/ably/ably-js/pull/260"},"issue":{"href":"https://api.github.com/repos/ably/ably-js/issues/260"},"comments":{"href":"https://api.github.com/repos/ably/ably-js/issues/260/comments"},"review_comments":{"href":"https://api.github.com/repos/ably/ably-js/pulls/260/comments"},"review_comment":{"href":"https://api.github.com/repos/ably/ably-js/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ably/ably-js/pulls/260/commits"},"statuses":{"href":"https://api.github.com/repos/ably/ably-js/statuses/2b295d3a45921cf7916666fec74d05b6f5868c49"}}}}