Package org.wso2.carbon.user.core

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


        //Authenticate USER
        assertTrue(admin.authenticate("dimuthu", "credential"));
        assertFalse(admin.authenticate(null, "credential"));
        assertFalse(admin.authenticate("dimuthu",null));
        try{
          admin.authenticate("dimuthu", 123);
          fail("Exception at when Object credential is not an instance of String");
        }catch(Exception ex){
          //expected user
        }
View Full Code Here


          //expected user
        }

        //update by ADMIN
        admin.updateCredentialByAdmin("dimuthu", "topsecret");
        assertTrue(admin.authenticate("dimuthu", "topsecret"));

        //isExistingUser
        assertTrue(admin.isExistingUser("dimuthu"));
        assertFalse(admin.isExistingUser("muhaha"));
View Full Code Here

       
        // update by USER
        admin.updateCredential("dimuthu", "password", "topsecret");
        //assertTrue(admin.authenticate("dimuthu", "password")); //TO DO
        assertFalse(admin.authenticate("dimuthu", "credential"));
        try{
          admin.updateCredential("dimuthu", "password", "xxx");
          TestCase.assertTrue(false);
        }catch(Exception ex){
          //expected exception
View Full Code Here


        // delete
        admin.deleteUser("vajira");
        assertFalse(admin.isExistingUser("vajira"));
        assertFalse(admin.authenticate("vajira", "credential"));


        //delete ROLE
        admin.addUser("vajira", "credential", new String[] { "role1" }, userProps, null, false);
        assertTrue(admin.isExistingUser("vajira"));
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.