{"action":"created","comment":{"url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/comments/196036278","pull_request_review_id":129511358,"id":196036278,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NjAzNjI3OA==","diff_hunk":"@@ -0,0 +1,2559 @@\n+/*\n+ * Copyright (c) 2018, 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.mongodb.user.store.mgt;\n+\n+import java.security.SecureRandom;\n+import java.security.NoSuchAlgorithmException;\n+import java.security.MessageDigest;\n+import java.sql.Connection;\n+import java.sql.PreparedStatement;\n+import java.sql.ResultSet;\n+import java.sql.SQLException;\n+import java.util.HashMap;\n+import java.util.Map;\n+import java.util.ArrayList;\n+import java.util.Date;\n+import java.util.Iterator;\n+import java.util.List;\n+import java.util.Arrays;\n+import java.util.Set;\n+import java.util.Calendar;\n+import java.util.GregorianCalendar;\n+import java.util.Collections;\n+import java.util.LinkedList;\n+\n+import javax.sql.DataSource;\n+\n+import com.mongodb.DB;\n+import com.mongodb.DBCollection;\n+import com.mongodb.DBObject;\n+import com.mongodb.WriteResult;\n+import com.mongodb.DBCursor;\n+import com.mongodb.AggregationOutput;\n+import com.mongodb.BasicDBObject;\n+\n+import org.apache.commons.logging.Log;\n+import org.wso2.carbon.mongodb.query.MongoPreparedStatement;\n+import org.wso2.carbon.mongodb.query.MongoPreparedStatementImpl;\n+import org.apache.axiom.om.util.Base64;\n+import org.apache.commons.logging.LogFactory;\n+import org.json.JSONObject;\n+\n+import org.wso2.carbon.CarbonConstants;\n+import org.wso2.carbon.mongodb.user.store.mgt.caseinsensitive.MongoDBCaseInsensitiveConstants;\n+import org.wso2.carbon.mongodb.util.MongoDatabaseUtil;\n+import org.wso2.carbon.user.core.claim.ClaimManager;\n+import org.wso2.carbon.user.core.UserStoreException;\n+import org.wso2.carbon.user.core.UserRealm;\n+import org.wso2.carbon.user.core.common.AbstractUserStoreManager;\n+import org.wso2.carbon.user.core.common.RoleContext;\n+import org.wso2.carbon.user.core.hybrid.HybridJDBCConstants;\n+import org.wso2.carbon.user.core.UserCoreConstants;\n+import org.wso2.carbon.user.core.profile.ProfileConfigurationManager;\n+import org.wso2.carbon.user.api.Properties;\n+import org.wso2.carbon.user.api.Property;\n+import org.wso2.carbon.user.api.RealmConfiguration;\n+import org.wso2.carbon.user.core.jdbc.JDBCRoleContext;\n+import org.wso2.carbon.user.core.tenant.Tenant;\n+import org.wso2.carbon.mongodb.util.MongoDBRealmUtil;\n+import org.wso2.carbon.user.core.util.DatabaseUtil;\n+import org.wso2.carbon.user.core.util.UserCoreUtil;\n+import org.wso2.carbon.utils.Secret;\n+import org.wso2.carbon.utils.UnsupportedSecretTypeException;\n+import org.wso2.carbon.utils.multitenancy.MultitenantConstants;\n+import org.wso2.carbon.mongodb.query.MongoDBQueryException;\n+\n+/**\n+ * MongoDBUserStoreManager class for create MongoDBUserStore\n+ */\n+public class MongoDBUserStoreManager extends AbstractUserStoreManager {\n+\n+    private static final String CASE_INSENSITIVE_USERNAME = \"CaseInsensitiveUsername\";\n+    private static DataSource dataSourceLocal = null;\n+    private final Log log = LogFactory.getLog(MongoDBUserStoreManager.class);\n+    private DB db;\n+    private SecureRandom random = new SecureRandom();\n+\n+    /**\n+     * Empty Constructor\n+     */\n+    public MongoDBUserStoreManager() {\n+    }\n+\n+    /**\n+     * Constructor which accept two parameters\n+     *\n+     * @param configuration RealmConfiguration to user store\n+     * @param tenantId      currently logged in tenantId\n+     */\n+    public MongoDBUserStoreManager(RealmConfiguration configuration, int tenantId) {\n+        this.realmConfig = configuration;\n+        this.tenantId = tenantId;\n+        realmConfig.setUserStoreProperties(MongoDBRealmUtil.getMongoProperties(realmConfig.getUserStoreProperties()));\n+        if (realmConfig.getUserStoreProperty(UserCoreConstants.RealmConfig.READ_GROUPS_ENABLED) != null) {\n+            readGroupsEnabled = Boolean.parseBoolean(\n+                    realmConfig.getUserStoreProperty(UserCoreConstants.RealmConfig.READ_GROUPS_ENABLED));\n+        }\n+\n+        if (realmConfig.getUserStoreProperty(UserCoreConstants.RealmConfig.WRITE_GROUPS_ENABLED) != null) {\n+            writeGroupsEnabled = Boolean.parseBoolean(\n+                    realmConfig.getUserStoreProperty(UserCoreConstants.RealmConfig.WRITE_GROUPS_ENABLED));\n+        } else {\n+            if (!isReadOnly()) {\n+                writeGroupsEnabled = true;\n+            }\n+        }\n+\n+        if (writeGroupsEnabled) {\n+            readGroupsEnabled = true;\n+        }\n+        // Initialize user role cache\n+        initUserRolesCache();\n+    }\n+\n+    /**\n+     * Constructor with four arguments\n+     *\n+     * @param db          data source of user store\n+     * @param realmConfig realm configuration\n+     * @param tenantId    currently logged in tenantID\n+     * @param addInitData boolean status to filter whether initial data add or not to user store\n+     */\n+    public MongoDBUserStoreManager(DB db, RealmConfiguration realmConfig, int tenantId, boolean addInitData)\n+            throws UserStoreException {\n+\n+        this(realmConfig, tenantId);\n+        this.db = db;\n+        this.dataSource = dataSourceLocal;\n+\n+        if (db == null) {\n+            db = MongoDatabaseUtil.getRealmDataSource(realmConfig);\n+        }\n+        if (dataSource == null) {\n+            dataSource = DatabaseUtil.getRealmDataSource(realmConfig);\n+        }\n+        if (db == null || dataSource == null) {\n+            throw new UserStoreException(\"User management data source is null\");\n+        }\n+        doInitialSetup();\n+        this.persistDomain();\n+\n+        // Required to add the initial admin data for primary user stores\n+        if (addInitData && realmConfig.isPrimary()) {\n+            addInitialAdminData(Boolean.parseBoolean(realmConfig.getAddAdmin()), !isInitSetupDone());\n+        }\n+    }\n+\n+    /**\n+     * Constructor with two parameters\n+     *\n+     * @param db          mongodb data source\n+     * @param realmConfig realm configuration\n+     */\n+    public MongoDBUserStoreManager(DB db, RealmConfiguration realmConfig) {\n+        this(realmConfig, MultitenantConstants.SUPER_TENANT_ID);\n+        realmConfig.setUserStoreProperties(MongoDBRealmUtil.getMongoProperties(realmConfig.getUserStoreProperties()));\n+        this.db = db;\n+    }\n+\n+    /**\n+     * constructor with  6 parameters\n+     *\n+     * @param realmConfig    realm configuration\n+     * @param properties     realm properties\n+     * @param claimManager   claim manager details\n+     * @param profileManager Profile Configuration Manager instance\n+     * @param realm          User Realm instance\n+     * @param tenantId       currently logged in tenantId\n+     */\n+    public MongoDBUserStoreManager(RealmConfiguration realmConfig, Map<String, Object> properties,\n+                                   ClaimManager claimManager, ProfileConfigurationManager profileManager,\n+                                   UserRealm realm, Integer tenantId) throws UserStoreException {\n+        this(realmConfig, properties, claimManager, profileManager, realm, tenantId, false);\n+    }\n+\n+    /**\n+     * Constructor with seven parameters\n+     *\n+     * @param realmConfig    realm configuration\n+     * @param properties     realm properties\n+     * @param claimManager   claim manager details\n+     * @param profileManager Profile Configuration Manager instance\n+     * @param realm          User Realm instance\n+     * @param tenantId       currently logged in tenantId\n+     * @param skipInitData   boolean status to check whether to skip initial data or not\n+     */\n+    public MongoDBUserStoreManager(RealmConfiguration realmConfig, Map<String, Object> properties,\n+                                   ClaimManager claimManager, ProfileConfigurationManager profileManager,\n+                                   UserRealm realm, Integer tenantId, boolean skipInitData) throws UserStoreException {\n+\n+        this(realmConfig, tenantId);\n+        this.claimManager = claimManager;\n+        this.userRealm = realm;\n+\n+        if (log.isDebugEnabled()) {\n+            log.debug(\"value of profileManager: \" + profileManager);\n+            log.debug(\"value of skipInitData: \" + skipInitData);\n+        }\n+        try {\n+            db = loadUserStoreSpecificDataSource();\n+            if (db == null) {\n+                db = (DB) properties.get(UserCoreConstants.DATA_SOURCE);\n+            }\n+            if (db == null) {\n+                db = MongoDatabaseUtil.getRealmDataSource(realmConfig);\n+                properties.put(UserCoreConstants.DATA_SOURCE, db);\n+            }\n+        } catch (UserStoreException e) {\n+            log.error(\"Failed to load the data source\", e);\n+        }\n+\n+        dataSource = (DataSource) properties.get(UserCoreConstants.DATA_SOURCE);\n+        if (dataSource == null) {\n+            dataSource = DatabaseUtil.getRealmDataSource(realmConfig);\n+        }\n+        if (dataSource == null) {\n+            throw new UserStoreException(\"User management data source is null\");\n+        }\n+        properties.put(UserCoreConstants.DATA_SOURCE, dataSource);\n+        realmConfig.setUserStoreProperties(MongoDBRealmUtil.getMongoProperties(realmConfig.getUserStoreProperties()));\n+\n+        this.persistDomain();\n+        doInitialSetup();\n+        if (!skipInitData && realmConfig.isPrimary()) {\n+            addInitialAdminData(Boolean.parseBoolean(realmConfig.getAddAdmin()), !isInitSetupDone());\n+        }\n+        // Initialize user roles cache\n+        initUserRolesCache();\n+    }\n+\n+    public static void setDBDataSource(DataSource source) {\n+        dataSourceLocal = source;\n+    }\n+\n+    /**\n+     * Get all user properties belong to provided user profile\n+     *\n+     * @param userName      username of user\n+     * @param propertyNames names of properties to get\n+     * @param profileName   profile name of user\n+     * @return map object of properties\n+     */\n+    protected Map<String, String> getUserPropertyValues(String userName, String[] propertyNames, String profileName)\n+            throws UserStoreException {\n+\n+        if (profileName == null) {\n+            profileName = UserCoreConstants.DEFAULT_PROFILE;\n+        }\n+        MongoPreparedStatement prepStmt = null;\n+        String[] propertyNamesSorted = propertyNames.clone();\n+        Arrays.sort(propertyNamesSorted);\n+        Map<String, String> map = new HashMap<>();\n+\n+        try {\n+            if (db == null) {\n+                db = loadUserStoreSpecificDataSource();\n+            }\n+            String mongoQuery = realmConfig.getUserStoreProperty(MongoDBRealmConstants.GET_PROPS_FOR_PROFILE);\n+            prepStmt = new MongoPreparedStatementImpl(db, mongoQuery);\n+            prepStmt.setString(\"users.UM_USER_NAME\", userName);\n+            prepStmt.setString(\"UM_PROFILE_NAME\", profileName);\n+\n+            if (mongoQuery.contains(UserCoreConstants.UM_TENANT_COLUMN)) {\n+                prepStmt.setInt(\"users.UM_TENANT_ID\", tenantId);\n+                prepStmt.setInt(\"UM_TENANT_ID\", tenantId);\n+            }\n+            //noinspection deprecation\n+            AggregationOutput aggregationOutput = prepStmt.aggregate();\n+            Iterable<DBObject> results = aggregationOutput.results();\n+            for (DBObject object : results) {\n+                object.removeField(\"_id\");\n+                object.removeField(\"users\");\n+                Set<String> keys = object.keySet();\n+                for (String key : keys) {\n+                    String value = object.get(key).toString();\n+                    if (Arrays.binarySearch(propertyNamesSorted, key) < 0) {\n+                        continue;\n+                    }\n+                    map.put(key, value);\n+                }\n+            }\n+        } catch (UserStoreException e) {\n+            throw new UserStoreException(\"Failed to get the user property values\", e);","path":"src/main/java/org/wso2/carbon/mongodb/user/store/mgt/MongoDBUserStoreManager.java","position":298,"original_position":298,"commit_id":"5bf98f58c364509e9dd7e6517373be77567c9a63","original_commit_id":"5bf98f58c364509e9dd7e6517373be77567c9a63","user":{"login":"Megala21","id":4003116,"node_id":"MDQ6VXNlcjQwMDMxMTY=","avatar_url":"https://avatars3.githubusercontent.com/u/4003116?v=4","gravatar_id":"","url":"https://api.github.com/users/Megala21","html_url":"https://github.com/Megala21","followers_url":"https://api.github.com/users/Megala21/followers","following_url":"https://api.github.com/users/Megala21/following{/other_user}","gists_url":"https://api.github.com/users/Megala21/gists{/gist_id}","starred_url":"https://api.github.com/users/Megala21/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Megala21/subscriptions","organizations_url":"https://api.github.com/users/Megala21/orgs","repos_url":"https://api.github.com/users/Megala21/repos","events_url":"https://api.github.com/users/Megala21/events{/privacy}","received_events_url":"https://api.github.com/users/Megala21/received_events","type":"User","site_admin":false},"body":"Why are we catching and throwing the same exception again?","created_at":"2018-06-18T10:52:48Z","updated_at":"2018-06-18T10:59:16Z","html_url":"https://github.com/wso2-extensions/identity-userstore-mongodb/pull/2#discussion_r196036278","pull_request_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/2","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/comments/196036278"},"html":{"href":"https://github.com/wso2-extensions/identity-userstore-mongodb/pull/2#discussion_r196036278"},"pull_request":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/2","id":194576869,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0NTc2ODY5","html_url":"https://github.com/wso2-extensions/identity-userstore-mongodb/pull/2","diff_url":"https://github.com/wso2-extensions/identity-userstore-mongodb/pull/2.diff","patch_url":"https://github.com/wso2-extensions/identity-userstore-mongodb/pull/2.patch","issue_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/issues/2","number":2,"state":"open","locked":false,"title":" Adding MongoDB user store extension for Product-IS","user":{"login":"pranavan15","id":15685415,"node_id":"MDQ6VXNlcjE1Njg1NDE1","avatar_url":"https://avatars0.githubusercontent.com/u/15685415?v=4","gravatar_id":"","url":"https://api.github.com/users/pranavan15","html_url":"https://github.com/pranavan15","followers_url":"https://api.github.com/users/pranavan15/followers","following_url":"https://api.github.com/users/pranavan15/following{/other_user}","gists_url":"https://api.github.com/users/pranavan15/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavan15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavan15/subscriptions","organizations_url":"https://api.github.com/users/pranavan15/orgs","repos_url":"https://api.github.com/users/pranavan15/repos","events_url":"https://api.github.com/users/pranavan15/events{/privacy}","received_events_url":"https://api.github.com/users/pranavan15/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-06-13T12:55:56Z","updated_at":"2018-06-18T10:59:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"56811a7b07ecd3fe20c338afcbe3e59010b4b4ed","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/2/commits","review_comments_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/2/comments","review_comment_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/issues/2/comments","statuses_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/statuses/5bf98f58c364509e9dd7e6517373be77567c9a63","head":{"label":"pranavan15:master","ref":"master","sha":"5bf98f58c364509e9dd7e6517373be77567c9a63","user":{"login":"pranavan15","id":15685415,"node_id":"MDQ6VXNlcjE1Njg1NDE1","avatar_url":"https://avatars0.githubusercontent.com/u/15685415?v=4","gravatar_id":"","url":"https://api.github.com/users/pranavan15","html_url":"https://github.com/pranavan15","followers_url":"https://api.github.com/users/pranavan15/followers","following_url":"https://api.github.com/users/pranavan15/following{/other_user}","gists_url":"https://api.github.com/users/pranavan15/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavan15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavan15/subscriptions","organizations_url":"https://api.github.com/users/pranavan15/orgs","repos_url":"https://api.github.com/users/pranavan15/repos","events_url":"https://api.github.com/users/pranavan15/events{/privacy}","received_events_url":"https://api.github.com/users/pranavan15/received_events","type":"User","site_admin":false},"repo":{"id":137205349,"node_id":"MDEwOlJlcG9zaXRvcnkxMzcyMDUzNDk=","name":"identity-userstore-mongodb","full_name":"pranavan15/identity-userstore-mongodb","owner":{"login":"pranavan15","id":15685415,"node_id":"MDQ6VXNlcjE1Njg1NDE1","avatar_url":"https://avatars0.githubusercontent.com/u/15685415?v=4","gravatar_id":"","url":"https://api.github.com/users/pranavan15","html_url":"https://github.com/pranavan15","followers_url":"https://api.github.com/users/pranavan15/followers","following_url":"https://api.github.com/users/pranavan15/following{/other_user}","gists_url":"https://api.github.com/users/pranavan15/gists{/gist_id}","starred_url":"https://api.github.com/users/pranavan15/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pranavan15/subscriptions","organizations_url":"https://api.github.com/users/pranavan15/orgs","repos_url":"https://api.github.com/users/pranavan15/repos","events_url":"https://api.github.com/users/pranavan15/events{/privacy}","received_events_url":"https://api.github.com/users/pranavan15/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pranavan15/identity-userstore-mongodb","description":null,"fork":true,"url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb","forks_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/forks","keys_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/teams","hooks_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/hooks","issue_events_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/issues/events{/number}","events_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/events","assignees_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/assignees{/user}","branches_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/branches{/branch}","tags_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/tags","blobs_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/statuses/{sha}","languages_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/languages","stargazers_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/stargazers","contributors_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/contributors","subscribers_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/subscribers","subscription_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/subscription","commits_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/contents/{+path}","compare_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/merges","archive_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/downloads","issues_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/issues{/number}","pulls_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/pulls{/number}","milestones_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/milestones{/number}","notifications_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/labels{/name}","releases_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/releases{/id}","deployments_url":"https://api.github.com/repos/pranavan15/identity-userstore-mongodb/deployments","created_at":"2018-06-13T11:18:51Z","updated_at":"2018-06-18T08:56:46Z","pushed_at":"2018-06-18T08:56:44Z","git_url":"git://github.com/pranavan15/identity-userstore-mongodb.git","ssh_url":"git@github.com:pranavan15/identity-userstore-mongodb.git","clone_url":"https://github.com/pranavan15/identity-userstore-mongodb.git","svn_url":"https://github.com/pranavan15/identity-userstore-mongodb","homepage":null,"size":69,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2-extensions:master","ref":"master","sha":"f7d33350cdc7c0378ebbcb562af80425e7d034a6","user":{"login":"wso2-extensions","id":17171218,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTcxMjE4","avatar_url":"https://avatars0.githubusercontent.com/u/17171218?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2-extensions","html_url":"https://github.com/wso2-extensions","followers_url":"https://api.github.com/users/wso2-extensions/followers","following_url":"https://api.github.com/users/wso2-extensions/following{/other_user}","gists_url":"https://api.github.com/users/wso2-extensions/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2-extensions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2-extensions/subscriptions","organizations_url":"https://api.github.com/users/wso2-extensions/orgs","repos_url":"https://api.github.com/users/wso2-extensions/repos","events_url":"https://api.github.com/users/wso2-extensions/events{/privacy}","received_events_url":"https://api.github.com/users/wso2-extensions/received_events","type":"Organization","site_admin":false},"repo":{"id":65791651,"node_id":"MDEwOlJlcG9zaXRvcnk2NTc5MTY1MQ==","name":"identity-userstore-mongodb","full_name":"wso2-extensions/identity-userstore-mongodb","owner":{"login":"wso2-extensions","id":17171218,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE3MTcxMjE4","avatar_url":"https://avatars0.githubusercontent.com/u/17171218?v=4","gravatar_id":"","url":"https://api.github.com/users/wso2-extensions","html_url":"https://github.com/wso2-extensions","followers_url":"https://api.github.com/users/wso2-extensions/followers","following_url":"https://api.github.com/users/wso2-extensions/following{/other_user}","gists_url":"https://api.github.com/users/wso2-extensions/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2-extensions/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2-extensions/subscriptions","organizations_url":"https://api.github.com/users/wso2-extensions/orgs","repos_url":"https://api.github.com/users/wso2-extensions/repos","events_url":"https://api.github.com/users/wso2-extensions/events{/privacy}","received_events_url":"https://api.github.com/users/wso2-extensions/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2-extensions/identity-userstore-mongodb","description":null,"fork":false,"url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb","forks_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/forks","keys_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/teams","hooks_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/hooks","issue_events_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/issues/events{/number}","events_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/events","assignees_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/assignees{/user}","branches_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/branches{/branch}","tags_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/tags","blobs_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/languages","stargazers_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/stargazers","contributors_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/contributors","subscribers_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/subscribers","subscription_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/subscription","commits_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/contents/{+path}","compare_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/merges","archive_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/downloads","issues_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/issues{/number}","pulls_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/labels{/name}","releases_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/releases{/id}","deployments_url":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/deployments","created_at":"2016-08-16T05:58:56Z","updated_at":"2016-08-16T05:58:56Z","pushed_at":"2018-06-18T08:56:45Z","git_url":"git://github.com/wso2-extensions/identity-userstore-mongodb.git","ssh_url":"git@github.com:wso2-extensions/identity-userstore-mongodb.git","clone_url":"https://github.com/wso2-extensions/identity-userstore-mongodb.git","svn_url":"https://github.com/wso2-extensions/identity-userstore-mongodb","homepage":null,"size":6,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":2,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/2"},"html":{"href":"https://github.com/wso2-extensions/identity-userstore-mongodb/pull/2"},"issue":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/issues/2"},"comments":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/wso2-extensions/identity-userstore-mongodb/statuses/5bf98f58c364509e9dd7e6517373be77567c9a63"}},"author_association":"NONE"}}
{"actor":{"display_login":"Megala21"}}