{"action":"created","issue":{"url":"https://api.github.com/repos/ably/ably-js/issues/224","repository_url":"https://api.github.com/repos/ably/ably-js","labels_url":"https://api.github.com/repos/ably/ably-js/issues/224/labels{/name}","comments_url":"https://api.github.com/repos/ably/ably-js/issues/224/comments","events_url":"https://api.github.com/repos/ably/ably-js/issues/224/events","html_url":"https://github.com/ably/ably-js/pull/224","id":129823981,"number":224,"title":"RSC18 client options tls","user":{"login":"alex-georgiou","id":2937881,"avatar_url":"https://avatars.githubusercontent.com/u/2937881?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-georgiou","html_url":"https://github.com/alex-georgiou","followers_url":"https://api.github.com/users/alex-georgiou/followers","following_url":"https://api.github.com/users/alex-georgiou/following{/other_user}","gists_url":"https://api.github.com/users/alex-georgiou/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-georgiou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-georgiou/subscriptions","organizations_url":"https://api.github.com/users/alex-georgiou/orgs","repos_url":"https://api.github.com/users/alex-georgiou/repos","events_url":"https://api.github.com/users/alex-georgiou/events{/privacy}","received_events_url":"https://api.github.com/users/alex-georgiou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2016-01-29T16:59:51Z","updated_at":"2016-02-08T13:27:46Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ably/ably-js/pulls/224","html_url":"https://github.com/ably/ably-js/pull/224","diff_url":"https://github.com/ably/ably-js/pull/224.diff","patch_url":"https://github.com/ably/ably-js/pull/224.patch"},"body":"This is my attempt at RSC18.\r\n\r\nFirst I verified that the requirement for not sending a secret key over HTTP was NOT implemented. I used the stats request for this.\r\n\r\nThen I modified the `Auth` object so that the error is generated exactly at the two functions where the key is added to the headers. This should ensure that all requests using the basic authentication headers will check for TLS.\r\n\r\nNotes:\r\n1. I have put in some other TLS-related tests in, perhaps some overlap with other tests in `/spec/rest/defaults.test.js`. Please review and let me know if it's overkill.\r\n2. I am returning an `ErrorInfo`. I see we do not have any mechanism that will pull error message strings from `errors.json` so I repeated the strings in the code.\r\n3. I am printing the error to the logger as it occurs, even though it is also printed when sent higher up to `PaginatedResource.get()`. I don't know how verbose we want our error reporting to be, but in theory the `Auth` functions could be called elsewhere, hence I'm printing out the error as it occurs for safety."},"comment":{"url":"https://api.github.com/repos/ably/ably-js/issues/comments/181365986","html_url":"https://github.com/ably/ably-js/pull/224#issuecomment-181365986","issue_url":"https://api.github.com/repos/ably/ably-js/issues/224","id":181365986,"user":{"login":"alex-georgiou","id":2937881,"avatar_url":"https://avatars.githubusercontent.com/u/2937881?v=3","gravatar_id":"","url":"https://api.github.com/users/alex-georgiou","html_url":"https://github.com/alex-georgiou","followers_url":"https://api.github.com/users/alex-georgiou/followers","following_url":"https://api.github.com/users/alex-georgiou/following{/other_user}","gists_url":"https://api.github.com/users/alex-georgiou/gists{/gist_id}","starred_url":"https://api.github.com/users/alex-georgiou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alex-georgiou/subscriptions","organizations_url":"https://api.github.com/users/alex-georgiou/orgs","repos_url":"https://api.github.com/users/alex-georgiou/repos","events_url":"https://api.github.com/users/alex-georgiou/events{/privacy}","received_events_url":"https://api.github.com/users/alex-georgiou/received_events","type":"User","site_admin":false},"created_at":"2016-02-08T13:27:46Z","updated_at":"2016-02-08T13:27:46Z","body":"OK this is the first time I had to do this, perhaps it should be added to the instructions."}}