Search in sources :

Example 66 with UserDTO

use of org.wso2.carbon.identity.test.integration.service.stub.UserDTO in project identity-governance by wso2-extensions.

the class ResendCodeApiServiceImplTest method emptyResendCodeRequestDTO.

private ResendCodeRequestDTO emptyResendCodeRequestDTO() {
    ResendCodeRequestDTO resendCodeRequestDTO = new ResendCodeRequestDTO();
    UserDTO userDTO = new UserDTO();
    resendCodeRequestDTO.setUser(userDTO);
    List<PropertyDTO> listProperty = new ArrayList<>();
    resendCodeRequestDTO.setProperties(listProperty);
    return resendCodeRequestDTO;
}
Also used : UserDTO(org.wso2.carbon.identity.user.endpoint.dto.UserDTO) ArrayList(java.util.ArrayList) ResendCodeRequestDTO(org.wso2.carbon.identity.user.endpoint.dto.ResendCodeRequestDTO) PropertyDTO(org.wso2.carbon.identity.user.endpoint.dto.PropertyDTO)

Example 67 with UserDTO

use of org.wso2.carbon.identity.test.integration.service.stub.UserDTO in project product-is by wso2.

the class UserStoreConfigAdminServiceClient method createUserStoreDTO.

/**
 * Create UserDTO to simulate UI call
 *
 * @param className
 * @param domainId
 * @param properties
 * @return
 */
public UserStoreDTO createUserStoreDTO(String className, String domainId, PropertyDTO[] properties) {
    UserStoreDTO userStoreDTO = new UserStoreDTO();
    userStoreDTO.setClassName(className);
    userStoreDTO.setDomainId(domainId);
    userStoreDTO.setProperties(properties);
    return userStoreDTO;
}
Also used : UserStoreDTO(org.wso2.carbon.identity.user.store.configuration.stub.dto.UserStoreDTO)

Example 68 with UserDTO

use of org.wso2.carbon.identity.test.integration.service.stub.UserDTO in project product-is by wso2.

the class AbstractUUIDUMTestCase method testAddRemoveUsersOfRole.

public void testAddRemoveUsersOfRole() throws Exception {
    UserDTO userDTO = userMgtClient.addUserWithID(user2Username, credential2, new String[0], new ClaimValue[0], defaultProfile);
    userMgtClient.addRoleWithID(role3name, new String[] { userDTO.getUserID() }, new PermissionDTO[] {}, false);
    String[] newUsers = new String[] { userDTO.getUserID() };
    String[] deletedUsers = new String[] { userId };
    userMgtClient.updateUserListOfRoleWithID(role3name, newUsers, deletedUsers);
    Assert.assertTrue(userNameExists(userMgtClient.getUserListOfRoleWithID(role3name), user1Username), "Getting user added to umRole3 role failed");
    Assert.assertFalse(userNameExists(userMgtClient.getUserListOfRoleWithID(role3name), user2Username), "User user2 still exists in the umRole3 role");
    // Clean up the modified users of role and test it.
    userMgtClient.updateUserListOfRoleWithID(role3name, deletedUsers, newUsers);
    Assert.assertTrue(userNameExists(userMgtClient.getUserListOfRoleWithID(role3name), user2Username), "Getting user added to umRole3 role failed");
    Assert.assertFalse(userNameExists(userMgtClient.getUserListOfRoleWithID(role3name), user1Username), "User user1 still exists in the umRole3 role");
}
Also used : UserDTO(org.wso2.carbon.identity.test.integration.service.stub.UserDTO)

Example 69 with UserDTO

use of org.wso2.carbon.identity.test.integration.service.stub.UserDTO in project product-is by wso2.

the class AbstractUUIDUMTestCase method testAddUser.

public void testAddUser() throws Exception {
    UserDTO userDTO = userMgtClient.addUserWithID(user1Username, credential1, new String[0], new ClaimValue[0], defaultProfile);
    this.userId = userDTO.getUserID();
    Assert.assertNotNull(userDTO);
}
Also used : UserDTO(org.wso2.carbon.identity.test.integration.service.stub.UserDTO)

Example 70 with UserDTO

use of org.wso2.carbon.identity.test.integration.service.stub.UserDTO in project product-is by wso2.

the class UUIDUserStoreManagerService method getUserDTOListFromUser.

private UserDTO[] getUserDTOListFromUser(List<User> userListWithID) {
    UserDTO[] userDTOS = new UserDTO[userListWithID.size()];
    int i = 0;
    for (User user : userListWithID) {
        userDTOS[i] = getUserDTO(user);
        i++;
    }
    return userDTOS;
}
Also used : User(org.wso2.carbon.user.core.common.User) UserDTO(org.wso2.carbon.identity.test.integration.service.dao.UserDTO)

Aggregations

IdentityException (org.wso2.carbon.identity.base.IdentityException)23 UserDTO (org.wso2.carbon.identity.mgt.dto.UserDTO)22 VerificationBean (org.wso2.carbon.identity.mgt.beans.VerificationBean)19 RecoveryProcessor (org.wso2.carbon.identity.mgt.RecoveryProcessor)17 UserStoreException (org.wso2.carbon.user.api.UserStoreException)17 IdentityMgtServiceException (org.wso2.carbon.identity.mgt.IdentityMgtServiceException)14 PrivilegedCarbonContext (org.wso2.carbon.context.PrivilegedCarbonContext)12 Test (org.testng.annotations.Test)10 UserDTO (org.wso2.carbon.identity.user.rename.core.dto.UserDTO)10 UserRecoveryDTO (org.wso2.carbon.identity.mgt.dto.UserRecoveryDTO)9 UserStoreManager (org.wso2.carbon.user.api.UserStoreManager)9 RealmService (org.wso2.carbon.user.core.service.RealmService)9 TenantManager (org.wso2.carbon.user.core.tenant.TenantManager)8 UserDTO (org.wso2.carbon.identity.test.integration.service.stub.UserDTO)7 UserDTO (org.wso2.carbon.identity.user.endpoint.dto.UserDTO)6 NotificationDataDTO (org.wso2.carbon.identity.mgt.dto.NotificationDataDTO)5 UserChallengesDTO (org.wso2.carbon.identity.mgt.dto.UserChallengesDTO)4 User (org.wso2.carbon.apimgt.core.models.User)3 User (org.wso2.carbon.identity.application.common.model.User)3 ChallengeQuestionProcessor (org.wso2.carbon.identity.mgt.ChallengeQuestionProcessor)3