{"action":"created","comment":{"url":"https://api.github.com/repos/ably/docs/pulls/comments/37175068","id":37175068,"diff_hunk":"@@ -129,6 +142,16 @@ h3(#rest-channel). Channel\n ** @(RSL1c)@ When an array of @Message@ objects is provided, a single request is made to Ably. When publishing multiple messages, this approach is more efficient. However, a yet to be implemented feature should limit the total number of messages bundled in a single POST based on the default max request size, and would raise an exception if any single message exceeds that limit.\n ** @(RSL1d)@ Indicates an error if the message was not successfully published to Ably\n ** @(RSL1e)@ Allows @name@ and or @data@ to be @null@.  If any of the values are null, then key is not sent to Ably i.e. a payload with a @null@ value for @data@ would be sent as follows @{ \"name\": \"click\" }@\n+** @(RSL1f)@ Unauthenticated clients without a @clientId@ (any @clientId@ is permitted):\n+*** @(RSL1f1)@ When a @Message@ with a @clientId@ value is published, Ably will accept and publish that message with the provided @clientId@. A test should assert via the history API that the @clientId@ of the published @Message@ is correct for both authentication schemes (token and basic)\n+** @(RSL1g)@ Authenticated clients with a @clientId@ (as a result of either an explicitly configured @clientId@ in @ClientOptions@, or implicitly through token auth):\n+*** @(RSL1g1)@ When publishing a @Message@ with the @clientId@ attribute set to @null@:\n+**** @(RSL1g1a)@ It is unnecessary for the client to set the @clientId@ of the @Message@ before publishing\n+**** @(RSL1g1b)@ Ably is expected to automatically assign a @clientId@ upon receiving the @Message@. A test should assert via the history API that the @clientId@ value is populated for the @Message@ when received\n+*** @(RSL1g2)@ When publishing a @Message@ with the @clientId@ attribute value set to the authenticated client's @clientId@, Ably will accept the message and publish it. A test should assert that the @clientId@ value is populated for the @Message@ when received\n+*** @(RSL1g3)@ When publishing a @Message@ with a different @clientId@ attribute value to the authenticated @clientId@, the client library should reject publishing immediately. The message should not be sent to Ably and an exception should be raised. The connection and channel remains available for further operations\n+*** @(RSL1g4)@ When using token auth with a literal token, an auth URL or an auth callback, until authentication has completed, the client library will not be constrained to a @clientId@. However, as authentication always occurs before the message is published in a synchronous REST library, an exception should be raised if publishing a message with an incompatible @clientId@ to the @clientId@ that is set following authentication. The connection and channel remains available for further operations","path":"content/client-lib-development-guide/features.textile","position":64,"original_position":64,"commit_id":"4e8021f9f4c0b6bccbdae5626450a8e38f1e7d19","original_commit_id":"4e8021f9f4c0b6bccbdae5626450a8e38f1e7d19","user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"body":"No, I meant the library. If you are using Token Auth because and have provided a `authCallback`, and are using the Realtime library, the Ably client library will let you publish a message with an incompatible `clientId` because at the time of publish there is no way for the client library to know what the clientId should be.  However, in the case of the REST client library, when publishing a message, it needs to call the `authCallback` and then execute the POST HTTP request to Ably.  However, before it even issues the POST request, it will know from the `TokenDetails` object that was returned from the `authCallback` that the `clientId` is incompatible, and can thus raise an exception without having tried to send it.","created_at":"2015-08-17T10:30:47Z","updated_at":"2015-08-17T10:30:47Z","html_url":"https://github.com/ably/docs/pull/33#discussion_r37175068","pull_request_url":"https://api.github.com/repos/ably/docs/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/ably/docs/pulls/comments/37175068"},"html":{"href":"https://github.com/ably/docs/pull/33#discussion_r37175068"},"pull_request":{"href":"https://api.github.com/repos/ably/docs/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/ably/docs/pulls/33","id":42240539,"html_url":"https://github.com/ably/docs/pull/33","diff_url":"https://github.com/ably/docs/pull/33.diff","patch_url":"https://github.com/ably/docs/pull/33.patch","issue_url":"https://api.github.com/repos/ably/docs/issues/33","number":33,"state":"open","locked":false,"title":"Update spec to include requirements for authenticated clients","user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"body":"Addresses https://github.com/ably/realtime/issues/131, https://github.com/ably/realtime/issues/245 and https://github.com/ably/realtime/issues/246\r\n\r\n@paddybyers can you review, I believe this covers off what we discussed in https://github.com/ably/realtime/issues/131","created_at":"2015-08-12T13:40:58Z","updated_at":"2015-08-17T10:30:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9812a3b6b9edb26a0066d1cb85301d83548bb1f6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ably/docs/pulls/33/commits","review_comments_url":"https://api.github.com/repos/ably/docs/pulls/33/comments","review_comment_url":"https://api.github.com/repos/ably/docs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ably/docs/issues/33/comments","statuses_url":"https://api.github.com/repos/ably/docs/statuses/4e8021f9f4c0b6bccbdae5626450a8e38f1e7d19","head":{"label":"ably:client-id-spec-improvement","ref":"client-id-spec-improvement","sha":"4e8021f9f4c0b6bccbdae5626450a8e38f1e7d19","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":7221949,"name":"docs","full_name":"ably/docs","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/docs","description":"Ably API documentation ","fork":false,"url":"https://api.github.com/repos/ably/docs","forks_url":"https://api.github.com/repos/ably/docs/forks","keys_url":"https://api.github.com/repos/ably/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/docs/teams","hooks_url":"https://api.github.com/repos/ably/docs/hooks","issue_events_url":"https://api.github.com/repos/ably/docs/issues/events{/number}","events_url":"https://api.github.com/repos/ably/docs/events","assignees_url":"https://api.github.com/repos/ably/docs/assignees{/user}","branches_url":"https://api.github.com/repos/ably/docs/branches{/branch}","tags_url":"https://api.github.com/repos/ably/docs/tags","blobs_url":"https://api.github.com/repos/ably/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/docs/languages","stargazers_url":"https://api.github.com/repos/ably/docs/stargazers","contributors_url":"https://api.github.com/repos/ably/docs/contributors","subscribers_url":"https://api.github.com/repos/ably/docs/subscribers","subscription_url":"https://api.github.com/repos/ably/docs/subscription","commits_url":"https://api.github.com/repos/ably/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/docs/contents/{+path}","compare_url":"https://api.github.com/repos/ably/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/docs/merges","archive_url":"https://api.github.com/repos/ably/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/docs/downloads","issues_url":"https://api.github.com/repos/ably/docs/issues{/number}","pulls_url":"https://api.github.com/repos/ably/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/docs/labels{/name}","releases_url":"https://api.github.com/repos/ably/docs/releases{/id}","created_at":"2012-12-18T10:59:49Z","updated_at":"2015-06-12T08:56:48Z","pushed_at":"2015-08-17T09:15:12Z","git_url":"git://github.com/ably/docs.git","ssh_url":"git@github.com:ably/docs.git","clone_url":"https://github.com/ably/docs.git","svn_url":"https://github.com/ably/docs","homepage":null,"size":1706,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":23,"forks":4,"open_issues":23,"watchers":1,"default_branch":"source"}},"base":{"label":"ably:source","ref":"source","sha":"f0c60a1c16023c46c8afdc537bd7e76022751ebc","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":7221949,"name":"docs","full_name":"ably/docs","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/docs","description":"Ably API documentation ","fork":false,"url":"https://api.github.com/repos/ably/docs","forks_url":"https://api.github.com/repos/ably/docs/forks","keys_url":"https://api.github.com/repos/ably/docs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ably/docs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ably/docs/teams","hooks_url":"https://api.github.com/repos/ably/docs/hooks","issue_events_url":"https://api.github.com/repos/ably/docs/issues/events{/number}","events_url":"https://api.github.com/repos/ably/docs/events","assignees_url":"https://api.github.com/repos/ably/docs/assignees{/user}","branches_url":"https://api.github.com/repos/ably/docs/branches{/branch}","tags_url":"https://api.github.com/repos/ably/docs/tags","blobs_url":"https://api.github.com/repos/ably/docs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ably/docs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ably/docs/git/refs{/sha}","trees_url":"https://api.github.com/repos/ably/docs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ably/docs/statuses/{sha}","languages_url":"https://api.github.com/repos/ably/docs/languages","stargazers_url":"https://api.github.com/repos/ably/docs/stargazers","contributors_url":"https://api.github.com/repos/ably/docs/contributors","subscribers_url":"https://api.github.com/repos/ably/docs/subscribers","subscription_url":"https://api.github.com/repos/ably/docs/subscription","commits_url":"https://api.github.com/repos/ably/docs/commits{/sha}","git_commits_url":"https://api.github.com/repos/ably/docs/git/commits{/sha}","comments_url":"https://api.github.com/repos/ably/docs/comments{/number}","issue_comment_url":"https://api.github.com/repos/ably/docs/issues/comments{/number}","contents_url":"https://api.github.com/repos/ably/docs/contents/{+path}","compare_url":"https://api.github.com/repos/ably/docs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ably/docs/merges","archive_url":"https://api.github.com/repos/ably/docs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ably/docs/downloads","issues_url":"https://api.github.com/repos/ably/docs/issues{/number}","pulls_url":"https://api.github.com/repos/ably/docs/pulls{/number}","milestones_url":"https://api.github.com/repos/ably/docs/milestones{/number}","notifications_url":"https://api.github.com/repos/ably/docs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ably/docs/labels{/name}","releases_url":"https://api.github.com/repos/ably/docs/releases{/id}","created_at":"2012-12-18T10:59:49Z","updated_at":"2015-06-12T08:56:48Z","pushed_at":"2015-08-17T09:15:12Z","git_url":"git://github.com/ably/docs.git","ssh_url":"git@github.com:ably/docs.git","clone_url":"https://github.com/ably/docs.git","svn_url":"https://github.com/ably/docs","homepage":null,"size":1706,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":23,"forks":4,"open_issues":23,"watchers":1,"default_branch":"source"}},"_links":{"self":{"href":"https://api.github.com/repos/ably/docs/pulls/33"},"html":{"href":"https://github.com/ably/docs/pull/33"},"issue":{"href":"https://api.github.com/repos/ably/docs/issues/33"},"comments":{"href":"https://api.github.com/repos/ably/docs/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/ably/docs/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/ably/docs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ably/docs/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/ably/docs/statuses/4e8021f9f4c0b6bccbdae5626450a8e38f1e7d19"}}}}