Package org.wso2.carbon.user.core

Examples of org.wso2.carbon.user.core.UserStoreManager.listUsers()


            throw new RegistryException("Error in retrieving AuthorizationManager.");
        }

        String[] users;
        try {
            users = userStoreManager2.listUsers("*", 10);
        } catch (UserStoreException e) {
            throw new RegistryException("Error in retrieving UserStoreManager.");
        }
        // check the existence of the user
        assertFalse("UserStore for tenant1 should not have user1t0",
View Full Code Here


    }

    public FlaggedName[] getUsersOfRole(String roleName, String filter) throws UserAdminException {
        try {
            UserStoreManager usMan = realm.getUserStoreManager();
            String[] userNames = usMan.listUsers(filter, -1);
            String[] usersOfRole = usMan.getUserListOfRole(roleName);
            Arrays.sort(usersOfRole);
            FlaggedName[] flaggedNames = new FlaggedName[userNames.length];
            for (int i = 0; i < userNames.length; i++) {
                FlaggedName fName = new FlaggedName();
View Full Code Here

        // update
        admin.updateCredential("dimuthu", "password", "topsecret");
        assertFalse(admin.authenticate("dimuthu", "credential"));
        assertTrue(admin.authenticate("dimuthu", "password"));

        String[] names = admin.listUsers("*", 100);
        assertEquals(3, names.length);

        String[] roleNames = admin.getRoleNames();
        assertEquals(4, roleNames.length);

View Full Code Here

          TestCase.assertTrue(false);
        }catch(Exception ex){
          //expected exception
        }
       
        String[] names = admin.listUsers("*", 100);
        assertEquals(3, names.length);
       
        String[] names1 = admin.listUsers("*", 0);
        assertEquals(0, names1.length);
       
View Full Code Here

        }
       
        String[] names = admin.listUsers("*", 100);
        assertEquals(3, names.length);
       
        String[] names1 = admin.listUsers("*", 0);
        assertEquals(0, names1.length);
       
        String[] names2 = admin.listUsers("*", 2);
        assertEquals(2, names2.length);
       
View Full Code Here

        assertEquals(3, names.length);
       
        String[] names1 = admin.listUsers("*", 0);
        assertEquals(0, names1.length);
       
        String[] names2 = admin.listUsers("*", 2);
        assertEquals(2, names2.length);
       
        String[] names3 = admin.listUsers("di?uthu", 100);
        assertEquals(1, names3.length);

View Full Code Here

        assertEquals(0, names1.length);
       
        String[] names2 = admin.listUsers("*", 2);
        assertEquals(2, names2.length);
       
        String[] names3 = admin.listUsers("di?uthu", 100);
        assertEquals(1, names3.length);

        String[] names4 = admin.listUsers("is?ru", 100);
        assertEquals(0, names4.length);
      
View Full Code Here

        assertEquals(2, names2.length);
       
        String[] names3 = admin.listUsers("di?uthu", 100);
        assertEquals(1, names3.length);

        String[] names4 = admin.listUsers("is?ru", 100);
        assertEquals(0, names4.length);
      
        String[] roleNames = admin.getRoleNames();
        assertEquals(4, roleNames.length);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.