use of org.wso2.carbon.identity.test.integration.service.dao.AuthenticationResultDTO in project product-is by wso2.
the class AbstractUUIDUMTestCase method testAuthenticateWithIDUsernameClaim.
public void testAuthenticateWithIDUsernameClaim() throws Exception {
String usernameClaim = "http://wso2.org/claims/username";
AuthenticationResultDTO authenticationResultDTO = userMgtClient.authenticateWithIDUsernameClaim(usernameClaim, user1Username, credential1, defaultProfile);
Assert.assertNotNull(authenticationResultDTO);
Assert.assertEquals(authenticationResultDTO.getAuthenticationStatus(), "SUCCESS");
}
use of org.wso2.carbon.identity.test.integration.service.dao.AuthenticationResultDTO in project product-is by wso2.
the class AbstractUUIDUMTestCase method testUpdateCredentialByAdminWithID.
public void testUpdateCredentialByAdminWithID() throws Exception {
String newCredential = credential2;
userMgtClient.updateCredentialByAdminWithID(userId, newCredential);
AuthenticationResultDTO authenticationResultDTO = userMgtClient.authenticateWithIDUserId(userId, "PRIMARY", newCredential);
Assert.assertNotNull(authenticationResultDTO);
Assert.assertEquals(authenticationResultDTO.getAuthenticationStatus(), "SUCCESS");
// Revert again.
userMgtClient.updateCredentialByAdminWithID(userId, credential1);
}
use of org.wso2.carbon.identity.test.integration.service.dao.AuthenticationResultDTO in project product-is by wso2.
the class AbstractUUIDUMTestCase method testAuthenticateWithIDLoginIdentifier.
public void testAuthenticateWithIDLoginIdentifier() throws Exception {
LoginIdentifierDTO loginIdentifierDTO = new LoginIdentifierDTO();
loginIdentifierDTO.setLoginIdentifierType("CLAIM_URI");
loginIdentifierDTO.setLoginKey("http://wso2.org/claims/username");
loginIdentifierDTO.setLoginValue(user1Username);
loginIdentifierDTO.setProfileName(defaultProfile);
AuthenticationResultDTO authenticationResultDTO = userMgtClient.authenticateWithIDLoginIdentifier(new LoginIdentifierDTO[] { loginIdentifierDTO }, "PRIMARY", credential1);
Assert.assertNotNull(authenticationResultDTO);
}
use of org.wso2.carbon.identity.test.integration.service.dao.AuthenticationResultDTO in project product-is by wso2.
the class AbstractUUIDUMTestCase method testUpdateCredentialWithID.
public void testUpdateCredentialWithID() throws Exception {
AuthenticationResultDTO authenticationResultDTO = userMgtClient.authenticateWithIDUserId(userId, "PRIMARY", credential1);
Assert.assertNotNull(authenticationResultDTO);
Assert.assertEquals(authenticationResultDTO.getAuthenticationStatus(), "SUCCESS");
String newCredential = credential2;
userMgtClient.updateCredentialWithID(userId, newCredential, credential1);
authenticationResultDTO = userMgtClient.authenticateWithIDUserId(userId, "PRIMARY", newCredential);
Assert.assertNotNull(authenticationResultDTO);
Assert.assertEquals(authenticationResultDTO.getAuthenticationStatus(), "SUCCESS");
// Revert again.
userMgtClient.updateCredentialWithID(userId, credential1, newCredential);
}
use of org.wso2.carbon.identity.test.integration.service.dao.AuthenticationResultDTO in project product-is by wso2.
the class AbstractUUIDUMTestCase method testAuthenticateWithIDUserId.
public void testAuthenticateWithIDUserId() throws Exception {
AuthenticationResultDTO authenticationResultDTO = userMgtClient.authenticateWithIDUserId(userId, "PRIMARY", credential1);
Assert.assertNotNull(authenticationResultDTO);
Assert.assertEquals(authenticationResultDTO.getAuthenticationStatus(), "SUCCESS");
}
Aggregations