{"action":"created","comment":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/221939353","pull_request_review_id":160706079,"id":221939353,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTkzOTM1Mw==","diff_hunk":"@@ -107,22 +127,39 @@ generate_user(C, User, TemplateValuesIn) ->\n     Cmd2 = [SignCmd, \"--req\", UserCsr, \"--out\", UserCert],\n     LogFile = filename:join(?config(priv_dir, C), User ++ \"signing.log\"),\n     {done, 0, _} = erlsh:run(Cmd2, LogFile, SSLDir),\n+    #{key => UserKey,\n+      cert => UserCert}.\n+\n+\n+generate_user_tcp(C, User) ->\n+    generate_user(C, User, escalus_tcp).\n+\n+generate_user(C, User, Transport) ->\n+    Certs = ?config(certs, C),\n+    UserCert = maps:get(User, Certs),\n+\n+    Common = [{username, list_to_binary(User)},\n+\t      {server, <<\"localhost\">>},\n+\t      {password, <<\"break_me\">>},\n+\t      {resource, <<>>}, %% Allow the server to generate the resource\n+\t      {auth, {escalus_auth, auth_sasl_external}},\n+\t      {transport, Transport},\n+\t      {ssl_opts, [{certfile, maps:get(cert, UserCert)},\n+\t\t\t  {keyfile, maps:get(key, UserCert)}]}],\n+    Common ++ transport_specific_options(Transport).\n \n-    [{username, list_to_binary(User)},\n-     {server, <<\"localhost\">>},\n-     {password, <<\"break_me\">>},\n-     {resource, <<>>}, %% Allow the server to generate the resource\n-     {auth, {escalus_auth, auth_sasl_external}},\n-     {ssl_opts, [{certfile, UserCert},\n-\t\t {keyfile, UserKey}]},\n-     {starttls, required}].\n+transport_specific_options(escalus_tcp) ->\n+    [{starttls, required}];\n+transport_specific_options(_) ->\n+     [{port, 5285},","path":"big_tests/tests/sasl_external_SUITE.erl","position":123,"original_position":123,"commit_id":"64f34cad98517f6d377140c33d0d1ea9be57dc23","original_commit_id":"64f34cad98517f6d377140c33d0d1ea9be57dc23","user":{"login":"aleklisi","id":16130626,"node_id":"MDQ6VXNlcjE2MTMwNjI2","avatar_url":"https://avatars2.githubusercontent.com/u/16130626?v=4","gravatar_id":"","url":"https://api.github.com/users/aleklisi","html_url":"https://github.com/aleklisi","followers_url":"https://api.github.com/users/aleklisi/followers","following_url":"https://api.github.com/users/aleklisi/following{/other_user}","gists_url":"https://api.github.com/users/aleklisi/gists{/gist_id}","starred_url":"https://api.github.com/users/aleklisi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleklisi/subscriptions","organizations_url":"https://api.github.com/users/aleklisi/orgs","repos_url":"https://api.github.com/users/aleklisi/repos","events_url":"https://api.github.com/users/aleklisi/events{/privacy}","received_events_url":"https://api.github.com/users/aleklisi/received_events","type":"User","site_admin":false},"body":"Is there a way not to \"hard code\" port number?","created_at":"2018-10-02T12:58:15Z","updated_at":"2018-10-02T12:58:16Z","html_url":"https://github.com/esl/MongooseIM/pull/2093#discussion_r221939353","pull_request_url":"https://api.github.com/repos/esl/MongooseIM/pulls/2093","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments/221939353"},"html":{"href":"https://github.com/esl/MongooseIM/pull/2093#discussion_r221939353"},"pull_request":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/2093"}}},"pull_request":{"url":"https://api.github.com/repos/esl/MongooseIM/pulls/2093","id":219675838,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE5Njc1ODM4","html_url":"https://github.com/esl/MongooseIM/pull/2093","diff_url":"https://github.com/esl/MongooseIM/pull/2093.diff","patch_url":"https://github.com/esl/MongooseIM/pull/2093.patch","issue_url":"https://api.github.com/repos/esl/MongooseIM/issues/2093","number":2093,"state":"open","locked":false,"title":"SASL EXTERNAL for websockets","user":{"login":"michalwski","id":705828,"node_id":"MDQ6VXNlcjcwNTgyOA==","avatar_url":"https://avatars3.githubusercontent.com/u/705828?v=4","gravatar_id":"","url":"https://api.github.com/users/michalwski","html_url":"https://github.com/michalwski","followers_url":"https://api.github.com/users/michalwski/followers","following_url":"https://api.github.com/users/michalwski/following{/other_user}","gists_url":"https://api.github.com/users/michalwski/gists{/gist_id}","starred_url":"https://api.github.com/users/michalwski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michalwski/subscriptions","organizations_url":"https://api.github.com/users/michalwski/orgs","repos_url":"https://api.github.com/users/michalwski/repos","events_url":"https://api.github.com/users/michalwski/events{/privacy}","received_events_url":"https://api.github.com/users/michalwski/received_events","type":"User","site_admin":false},"body":"Proposed changes include:\r\n* Modified `mongoose_transport` to allow getting peer cert from WebSockets and BOSH\r\n* Modified tests so that SASL external is tested with WebSockets and BOSH\r\n\r\n- [x]  update doc\r\n\r\n","created_at":"2018-10-02T11:51:30Z","updated_at":"2018-10-02T12:58:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b26eabc8f4b6cc1ca613f39c9d0cba1264f54e1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":275953800,"node_id":"MDU6TGFiZWwyNzU5NTM4MDA=","url":"https://api.github.com/repos/esl/MongooseIM/labels/waiting-for-review","name":"waiting-for-review","color":"edd96d","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/esl/MongooseIM/pulls/2093/commits","review_comments_url":"https://api.github.com/repos/esl/MongooseIM/pulls/2093/comments","review_comment_url":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/esl/MongooseIM/issues/2093/comments","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/64f34cad98517f6d377140c33d0d1ea9be57dc23","head":{"label":"esl:sasl-external-for-websockets","ref":"sasl-external-for-websockets","sha":"64f34cad98517f6d377140c33d0d1ea9be57dc23","user":{"login":"esl","id":283412,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MzQxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/283412?v=4","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"node_id":"MDEwOlJlcG9zaXRvcnkyMzU0MjQw","name":"MongooseIM","full_name":"esl/MongooseIM","private":false,"owner":{"login":"esl","id":283412,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MzQxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/283412?v=4","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/esl/MongooseIM","description":"MongooseIM is a mobile messaging platform with focus on performance and scalability","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2018-10-02T12:17:12Z","pushed_at":"2018-10-02T12:35:16Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"","size":33438,"stargazers_count":1019,"watchers_count":1019,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":323,"mirror_url":null,"archived":false,"open_issues_count":130,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":323,"open_issues":130,"watchers":1019,"default_branch":"master"}},"base":{"label":"esl:master","ref":"master","sha":"5eec4c6a5526f8b97ef39f0c2049a3c5500bf237","user":{"login":"esl","id":283412,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MzQxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/283412?v=4","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"repo":{"id":2354240,"node_id":"MDEwOlJlcG9zaXRvcnkyMzU0MjQw","name":"MongooseIM","full_name":"esl/MongooseIM","private":false,"owner":{"login":"esl","id":283412,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI4MzQxMg==","avatar_url":"https://avatars3.githubusercontent.com/u/283412?v=4","gravatar_id":"","url":"https://api.github.com/users/esl","html_url":"https://github.com/esl","followers_url":"https://api.github.com/users/esl/followers","following_url":"https://api.github.com/users/esl/following{/other_user}","gists_url":"https://api.github.com/users/esl/gists{/gist_id}","starred_url":"https://api.github.com/users/esl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/esl/subscriptions","organizations_url":"https://api.github.com/users/esl/orgs","repos_url":"https://api.github.com/users/esl/repos","events_url":"https://api.github.com/users/esl/events{/privacy}","received_events_url":"https://api.github.com/users/esl/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/esl/MongooseIM","description":"MongooseIM is a mobile messaging platform with focus on performance and scalability","fork":false,"url":"https://api.github.com/repos/esl/MongooseIM","forks_url":"https://api.github.com/repos/esl/MongooseIM/forks","keys_url":"https://api.github.com/repos/esl/MongooseIM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/esl/MongooseIM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/esl/MongooseIM/teams","hooks_url":"https://api.github.com/repos/esl/MongooseIM/hooks","issue_events_url":"https://api.github.com/repos/esl/MongooseIM/issues/events{/number}","events_url":"https://api.github.com/repos/esl/MongooseIM/events","assignees_url":"https://api.github.com/repos/esl/MongooseIM/assignees{/user}","branches_url":"https://api.github.com/repos/esl/MongooseIM/branches{/branch}","tags_url":"https://api.github.com/repos/esl/MongooseIM/tags","blobs_url":"https://api.github.com/repos/esl/MongooseIM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/esl/MongooseIM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/esl/MongooseIM/git/refs{/sha}","trees_url":"https://api.github.com/repos/esl/MongooseIM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/esl/MongooseIM/statuses/{sha}","languages_url":"https://api.github.com/repos/esl/MongooseIM/languages","stargazers_url":"https://api.github.com/repos/esl/MongooseIM/stargazers","contributors_url":"https://api.github.com/repos/esl/MongooseIM/contributors","subscribers_url":"https://api.github.com/repos/esl/MongooseIM/subscribers","subscription_url":"https://api.github.com/repos/esl/MongooseIM/subscription","commits_url":"https://api.github.com/repos/esl/MongooseIM/commits{/sha}","git_commits_url":"https://api.github.com/repos/esl/MongooseIM/git/commits{/sha}","comments_url":"https://api.github.com/repos/esl/MongooseIM/comments{/number}","issue_comment_url":"https://api.github.com/repos/esl/MongooseIM/issues/comments{/number}","contents_url":"https://api.github.com/repos/esl/MongooseIM/contents/{+path}","compare_url":"https://api.github.com/repos/esl/MongooseIM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/esl/MongooseIM/merges","archive_url":"https://api.github.com/repos/esl/MongooseIM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/esl/MongooseIM/downloads","issues_url":"https://api.github.com/repos/esl/MongooseIM/issues{/number}","pulls_url":"https://api.github.com/repos/esl/MongooseIM/pulls{/number}","milestones_url":"https://api.github.com/repos/esl/MongooseIM/milestones{/number}","notifications_url":"https://api.github.com/repos/esl/MongooseIM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/esl/MongooseIM/labels{/name}","releases_url":"https://api.github.com/repos/esl/MongooseIM/releases{/id}","deployments_url":"https://api.github.com/repos/esl/MongooseIM/deployments","created_at":"2011-09-09T08:19:18Z","updated_at":"2018-10-02T12:17:12Z","pushed_at":"2018-10-02T12:35:16Z","git_url":"git://github.com/esl/MongooseIM.git","ssh_url":"git@github.com:esl/MongooseIM.git","clone_url":"https://github.com/esl/MongooseIM.git","svn_url":"https://github.com/esl/MongooseIM","homepage":"","size":33438,"stargazers_count":1019,"watchers_count":1019,"language":"Erlang","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":323,"mirror_url":null,"archived":false,"open_issues_count":130,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0","node_id":"MDc6TGljZW5zZTg="},"forks":323,"open_issues":130,"watchers":1019,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/2093"},"html":{"href":"https://github.com/esl/MongooseIM/pull/2093"},"issue":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/2093"},"comments":{"href":"https://api.github.com/repos/esl/MongooseIM/issues/2093/comments"},"review_comments":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/2093/comments"},"review_comment":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/esl/MongooseIM/pulls/2093/commits"},"statuses":{"href":"https://api.github.com/repos/esl/MongooseIM/statuses/64f34cad98517f6d377140c33d0d1ea9be57dc23"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"aleklisi"}}