GitHub PullRequestReviewCommentEvent at 2014-12-29 20:02:11
Repository: carbon-identity
Actor: johannnallathamby
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/comments/22326152","id":22326152,"diff_hunk":"@@ -0,0 +1,304 @@\n+/*\n+* Copyright (c) 2014, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+*\n+* WSO2 Inc. licenses this file to you under the Apache License,\n+* Version 2.0 (the \"License\"); you may not use this file except\n+* 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,\n+* software distributed under the License is distributed on an\n+* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n+* KIND, either express or implied. See the License for the\n+* specific language governing permissions and limitations\n+* under the License.\n+*/\n+\n+package org.wso2.carbon.identity.application.authentication.endpoint.util;\n+\n+import org.apache.axiom.om.util.Base64;\n+import org.apache.commons.lang.StringUtils;\n+import org.apache.commons.logging.Log;\n+import org.apache.commons.logging.LogFactory;\n+import org.w3c.dom.Element;\n+import org.w3c.dom.Node;\n+import org.w3c.dom.NodeList;\n+import org.xml.sax.InputSource;\n+\n+import javax.xml.xpath.XPath;\n+import javax.xml.xpath.XPathConstants;\n+import javax.xml.xpath.XPathFactory;\n+import java.io.File;\n+import java.io.IOException;\n+import java.io.InputStream;\n+import java.io.StringReader;\n+import java.util.ArrayList;\n+import java.util.HashMap;\n+import java.util.List;\n+import java.util.Properties;\n+import java.util.Map;\n+import java.util.Collections;\n+\n+public class TenantDataManager {\n+\n+    private static final Log log = LogFactory.getLog(TenantDataManager.class);\n+\n+    // Tenant list dropdown related properties\n+    private static final String USERNAME = \"mutual.ssl.username\";\n+    private static final String USERNAME_HEADER = \"username.header\";\n+    private static final String HOST = \"identity.server.host\";\n+    private static final String PORT = \"identity.server.port\";\n+    private static final String CLIENT_KEY_STORE = \"client.keyStore\";\n+    private static final String CLIENT_TRUST_STORE = \"client.trustStore\";\n+    private static final String CLIENT_KEY_STORE_PASSWORD = \"client.keyStore.password\";\n+    private static final String CLIENT_TRUST_STORE_PASSWORD = \"client.trustStore.password\";\n+    private static final String TENANT_CONFIG_PROPERTIES = \"TenantConfig.properties\";\n+    private static final String TENANT_LIST_ENABLED = \"tenantListEnabled\";\n+\n+    // Service URL constants\n+    private static final String HTTPS_URL = \"https://\";\n+    private static final String TENANT_MGT_ADMIN_SERVICE_URL = \"/services/TenantMgtAdminService/retrieveTenants\";\n+    private static final String COLON = \":\";\n+\n+    // String constants for SOAP response processing\n+    private static final String RETURN = \"return\";\n+    private static final String RETRIEVE_TENANTS_RESPONSE = \"retrieveTenantsResponse\";\n+    private static final String TENANT_DOMAIN = \"tenantDomain\";\n+    private static final String ACTIVE = \"active\";\n+    private static final String TENANT_DATA_SEPARATOR = \",\";\n+    private static final String RELATIVE_PATH_START_CHAR = \".\";\n+    private static final String CHARACTER_ENCODING = \"UTF-8\";\n+\n+    private static Properties prop;\n+    private static String carbonLogin = \"\";\n+    private static String serviceURL;\n+    private static String usernameHeaderName = \"\";\n+    private static List<String> tenantDomainList;","path":"components/identity/org.wso2.carbon.identity.application.authentication.endpoint/src/main/java/org/wso2/carbon/identity/application/authentication/endpoint/util/TenantDataManager.java","position":78,"original_position":78,"commit_id":"572553f95838961c55fd98febf8faba5d0c3174a","original_commit_id":"572553f95838961c55fd98febf8faba5d0c3174a","user":{"login":"johannnallathamby","id":7780626,"avatar_url":"https://avatars.githubusercontent.com/u/7780626?v=3","gravatar_id":"","url":"https://api.github.com/users/johannnallathamby","html_url":"https://github.com/johannnallathamby","followers_url":"https://api.github.com/users/johannnallathamby/followers","following_url":"https://api.github.com/users/johannnallathamby/following{/other_user}","gists_url":"https://api.github.com/users/johannnallathamby/gists{/gist_id}","starred_url":"https://api.github.com/users/johannnallathamby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johannnallathamby/subscriptions","organizations_url":"https://api.github.com/users/johannnallathamby/orgs","repos_url":"https://api.github.com/users/johannnallathamby/repos","events_url":"https://api.github.com/users/johannnallathamby/events{/privacy}","received_events_url":"https://api.github.com/users/johannnallathamby/received_events","type":"User","site_admin":false},"body":"Initialize to empty list","created_at":"2014-12-29T20:02:11Z","updated_at":"2014-12-29T20:02:11Z","html_url":"https://github.com/wso2-dev/carbon-identity/pull/52#discussion_r22326152","pull_request_url":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/52","_links":{"self":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/comments/22326152"},"html":{"href":"https://github.com/wso2-dev/carbon-identity/pull/52#discussion_r22326152"},"pull_request":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/52"}}},"pull_request":{"url":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/52","id":26618921,"html_url":"https://github.com/wso2-dev/carbon-identity/pull/52","diff_url":"https://github.com/wso2-dev/carbon-identity/pull/52.diff","patch_url":"https://github.com/wso2-dev/carbon-identity/pull/52.patch","issue_url":"https://api.github.com/repos/wso2-dev/carbon-identity/issues/52","number":52,"state":"open","locked":false,"title":"IDENTITY-2821 authentication.endpoint","user":{"login":"thariyarox","id":8102507,"avatar_url":"https://avatars.githubusercontent.com/u/8102507?v=3","gravatar_id":"","url":"https://api.github.com/users/thariyarox","html_url":"https://github.com/thariyarox","followers_url":"https://api.github.com/users/thariyarox/followers","following_url":"https://api.github.com/users/thariyarox/following{/other_user}","gists_url":"https://api.github.com/users/thariyarox/gists{/gist_id}","starred_url":"https://api.github.com/users/thariyarox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thariyarox/subscriptions","organizations_url":"https://api.github.com/users/thariyarox/orgs","repos_url":"https://api.github.com/users/thariyarox/repos","events_url":"https://api.github.com/users/thariyarox/events{/privacy}","received_events_url":"https://api.github.com/users/thariyarox/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-12-27T22:53:55Z","updated_at":"2014-12-29T20:02:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d59392a6808f64db5fed5d9fa095fa9bead067cb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/52/commits","review_comments_url":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/52/comments","review_comment_url":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wso2-dev/carbon-identity/issues/52/comments","statuses_url":"https://api.github.com/repos/wso2-dev/carbon-identity/statuses/572553f95838961c55fd98febf8faba5d0c3174a","head":{"label":"thariyarox:IDENTITY-2821_AuthenticationEndpoint","ref":"IDENTITY-2821_AuthenticationEndpoint","sha":"572553f95838961c55fd98febf8faba5d0c3174a","user":{"login":"thariyarox","id":8102507,"avatar_url":"https://avatars.githubusercontent.com/u/8102507?v=3","gravatar_id":"","url":"https://api.github.com/users/thariyarox","html_url":"https://github.com/thariyarox","followers_url":"https://api.github.com/users/thariyarox/followers","following_url":"https://api.github.com/users/thariyarox/following{/other_user}","gists_url":"https://api.github.com/users/thariyarox/gists{/gist_id}","starred_url":"https://api.github.com/users/thariyarox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thariyarox/subscriptions","organizations_url":"https://api.github.com/users/thariyarox/orgs","repos_url":"https://api.github.com/users/thariyarox/repos","events_url":"https://api.github.com/users/thariyarox/events{/privacy}","received_events_url":"https://api.github.com/users/thariyarox/received_events","type":"User","site_admin":false},"repo":{"id":28169502,"name":"carbon-identity","full_name":"thariyarox/carbon-identity","owner":{"login":"thariyarox","id":8102507,"avatar_url":"https://avatars.githubusercontent.com/u/8102507?v=3","gravatar_id":"","url":"https://api.github.com/users/thariyarox","html_url":"https://github.com/thariyarox","followers_url":"https://api.github.com/users/thariyarox/followers","following_url":"https://api.github.com/users/thariyarox/following{/other_user}","gists_url":"https://api.github.com/users/thariyarox/gists{/gist_id}","starred_url":"https://api.github.com/users/thariyarox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thariyarox/subscriptions","organizations_url":"https://api.github.com/users/thariyarox/orgs","repos_url":"https://api.github.com/users/thariyarox/repos","events_url":"https://api.github.com/users/thariyarox/events{/privacy}","received_events_url":"https://api.github.com/users/thariyarox/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/thariyarox/carbon-identity","description":"","fork":true,"url":"https://api.github.com/repos/thariyarox/carbon-identity","forks_url":"https://api.github.com/repos/thariyarox/carbon-identity/forks","keys_url":"https://api.github.com/repos/thariyarox/carbon-identity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thariyarox/carbon-identity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thariyarox/carbon-identity/teams","hooks_url":"https://api.github.com/repos/thariyarox/carbon-identity/hooks","issue_events_url":"https://api.github.com/repos/thariyarox/carbon-identity/issues/events{/number}","events_url":"https://api.github.com/repos/thariyarox/carbon-identity/events","assignees_url":"https://api.github.com/repos/thariyarox/carbon-identity/assignees{/user}","branches_url":"https://api.github.com/repos/thariyarox/carbon-identity/branches{/branch}","tags_url":"https://api.github.com/repos/thariyarox/carbon-identity/tags","blobs_url":"https://api.github.com/repos/thariyarox/carbon-identity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thariyarox/carbon-identity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thariyarox/carbon-identity/git/refs{/sha}","trees_url":"https://api.github.com/repos/thariyarox/carbon-identity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thariyarox/carbon-identity/statuses/{sha}","languages_url":"https://api.github.com/repos/thariyarox/carbon-identity/languages","stargazers_url":"https://api.github.com/repos/thariyarox/carbon-identity/stargazers","contributors_url":"https://api.github.com/repos/thariyarox/carbon-identity/contributors","subscribers_url":"https://api.github.com/repos/thariyarox/carbon-identity/subscribers","subscription_url":"https://api.github.com/repos/thariyarox/carbon-identity/subscription","commits_url":"https://api.github.com/repos/thariyarox/carbon-identity/commits{/sha}","git_commits_url":"https://api.github.com/repos/thariyarox/carbon-identity/git/commits{/sha}","comments_url":"https://api.github.com/repos/thariyarox/carbon-identity/comments{/number}","issue_comment_url":"https://api.github.com/repos/thariyarox/carbon-identity/issues/comments/{number}","contents_url":"https://api.github.com/repos/thariyarox/carbon-identity/contents/{+path}","compare_url":"https://api.github.com/repos/thariyarox/carbon-identity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thariyarox/carbon-identity/merges","archive_url":"https://api.github.com/repos/thariyarox/carbon-identity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thariyarox/carbon-identity/downloads","issues_url":"https://api.github.com/repos/thariyarox/carbon-identity/issues{/number}","pulls_url":"https://api.github.com/repos/thariyarox/carbon-identity/pulls{/number}","milestones_url":"https://api.github.com/repos/thariyarox/carbon-identity/milestones{/number}","notifications_url":"https://api.github.com/repos/thariyarox/carbon-identity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thariyarox/carbon-identity/labels{/name}","releases_url":"https://api.github.com/repos/thariyarox/carbon-identity/releases{/id}","created_at":"2014-12-18T05:20:37Z","updated_at":"2014-12-18T05:20:45Z","pushed_at":"2014-12-27T22:48:46Z","git_url":"git://github.com/thariyarox/carbon-identity.git","ssh_url":"git@github.com:thariyarox/carbon-identity.git","clone_url":"https://github.com/thariyarox/carbon-identity.git","svn_url":"https://github.com/thariyarox/carbon-identity","homepage":"","size":15678,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2-dev:master","ref":"master","sha":"045bc7f7d4483825d0f169f61cdd2e2a8ef89725","user":{"login":"wso2-dev","id":6744733,"avatar_url":"https://avatars.githubusercontent.com/u/6744733?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2-dev","html_url":"https://github.com/wso2-dev","followers_url":"https://api.github.com/users/wso2-dev/followers","following_url":"https://api.github.com/users/wso2-dev/following{/other_user}","gists_url":"https://api.github.com/users/wso2-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2-dev/subscriptions","organizations_url":"https://api.github.com/users/wso2-dev/orgs","repos_url":"https://api.github.com/users/wso2-dev/repos","events_url":"https://api.github.com/users/wso2-dev/events{/privacy}","received_events_url":"https://api.github.com/users/wso2-dev/received_events","type":"Organization","site_admin":false},"repo":{"id":20436898,"name":"carbon-identity","full_name":"wso2-dev/carbon-identity","owner":{"login":"wso2-dev","id":6744733,"avatar_url":"https://avatars.githubusercontent.com/u/6744733?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2-dev","html_url":"https://github.com/wso2-dev","followers_url":"https://api.github.com/users/wso2-dev/followers","following_url":"https://api.github.com/users/wso2-dev/following{/other_user}","gists_url":"https://api.github.com/users/wso2-dev/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2-dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2-dev/subscriptions","organizations_url":"https://api.github.com/users/wso2-dev/orgs","repos_url":"https://api.github.com/users/wso2-dev/repos","events_url":"https://api.github.com/users/wso2-dev/events{/privacy}","received_events_url":"https://api.github.com/users/wso2-dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2-dev/carbon-identity","description":"","fork":true,"url":"https://api.github.com/repos/wso2-dev/carbon-identity","forks_url":"https://api.github.com/repos/wso2-dev/carbon-identity/forks","keys_url":"https://api.github.com/repos/wso2-dev/carbon-identity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2-dev/carbon-identity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2-dev/carbon-identity/teams","hooks_url":"https://api.github.com/repos/wso2-dev/carbon-identity/hooks","issue_events_url":"https://api.github.com/repos/wso2-dev/carbon-identity/issues/events{/number}","events_url":"https://api.github.com/repos/wso2-dev/carbon-identity/events","assignees_url":"https://api.github.com/repos/wso2-dev/carbon-identity/assignees{/user}","branches_url":"https://api.github.com/repos/wso2-dev/carbon-identity/branches{/branch}","tags_url":"https://api.github.com/repos/wso2-dev/carbon-identity/tags","blobs_url":"https://api.github.com/repos/wso2-dev/carbon-identity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2-dev/carbon-identity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2-dev/carbon-identity/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2-dev/carbon-identity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2-dev/carbon-identity/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2-dev/carbon-identity/languages","stargazers_url":"https://api.github.com/repos/wso2-dev/carbon-identity/stargazers","contributors_url":"https://api.github.com/repos/wso2-dev/carbon-identity/contributors","subscribers_url":"https://api.github.com/repos/wso2-dev/carbon-identity/subscribers","subscription_url":"https://api.github.com/repos/wso2-dev/carbon-identity/subscription","commits_url":"https://api.github.com/repos/wso2-dev/carbon-identity/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2-dev/carbon-identity/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2-dev/carbon-identity/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2-dev/carbon-identity/issues/comments/{number}","contents_url":"https://api.github.com/repos/wso2-dev/carbon-identity/contents/{+path}","compare_url":"https://api.github.com/repos/wso2-dev/carbon-identity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2-dev/carbon-identity/merges","archive_url":"https://api.github.com/repos/wso2-dev/carbon-identity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2-dev/carbon-identity/downloads","issues_url":"https://api.github.com/repos/wso2-dev/carbon-identity/issues{/number}","pulls_url":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2-dev/carbon-identity/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2-dev/carbon-identity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2-dev/carbon-identity/labels{/name}","releases_url":"https://api.github.com/repos/wso2-dev/carbon-identity/releases{/id}","created_at":"2014-06-03T09:28:43Z","updated_at":"2014-12-17T05:33:15Z","pushed_at":"2014-12-17T05:33:15Z","git_url":"git://github.com/wso2-dev/carbon-identity.git","ssh_url":"git@github.com:wso2-dev/carbon-identity.git","clone_url":"https://github.com/wso2-dev/carbon-identity.git","svn_url":"https://github.com/wso2-dev/carbon-identity","homepage":"","size":17691,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":34,"mirror_url":null,"open_issues_count":19,"forks":34,"open_issues":19,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/52"},"html":{"href":"https://github.com/wso2-dev/carbon-identity/pull/52"},"issue":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/issues/52"},"comments":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/issues/52/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/52/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/pulls/52/commits"},"statuses":{"href":"https://api.github.com/repos/wso2-dev/carbon-identity/statuses/572553f95838961c55fd98febf8faba5d0c3174a"}}}}