{"action":"created","comment":{"url":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/comments/41115408","id":41115408,"diff_hunk":"@@ -0,0 +1,96 @@\n+package ru.mail.track;\n+\n+import java.util.Scanner;\n+\n+public class AuthorizationService {\n+\n+    private UserStore userStore;\n+\n+    public AuthorizationService(UserStore userStore) {\n+        this.userStore = userStore;\n+    }\n+\n+    Scanner scanner = new Scanner(System.in);\n+\n+    void startAuthorization() {\n+        User userExample[] = new User[4];\n+        userExample[0] = new User(\"Misha\",\"123\");\n+        userExample[1] = new User(\"Lesha\",\"2345\");\n+        userExample[2] = new User(\"Tania\",\"password\");\n+        userExample[3] = new User(\"Arseniy\",\"qqqq\");\n+        for( int i = 0; i < 4; i++){\n+            userStore.addUser(userExample[i]);\n+        }\n+        if (isLogin()) {\n+            login();\n+        }\n+    }\n+\n+    User login() {\n+//            1. Ask for name\n+//            2. Ask for password\n+//            3. Ask UserStore for user:  userStore.getUser(name, passL)\n+\n+        System.out.println(\"Name user:\");\n+        String name = scanner.next();\n+        while(true){\n+            if(!userStore.isUserExist(name)){\n+                System.out.println(\"This user doesn't exist\");\n+            }\n+            else\n+                break;\n+            name = scanner.next();\n+        }\n+\n+        System.out.println(\"Password:\");\n+        while(true) {\n+            String password = scanner.next();\n+            if (userStore.getUser(name, password) != null) {\n+                System.out.println(\"Hello \");\n+                System.out.println(name);\n+                break;\n+            } else {\n+                System.out.println(\"Incorrect password\");\n+            }\n+        }\n+\n+\n+        return null;\n+    }\n+\n+    User createUser() {\n+        // 1. Ask for name\n+        // 2. Ask for pass\n+        // 3. Add user to UserStore: userStore.addUser(user)\n+        System.out.println(\"Enter your user name\");\n+        String name = scanner.next();\n+        while( true ){\n+            if(userStore.isUserExist(name)){","path":"ClientAutorization/src/ru/mail/track/AuthorizationService.java","position":68,"original_position":68,"commit_id":"8d22803cd2c9be6e26fd77fe0b1ffd46394b5b11","original_commit_id":"8d22803cd2c9be6e26fd77fe0b1ffd46394b5b11","user":{"login":"arhangeldim","id":1112038,"avatar_url":"https://avatars.githubusercontent.com/u/1112038?v=3","gravatar_id":"","url":"https://api.github.com/users/arhangeldim","html_url":"https://github.com/arhangeldim","followers_url":"https://api.github.com/users/arhangeldim/followers","following_url":"https://api.github.com/users/arhangeldim/following{/other_user}","gists_url":"https://api.github.com/users/arhangeldim/gists{/gist_id}","starred_url":"https://api.github.com/users/arhangeldim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arhangeldim/subscriptions","organizations_url":"https://api.github.com/users/arhangeldim/orgs","repos_url":"https://api.github.com/users/arhangeldim/repos","events_url":"https://api.github.com/users/arhangeldim/events{/privacy}","received_events_url":"https://api.github.com/users/arhangeldim/received_events","type":"User","site_admin":false},"body":"Здесь опять обратный порядрок логики, делаем так:\r\n```java\r\nwhile (true) {\r\n  line = scanner.next();\r\n  if (что- то проверяем) {\r\n    break; // здесь нам видно по какому условию выходим из бесконечного цикла\r\n  } else {\r\n    // крутимся дальше\r\n  }\r\n}\r\n```\r\n","created_at":"2015-10-05T07:16:37Z","updated_at":"2015-10-05T07:16:37Z","html_url":"https://github.com/arsdemal/tehnotrack/pull/1#discussion_r41115408","pull_request_url":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/comments/41115408"},"html":{"href":"https://github.com/arsdemal/tehnotrack/pull/1#discussion_r41115408"},"pull_request":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/1","id":46724093,"html_url":"https://github.com/arsdemal/tehnotrack/pull/1","diff_url":"https://github.com/arsdemal/tehnotrack/pull/1.diff","patch_url":"https://github.com/arsdemal/tehnotrack/pull/1.patch","issue_url":"https://api.github.com/repos/arsdemal/tehnotrack/issues/1","number":1,"state":"open","locked":false,"title":"Client autorization","user":{"login":"arsdemal","id":9571324,"avatar_url":"https://avatars.githubusercontent.com/u/9571324?v=3","gravatar_id":"","url":"https://api.github.com/users/arsdemal","html_url":"https://github.com/arsdemal","followers_url":"https://api.github.com/users/arsdemal/followers","following_url":"https://api.github.com/users/arsdemal/following{/other_user}","gists_url":"https://api.github.com/users/arsdemal/gists{/gist_id}","starred_url":"https://api.github.com/users/arsdemal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arsdemal/subscriptions","organizations_url":"https://api.github.com/users/arsdemal/orgs","repos_url":"https://api.github.com/users/arsdemal/repos","events_url":"https://api.github.com/users/arsdemal/events{/privacy}","received_events_url":"https://api.github.com/users/arsdemal/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-10-04T12:09:50Z","updated_at":"2015-10-05T07:16:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ac78e073bbae67cfdf2af1183da52740dd3a2684","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/1/commits","review_comments_url":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/1/comments","review_comment_url":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/arsdemal/tehnotrack/issues/1/comments","statuses_url":"https://api.github.com/repos/arsdemal/tehnotrack/statuses/8d22803cd2c9be6e26fd77fe0b1ffd46394b5b11","head":{"label":"arsdemal:ClientAutorization","ref":"ClientAutorization","sha":"8d22803cd2c9be6e26fd77fe0b1ffd46394b5b11","user":{"login":"arsdemal","id":9571324,"avatar_url":"https://avatars.githubusercontent.com/u/9571324?v=3","gravatar_id":"","url":"https://api.github.com/users/arsdemal","html_url":"https://github.com/arsdemal","followers_url":"https://api.github.com/users/arsdemal/followers","following_url":"https://api.github.com/users/arsdemal/following{/other_user}","gists_url":"https://api.github.com/users/arsdemal/gists{/gist_id}","starred_url":"https://api.github.com/users/arsdemal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arsdemal/subscriptions","organizations_url":"https://api.github.com/users/arsdemal/orgs","repos_url":"https://api.github.com/users/arsdemal/repos","events_url":"https://api.github.com/users/arsdemal/events{/privacy}","received_events_url":"https://api.github.com/users/arsdemal/received_events","type":"User","site_admin":false},"repo":{"id":43609531,"name":"tehnotrack","full_name":"arsdemal/tehnotrack","owner":{"login":"arsdemal","id":9571324,"avatar_url":"https://avatars.githubusercontent.com/u/9571324?v=3","gravatar_id":"","url":"https://api.github.com/users/arsdemal","html_url":"https://github.com/arsdemal","followers_url":"https://api.github.com/users/arsdemal/followers","following_url":"https://api.github.com/users/arsdemal/following{/other_user}","gists_url":"https://api.github.com/users/arsdemal/gists{/gist_id}","starred_url":"https://api.github.com/users/arsdemal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arsdemal/subscriptions","organizations_url":"https://api.github.com/users/arsdemal/orgs","repos_url":"https://api.github.com/users/arsdemal/repos","events_url":"https://api.github.com/users/arsdemal/events{/privacy}","received_events_url":"https://api.github.com/users/arsdemal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arsdemal/tehnotrack","description":"","fork":false,"url":"https://api.github.com/repos/arsdemal/tehnotrack","forks_url":"https://api.github.com/repos/arsdemal/tehnotrack/forks","keys_url":"https://api.github.com/repos/arsdemal/tehnotrack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arsdemal/tehnotrack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arsdemal/tehnotrack/teams","hooks_url":"https://api.github.com/repos/arsdemal/tehnotrack/hooks","issue_events_url":"https://api.github.com/repos/arsdemal/tehnotrack/issues/events{/number}","events_url":"https://api.github.com/repos/arsdemal/tehnotrack/events","assignees_url":"https://api.github.com/repos/arsdemal/tehnotrack/assignees{/user}","branches_url":"https://api.github.com/repos/arsdemal/tehnotrack/branches{/branch}","tags_url":"https://api.github.com/repos/arsdemal/tehnotrack/tags","blobs_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/refs{/sha}","trees_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arsdemal/tehnotrack/statuses/{sha}","languages_url":"https://api.github.com/repos/arsdemal/tehnotrack/languages","stargazers_url":"https://api.github.com/repos/arsdemal/tehnotrack/stargazers","contributors_url":"https://api.github.com/repos/arsdemal/tehnotrack/contributors","subscribers_url":"https://api.github.com/repos/arsdemal/tehnotrack/subscribers","subscription_url":"https://api.github.com/repos/arsdemal/tehnotrack/subscription","commits_url":"https://api.github.com/repos/arsdemal/tehnotrack/commits{/sha}","git_commits_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/commits{/sha}","comments_url":"https://api.github.com/repos/arsdemal/tehnotrack/comments{/number}","issue_comment_url":"https://api.github.com/repos/arsdemal/tehnotrack/issues/comments{/number}","contents_url":"https://api.github.com/repos/arsdemal/tehnotrack/contents/{+path}","compare_url":"https://api.github.com/repos/arsdemal/tehnotrack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arsdemal/tehnotrack/merges","archive_url":"https://api.github.com/repos/arsdemal/tehnotrack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arsdemal/tehnotrack/downloads","issues_url":"https://api.github.com/repos/arsdemal/tehnotrack/issues{/number}","pulls_url":"https://api.github.com/repos/arsdemal/tehnotrack/pulls{/number}","milestones_url":"https://api.github.com/repos/arsdemal/tehnotrack/milestones{/number}","notifications_url":"https://api.github.com/repos/arsdemal/tehnotrack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arsdemal/tehnotrack/labels{/name}","releases_url":"https://api.github.com/repos/arsdemal/tehnotrack/releases{/id}","created_at":"2015-10-03T18:24:51Z","updated_at":"2015-10-03T18:24:51Z","pushed_at":"2015-10-04T12:09:51Z","git_url":"git://github.com/arsdemal/tehnotrack.git","ssh_url":"git@github.com:arsdemal/tehnotrack.git","clone_url":"https://github.com/arsdemal/tehnotrack.git","svn_url":"https://github.com/arsdemal/tehnotrack","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"arsdemal:master","ref":"master","sha":"73c49666f1365a58fd57299414f2d0d9f965e75c","user":{"login":"arsdemal","id":9571324,"avatar_url":"https://avatars.githubusercontent.com/u/9571324?v=3","gravatar_id":"","url":"https://api.github.com/users/arsdemal","html_url":"https://github.com/arsdemal","followers_url":"https://api.github.com/users/arsdemal/followers","following_url":"https://api.github.com/users/arsdemal/following{/other_user}","gists_url":"https://api.github.com/users/arsdemal/gists{/gist_id}","starred_url":"https://api.github.com/users/arsdemal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arsdemal/subscriptions","organizations_url":"https://api.github.com/users/arsdemal/orgs","repos_url":"https://api.github.com/users/arsdemal/repos","events_url":"https://api.github.com/users/arsdemal/events{/privacy}","received_events_url":"https://api.github.com/users/arsdemal/received_events","type":"User","site_admin":false},"repo":{"id":43609531,"name":"tehnotrack","full_name":"arsdemal/tehnotrack","owner":{"login":"arsdemal","id":9571324,"avatar_url":"https://avatars.githubusercontent.com/u/9571324?v=3","gravatar_id":"","url":"https://api.github.com/users/arsdemal","html_url":"https://github.com/arsdemal","followers_url":"https://api.github.com/users/arsdemal/followers","following_url":"https://api.github.com/users/arsdemal/following{/other_user}","gists_url":"https://api.github.com/users/arsdemal/gists{/gist_id}","starred_url":"https://api.github.com/users/arsdemal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arsdemal/subscriptions","organizations_url":"https://api.github.com/users/arsdemal/orgs","repos_url":"https://api.github.com/users/arsdemal/repos","events_url":"https://api.github.com/users/arsdemal/events{/privacy}","received_events_url":"https://api.github.com/users/arsdemal/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/arsdemal/tehnotrack","description":"","fork":false,"url":"https://api.github.com/repos/arsdemal/tehnotrack","forks_url":"https://api.github.com/repos/arsdemal/tehnotrack/forks","keys_url":"https://api.github.com/repos/arsdemal/tehnotrack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/arsdemal/tehnotrack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/arsdemal/tehnotrack/teams","hooks_url":"https://api.github.com/repos/arsdemal/tehnotrack/hooks","issue_events_url":"https://api.github.com/repos/arsdemal/tehnotrack/issues/events{/number}","events_url":"https://api.github.com/repos/arsdemal/tehnotrack/events","assignees_url":"https://api.github.com/repos/arsdemal/tehnotrack/assignees{/user}","branches_url":"https://api.github.com/repos/arsdemal/tehnotrack/branches{/branch}","tags_url":"https://api.github.com/repos/arsdemal/tehnotrack/tags","blobs_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/refs{/sha}","trees_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/arsdemal/tehnotrack/statuses/{sha}","languages_url":"https://api.github.com/repos/arsdemal/tehnotrack/languages","stargazers_url":"https://api.github.com/repos/arsdemal/tehnotrack/stargazers","contributors_url":"https://api.github.com/repos/arsdemal/tehnotrack/contributors","subscribers_url":"https://api.github.com/repos/arsdemal/tehnotrack/subscribers","subscription_url":"https://api.github.com/repos/arsdemal/tehnotrack/subscription","commits_url":"https://api.github.com/repos/arsdemal/tehnotrack/commits{/sha}","git_commits_url":"https://api.github.com/repos/arsdemal/tehnotrack/git/commits{/sha}","comments_url":"https://api.github.com/repos/arsdemal/tehnotrack/comments{/number}","issue_comment_url":"https://api.github.com/repos/arsdemal/tehnotrack/issues/comments{/number}","contents_url":"https://api.github.com/repos/arsdemal/tehnotrack/contents/{+path}","compare_url":"https://api.github.com/repos/arsdemal/tehnotrack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/arsdemal/tehnotrack/merges","archive_url":"https://api.github.com/repos/arsdemal/tehnotrack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/arsdemal/tehnotrack/downloads","issues_url":"https://api.github.com/repos/arsdemal/tehnotrack/issues{/number}","pulls_url":"https://api.github.com/repos/arsdemal/tehnotrack/pulls{/number}","milestones_url":"https://api.github.com/repos/arsdemal/tehnotrack/milestones{/number}","notifications_url":"https://api.github.com/repos/arsdemal/tehnotrack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/arsdemal/tehnotrack/labels{/name}","releases_url":"https://api.github.com/repos/arsdemal/tehnotrack/releases{/id}","created_at":"2015-10-03T18:24:51Z","updated_at":"2015-10-03T18:24:51Z","pushed_at":"2015-10-04T12:09:51Z","git_url":"git://github.com/arsdemal/tehnotrack.git","ssh_url":"git@github.com:arsdemal/tehnotrack.git","clone_url":"https://github.com/arsdemal/tehnotrack.git","svn_url":"https://github.com/arsdemal/tehnotrack","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/1"},"html":{"href":"https://github.com/arsdemal/tehnotrack/pull/1"},"issue":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/issues/1"},"comments":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/arsdemal/tehnotrack/statuses/8d22803cd2c9be6e26fd77fe0b1ffd46394b5b11"}}}}