Search in sources :

Example 1 with AuthenticationResultDTO

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");
}
Also used : AuthenticationResultDTO(org.wso2.carbon.identity.test.integration.service.stub.AuthenticationResultDTO)

Example 2 with AuthenticationResultDTO

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);
}
Also used : AuthenticationResultDTO(org.wso2.carbon.identity.test.integration.service.stub.AuthenticationResultDTO)

Example 3 with AuthenticationResultDTO

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);
}
Also used : AuthenticationResultDTO(org.wso2.carbon.identity.test.integration.service.stub.AuthenticationResultDTO) LoginIdentifierDTO(org.wso2.carbon.identity.test.integration.service.stub.LoginIdentifierDTO)

Example 4 with 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);
}
Also used : AuthenticationResultDTO(org.wso2.carbon.identity.test.integration.service.stub.AuthenticationResultDTO)

Example 5 with AuthenticationResultDTO

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");
}
Also used : AuthenticationResultDTO(org.wso2.carbon.identity.test.integration.service.stub.AuthenticationResultDTO)

Aggregations

AuthenticationResultDTO (org.wso2.carbon.identity.test.integration.service.stub.AuthenticationResultDTO)5 AuthenticationResultDTO (org.wso2.carbon.identity.test.integration.service.dao.AuthenticationResultDTO)1 LoginIdentifierDTO (org.wso2.carbon.identity.test.integration.service.stub.LoginIdentifierDTO)1 FailureReason (org.wso2.carbon.user.core.common.FailureReason)1 User (org.wso2.carbon.user.core.common.User)1