diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java index b31f69e04ac..be642e53fa3 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAbstractIntegrationTest.java @@ -81,8 +81,6 @@ public class OAuth2ServiceAbstractIntegrationTest extends ISIntegrationTest { protected static final String EMAIL_CLAIM_URI = "http://wso2.org/claims/emailaddress"; private static final String GIVEN_NAME_CLAIM_URI = "http://wso2.org/claims/givenname"; protected static final String COUNTRY_CLAIM_URI = "http://wso2.org/claims/country"; - private static final String customClaimURI1 = "http://wso2.org/claims/challengeQuestion1"; - private static final String customClaimURI2 = "http://wso2.org/claims/challengeQuestion2"; private static final String GRANT_TYPE_PASSWORD = "password"; private static final String SCOPE_PRODUCTION = "PRODUCTION"; public static final String OIDC = "oidc"; @@ -355,12 +353,6 @@ private ClaimConfiguration getClaimConfigurations() { claimConfiguration.addClaimMappingsItem(getClaimMapping(COUNTRY_CLAIM_URI)); claimConfiguration.addRequestedClaimsItem(getRequestedClaim(COUNTRY_CLAIM_URI)); - claimConfiguration.addClaimMappingsItem(getClaimMapping(customClaimURI1)); - claimConfiguration.addRequestedClaimsItem(getRequestedClaim(customClaimURI1)); - - claimConfiguration.addClaimMappingsItem(getClaimMapping(customClaimURI2)); - claimConfiguration.addRequestedClaimsItem(getRequestedClaim(customClaimURI2)); - return claimConfiguration; } diff --git a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.java b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.java index 485f70104fd..875c20df138 100644 --- a/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.java +++ b/modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/identity/integration/test/oauth2/OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase.java @@ -47,8 +47,6 @@ import org.wso2.carbon.integration.common.utils.mgt.ServerConfigurationManager; import org.wso2.identity.integration.test.rest.api.server.application.management.v1.model.ApplicationResponseModel; import org.wso2.identity.integration.test.rest.api.server.application.management.v1.model.OpenIDConnectConfiguration; -import org.wso2.identity.integration.test.rest.api.server.challenge.v1.model.ServerChallengeModel.Questions; -import org.wso2.identity.integration.test.rest.api.server.challenge.v1.model.UserChallengeAnswer; import org.wso2.identity.integration.test.rest.api.server.claim.management.v1.model.ExternalClaimReq; import org.wso2.identity.integration.test.rest.api.user.common.model.Email; import org.wso2.identity.integration.test.rest.api.user.common.model.ListObject; @@ -57,7 +55,6 @@ import org.wso2.identity.integration.test.rest.api.user.common.model.RoleItemAddGroupobj; import org.wso2.identity.integration.test.rest.api.user.common.model.ScimSchemaExtensionEnterprise; import org.wso2.identity.integration.test.rest.api.user.common.model.UserObject; -import org.wso2.identity.integration.test.restclients.ChallengeQuestionsRestClient; import org.wso2.identity.integration.test.restclients.ClaimManagementRestClient; import org.wso2.identity.integration.test.restclients.SCIM2RestClient; import org.wso2.identity.integration.test.util.Utils; @@ -79,10 +76,6 @@ public class OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase extends OAuth public static final String ENCODED_OIDC_CLAIM_DIALECT = "aHR0cDovL3dzbzIub3JnL29pZGMvY2xhaW0"; private static final String USERS_PATH = "users"; - private static final String CHALLENGE_QUESTION_SET_ID1 = "challengeQuestion1"; - private static final String CHALLENGE_QUESTION_SET_ID2 = "challengeQuestion2"; - private static final String CHALLENGE_QUESTION_SET1_Q1 = "City where you were born ?"; - private static final String CHALLENGE_QUESTION_SET2_Q1 = "Model of your first car ?"; private static final String LOCALE = "en_US"; private ServerConfigurationManager serverConfigurationManager; @@ -104,8 +97,6 @@ public class OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase extends OAuth private static final String emailClaimURI = "http://wso2.org/claims/emailaddress"; private static final String givenNameClaimURI = "http://wso2.org/claims/givenname"; private static final String countryClaimURI = "http://wso2.org/claims/country"; - private static final String customClaimURI1 = "http://wso2.org/claims/challengeQuestion1"; - private static final String customClaimURI2 = "http://wso2.org/claims/challengeQuestion2"; private static final String externalClaimURI1 = "externalClaim1"; private static final String externalClaimURI2 = "externalClaim2"; private static final String USER_EMAIL = "abcrqo@wso2.com"; @@ -126,7 +117,6 @@ public class OAuth2ServiceAuthCodeGrantOpenIdRequestObjectTestCase extends OAuth private SCIM2RestClient scim2RestClient; private ClaimManagementRestClient claimManagementRestClient; - private ChallengeQuestionsRestClient challengeQuestionsRestClient; private String applicationId; private String userId; @@ -165,12 +155,9 @@ public void testInit() throws Exception { setSystemproperties(); scim2RestClient = new SCIM2RestClient(serverURL, tenantInfo); - challengeQuestionsRestClient = new ChallengeQuestionsRestClient(serverURL, tenantInfo); claimManagementRestClient = new ClaimManagementRestClient(serverURL, tenantInfo); addAdminUser(); - claimId1 = addOIDCClaims(externalClaimURI1, customClaimURI1); - claimId2 = addOIDCClaims(externalClaimURI2, customClaimURI2); } @@ -195,7 +182,6 @@ public void atEnd() throws Exception { restClient.closeHttpClient(); scim2RestClient.closeHttpClient(); claimManagementRestClient.closeHttpClient(); - challengeQuestionsRestClient.closeHttpClient(); client.close(); } @@ -448,16 +434,5 @@ private void addAdminUser() throws Exception { patchRoleItem.addValue(new ListObject().value(userId)); scim2RestClient.updateUserRole(new PatchOperationRequestObject().addOperations(patchRoleItem), roleId); - - setChallengeQuestion(CHALLENGE_QUESTION_SET_ID1, CHALLENGE_QUESTION_SET1_Q1, CUSTOM_CLAIM1); - setChallengeQuestion(CHALLENGE_QUESTION_SET_ID2, CHALLENGE_QUESTION_SET2_Q1, CUSTOM_CLAIM2); - } - - private void setChallengeQuestion(String questionSetId, String question, String answer) throws Exception { - UserChallengeAnswer challengeQuestionObj = new UserChallengeAnswer(); - challengeQuestionObj.setChallengeQuestion(new Questions(LOCALE, question, null)); - challengeQuestionObj.setAnswer(answer); - - challengeQuestionsRestClient.setChallengeQuestionAnswer(userId, questionSetId, challengeQuestionObj); } }