{"action":"created","comment":{"url":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/comments/190491464","pull_request_review_id":122876146,"id":190491464,"diff_hunk":"@@ -0,0 +1,354 @@\n+/*******************************************************************************\n+ * Copyright (c) 2015-2016, WSO2.Telco Inc. (http://www.wso2telco.com)\n+ *\n+ * All Rights Reserved. WSO2.Telco Inc. licences this file to you under the Apache License, Version 2.0 (the \"License\");\n+ * you may not use this file except in compliance with the License.\n+ * You may obtain a copy of the License at\n+ *\n+ *   http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ * Unless required by applicable law or agreed to in writing, software\n+ * distributed under the License is distributed on an \"AS IS\" BASIS,\n+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ * See the License for the specific language governing permissions and\n+ * limitations under the License.\n+ ******************************************************************************/\n+package com.wso2telco.gsma.authenticators.ussd;\n+\n+import com.wso2telco.Util;\n+import com.wso2telco.core.config.model.MobileConnectConfig;\n+import com.wso2telco.core.config.service.ConfigurationService;\n+import com.wso2telco.core.config.service.ConfigurationServiceImpl;\n+import com.wso2telco.core.sp.config.utils.exception.DataAccessException;\n+import com.wso2telco.gsma.authenticators.AuthenticatorException;\n+import com.wso2telco.gsma.authenticators.BaseApplicationAuthenticator;\n+import com.wso2telco.gsma.authenticators.Constants;\n+import com.wso2telco.gsma.authenticators.DBUtils;\n+import com.wso2telco.gsma.authenticators.ussd.command.LoginUssdCommand;\n+import com.wso2telco.gsma.authenticators.ussd.command.RegistrationUssdCommand;\n+import com.wso2telco.gsma.authenticators.ussd.command.ServerInitiatedLoginUssdCommand;\n+import com.wso2telco.gsma.authenticators.ussd.command.UssdCommand;\n+import com.wso2telco.gsma.authenticators.util.AuthenticationContextHelper;\n+import com.wso2telco.gsma.authenticators.util.FrameworkServiceDataHolder;\n+import com.wso2telco.gsma.authenticators.util.UserProfileManager;\n+import com.wso2telco.gsma.authenticators.util.WelcomeSmsUtil;\n+import com.wso2telco.ids.datapublisher.model.UserStatus;\n+import com.wso2telco.ids.datapublisher.util.DataPublisherUtil;\n+import org.apache.commons.lang.StringUtils;\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.wso2.carbon.identity.application.authentication.framework.*;\n+import org.wso2.carbon.identity.application.authentication.framework.config.ConfigurationFacade;\n+import org.wso2.carbon.identity.application.authentication.framework.config.model.StepConfig;\n+import org.wso2.carbon.identity.application.authentication.framework.context.AuthenticationContext;\n+import org.wso2.carbon.identity.application.authentication.framework.exception.AuthenticationFailedException;\n+import org.wso2.carbon.identity.application.authentication.framework.exception.LogoutFailedException;\n+import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants;\n+import org.wso2.carbon.identity.application.authentication.framework.util.FrameworkUtils;\n+import org.wso2.carbon.identity.application.common.model.User;\n+import org.wso2.carbon.identity.user.registration.stub.UserRegistrationAdminServiceIdentityException;\n+\n+import javax.servlet.http.HttpServletRequest;\n+import javax.servlet.http.HttpServletResponse;\n+import java.io.IOException;\n+import java.rmi.RemoteException;\n+import java.sql.SQLException;\n+import java.util.Collections;\n+import java.util.HashMap;\n+import java.util.Map;\n+\n+//import org.wso2.carbon.identity.core.dao.OAuthAppDAO;","path":"components/gsma-authenticators/src/main/java/com/wso2telco/gsma/authenticators/ussd/ServerInitiatedUSSDAuthenticator.java","position":60,"original_position":60,"commit_id":"11e44cc07bb6e29cb23f22615978b9d4ab93accd","original_commit_id":"11e44cc07bb6e29cb23f22615978b9d4ab93accd","user":{"login":"TelcoGitHubBot","id":31726654,"avatar_url":"https://avatars1.githubusercontent.com/u/31726654?v=4","gravatar_id":"","url":"https://api.github.com/users/TelcoGitHubBot","html_url":"https://github.com/TelcoGitHubBot","followers_url":"https://api.github.com/users/TelcoGitHubBot/followers","following_url":"https://api.github.com/users/TelcoGitHubBot/following{/other_user}","gists_url":"https://api.github.com/users/TelcoGitHubBot/gists{/gist_id}","starred_url":"https://api.github.com/users/TelcoGitHubBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TelcoGitHubBot/subscriptions","organizations_url":"https://api.github.com/users/TelcoGitHubBot/orgs","repos_url":"https://api.github.com/users/TelcoGitHubBot/repos","events_url":"https://api.github.com/users/TelcoGitHubBot/events{/privacy}","received_events_url":"https://api.github.com/users/TelcoGitHubBot/received_events","type":"User","site_admin":false},"body":"![MAJOR](https://sonarsource.github.io/sonar-github/severity-major.png 'Severity: MAJOR') This block of commented-out lines of code should be removed. [![rule](https://sonarsource.github.io/sonar-github/rule.png)](http://ci.wso2telco.com:9000/coding_rules#rule_key=squid%3ACommentedOutCodeLine)\n","created_at":"2018-05-24T07:41:56Z","updated_at":"2018-05-24T07:41:56Z","html_url":"https://github.com/WSO2Telco/component-ids/pull/351#discussion_r190491464","pull_request_url":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/351","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/comments/190491464"},"html":{"href":"https://github.com/WSO2Telco/component-ids/pull/351#discussion_r190491464"},"pull_request":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/351"}}},"pull_request":{"url":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/351","id":183671549,"html_url":"https://github.com/WSO2Telco/component-ids/pull/351","diff_url":"https://github.com/WSO2Telco/component-ids/pull/351.diff","patch_url":"https://github.com/WSO2Telco/component-ids/pull/351.patch","issue_url":"https://api.github.com/repos/WSO2Telco/component-ids/issues/351","number":351,"state":"open","locked":false,"title":"Basic auth for mc","user":{"login":"lahiru823","id":9651862,"avatar_url":"https://avatars2.githubusercontent.com/u/9651862?v=4","gravatar_id":"","url":"https://api.github.com/users/lahiru823","html_url":"https://github.com/lahiru823","followers_url":"https://api.github.com/users/lahiru823/followers","following_url":"https://api.github.com/users/lahiru823/following{/other_user}","gists_url":"https://api.github.com/users/lahiru823/gists{/gist_id}","starred_url":"https://api.github.com/users/lahiru823/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lahiru823/subscriptions","organizations_url":"https://api.github.com/users/lahiru823/orgs","repos_url":"https://api.github.com/users/lahiru823/repos","events_url":"https://api.github.com/users/lahiru823/events{/privacy}","received_events_url":"https://api.github.com/users/lahiru823/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-24T09:21:21Z","updated_at":"2018-05-24T07:41:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/351/commits","review_comments_url":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/351/comments","review_comment_url":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WSO2Telco/component-ids/issues/351/comments","statuses_url":"https://api.github.com/repos/WSO2Telco/component-ids/statuses/11e44cc07bb6e29cb23f22615978b9d4ab93accd","head":{"label":"WSO2Telco:basic_auth_for_mc","ref":"basic_auth_for_mc","sha":"11e44cc07bb6e29cb23f22615978b9d4ab93accd","user":{"login":"WSO2Telco","id":15646154,"avatar_url":"https://avatars2.githubusercontent.com/u/15646154?v=4","gravatar_id":"","url":"https://api.github.com/users/WSO2Telco","html_url":"https://github.com/WSO2Telco","followers_url":"https://api.github.com/users/WSO2Telco/followers","following_url":"https://api.github.com/users/WSO2Telco/following{/other_user}","gists_url":"https://api.github.com/users/WSO2Telco/gists{/gist_id}","starred_url":"https://api.github.com/users/WSO2Telco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WSO2Telco/subscriptions","organizations_url":"https://api.github.com/users/WSO2Telco/orgs","repos_url":"https://api.github.com/users/WSO2Telco/repos","events_url":"https://api.github.com/users/WSO2Telco/events{/privacy}","received_events_url":"https://api.github.com/users/WSO2Telco/received_events","type":"Organization","site_admin":false},"repo":{"id":49641240,"name":"component-ids","full_name":"WSO2Telco/component-ids","owner":{"login":"WSO2Telco","id":15646154,"avatar_url":"https://avatars2.githubusercontent.com/u/15646154?v=4","gravatar_id":"","url":"https://api.github.com/users/WSO2Telco","html_url":"https://github.com/WSO2Telco","followers_url":"https://api.github.com/users/WSO2Telco/followers","following_url":"https://api.github.com/users/WSO2Telco/following{/other_user}","gists_url":"https://api.github.com/users/WSO2Telco/gists{/gist_id}","starred_url":"https://api.github.com/users/WSO2Telco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WSO2Telco/subscriptions","organizations_url":"https://api.github.com/users/WSO2Telco/orgs","repos_url":"https://api.github.com/users/WSO2Telco/repos","events_url":"https://api.github.com/users/WSO2Telco/events{/privacy}","received_events_url":"https://api.github.com/users/WSO2Telco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WSO2Telco/component-ids","description":"components related to Identity server  .","fork":false,"url":"https://api.github.com/repos/WSO2Telco/component-ids","forks_url":"https://api.github.com/repos/WSO2Telco/component-ids/forks","keys_url":"https://api.github.com/repos/WSO2Telco/component-ids/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WSO2Telco/component-ids/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WSO2Telco/component-ids/teams","hooks_url":"https://api.github.com/repos/WSO2Telco/component-ids/hooks","issue_events_url":"https://api.github.com/repos/WSO2Telco/component-ids/issues/events{/number}","events_url":"https://api.github.com/repos/WSO2Telco/component-ids/events","assignees_url":"https://api.github.com/repos/WSO2Telco/component-ids/assignees{/user}","branches_url":"https://api.github.com/repos/WSO2Telco/component-ids/branches{/branch}","tags_url":"https://api.github.com/repos/WSO2Telco/component-ids/tags","blobs_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/refs{/sha}","trees_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WSO2Telco/component-ids/statuses/{sha}","languages_url":"https://api.github.com/repos/WSO2Telco/component-ids/languages","stargazers_url":"https://api.github.com/repos/WSO2Telco/component-ids/stargazers","contributors_url":"https://api.github.com/repos/WSO2Telco/component-ids/contributors","subscribers_url":"https://api.github.com/repos/WSO2Telco/component-ids/subscribers","subscription_url":"https://api.github.com/repos/WSO2Telco/component-ids/subscription","commits_url":"https://api.github.com/repos/WSO2Telco/component-ids/commits{/sha}","git_commits_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/commits{/sha}","comments_url":"https://api.github.com/repos/WSO2Telco/component-ids/comments{/number}","issue_comment_url":"https://api.github.com/repos/WSO2Telco/component-ids/issues/comments{/number}","contents_url":"https://api.github.com/repos/WSO2Telco/component-ids/contents/{+path}","compare_url":"https://api.github.com/repos/WSO2Telco/component-ids/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WSO2Telco/component-ids/merges","archive_url":"https://api.github.com/repos/WSO2Telco/component-ids/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WSO2Telco/component-ids/downloads","issues_url":"https://api.github.com/repos/WSO2Telco/component-ids/issues{/number}","pulls_url":"https://api.github.com/repos/WSO2Telco/component-ids/pulls{/number}","milestones_url":"https://api.github.com/repos/WSO2Telco/component-ids/milestones{/number}","notifications_url":"https://api.github.com/repos/WSO2Telco/component-ids/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WSO2Telco/component-ids/labels{/name}","releases_url":"https://api.github.com/repos/WSO2Telco/component-ids/releases{/id}","deployments_url":"https://api.github.com/repos/WSO2Telco/component-ids/deployments","created_at":"2016-01-14T10:45:15Z","updated_at":"2018-04-10T04:49:54Z","pushed_at":"2018-05-24T07:39:47Z","git_url":"git://github.com/WSO2Telco/component-ids.git","ssh_url":"git@github.com:WSO2Telco/component-ids.git","clone_url":"https://github.com/WSO2Telco/component-ids.git","svn_url":"https://github.com/WSO2Telco/component-ids","homepage":null,"size":43852,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":30,"open_issues":7,"watchers":1,"default_branch":"master"}},"base":{"label":"WSO2Telco:master","ref":"master","sha":"ffa324def5986726892f249ee3919e80a3d4062e","user":{"login":"WSO2Telco","id":15646154,"avatar_url":"https://avatars2.githubusercontent.com/u/15646154?v=4","gravatar_id":"","url":"https://api.github.com/users/WSO2Telco","html_url":"https://github.com/WSO2Telco","followers_url":"https://api.github.com/users/WSO2Telco/followers","following_url":"https://api.github.com/users/WSO2Telco/following{/other_user}","gists_url":"https://api.github.com/users/WSO2Telco/gists{/gist_id}","starred_url":"https://api.github.com/users/WSO2Telco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WSO2Telco/subscriptions","organizations_url":"https://api.github.com/users/WSO2Telco/orgs","repos_url":"https://api.github.com/users/WSO2Telco/repos","events_url":"https://api.github.com/users/WSO2Telco/events{/privacy}","received_events_url":"https://api.github.com/users/WSO2Telco/received_events","type":"Organization","site_admin":false},"repo":{"id":49641240,"name":"component-ids","full_name":"WSO2Telco/component-ids","owner":{"login":"WSO2Telco","id":15646154,"avatar_url":"https://avatars2.githubusercontent.com/u/15646154?v=4","gravatar_id":"","url":"https://api.github.com/users/WSO2Telco","html_url":"https://github.com/WSO2Telco","followers_url":"https://api.github.com/users/WSO2Telco/followers","following_url":"https://api.github.com/users/WSO2Telco/following{/other_user}","gists_url":"https://api.github.com/users/WSO2Telco/gists{/gist_id}","starred_url":"https://api.github.com/users/WSO2Telco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WSO2Telco/subscriptions","organizations_url":"https://api.github.com/users/WSO2Telco/orgs","repos_url":"https://api.github.com/users/WSO2Telco/repos","events_url":"https://api.github.com/users/WSO2Telco/events{/privacy}","received_events_url":"https://api.github.com/users/WSO2Telco/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WSO2Telco/component-ids","description":"components related to Identity server  .","fork":false,"url":"https://api.github.com/repos/WSO2Telco/component-ids","forks_url":"https://api.github.com/repos/WSO2Telco/component-ids/forks","keys_url":"https://api.github.com/repos/WSO2Telco/component-ids/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WSO2Telco/component-ids/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WSO2Telco/component-ids/teams","hooks_url":"https://api.github.com/repos/WSO2Telco/component-ids/hooks","issue_events_url":"https://api.github.com/repos/WSO2Telco/component-ids/issues/events{/number}","events_url":"https://api.github.com/repos/WSO2Telco/component-ids/events","assignees_url":"https://api.github.com/repos/WSO2Telco/component-ids/assignees{/user}","branches_url":"https://api.github.com/repos/WSO2Telco/component-ids/branches{/branch}","tags_url":"https://api.github.com/repos/WSO2Telco/component-ids/tags","blobs_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/refs{/sha}","trees_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WSO2Telco/component-ids/statuses/{sha}","languages_url":"https://api.github.com/repos/WSO2Telco/component-ids/languages","stargazers_url":"https://api.github.com/repos/WSO2Telco/component-ids/stargazers","contributors_url":"https://api.github.com/repos/WSO2Telco/component-ids/contributors","subscribers_url":"https://api.github.com/repos/WSO2Telco/component-ids/subscribers","subscription_url":"https://api.github.com/repos/WSO2Telco/component-ids/subscription","commits_url":"https://api.github.com/repos/WSO2Telco/component-ids/commits{/sha}","git_commits_url":"https://api.github.com/repos/WSO2Telco/component-ids/git/commits{/sha}","comments_url":"https://api.github.com/repos/WSO2Telco/component-ids/comments{/number}","issue_comment_url":"https://api.github.com/repos/WSO2Telco/component-ids/issues/comments{/number}","contents_url":"https://api.github.com/repos/WSO2Telco/component-ids/contents/{+path}","compare_url":"https://api.github.com/repos/WSO2Telco/component-ids/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WSO2Telco/component-ids/merges","archive_url":"https://api.github.com/repos/WSO2Telco/component-ids/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WSO2Telco/component-ids/downloads","issues_url":"https://api.github.com/repos/WSO2Telco/component-ids/issues{/number}","pulls_url":"https://api.github.com/repos/WSO2Telco/component-ids/pulls{/number}","milestones_url":"https://api.github.com/repos/WSO2Telco/component-ids/milestones{/number}","notifications_url":"https://api.github.com/repos/WSO2Telco/component-ids/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WSO2Telco/component-ids/labels{/name}","releases_url":"https://api.github.com/repos/WSO2Telco/component-ids/releases{/id}","deployments_url":"https://api.github.com/repos/WSO2Telco/component-ids/deployments","created_at":"2016-01-14T10:45:15Z","updated_at":"2018-04-10T04:49:54Z","pushed_at":"2018-05-24T07:39:47Z","git_url":"git://github.com/WSO2Telco/component-ids.git","ssh_url":"git@github.com:WSO2Telco/component-ids.git","clone_url":"https://github.com/WSO2Telco/component-ids.git","svn_url":"https://github.com/WSO2Telco/component-ids","homepage":null,"size":43852,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":7,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":30,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/351"},"html":{"href":"https://github.com/WSO2Telco/component-ids/pull/351"},"issue":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/issues/351"},"comments":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/issues/351/comments"},"review_comments":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/351/comments"},"review_comment":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/pulls/351/commits"},"statuses":{"href":"https://api.github.com/repos/WSO2Telco/component-ids/statuses/11e44cc07bb6e29cb23f22615978b9d4ab93accd"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"TelcoGitHubBot"}}