diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/pom.xml b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/pom.xml deleted file mode 100644 index dfe737f052..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/pom.xml +++ /dev/null @@ -1,116 +0,0 @@ - - - - - - org.wso2.carbon.identity.api.server.challenge - org.wso2.carbon.identity.server.api - ../pom.xml - 1.2.118-SNAPSHOT - - 4.0.0 - org.wso2.carbon.identity.api.server.challenge.common - jar - - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - - - - - org.apache.cxf - cxf-rt-frontend-jaxrs - provided - - - org.apache.cxf - cxf-rt-rs-service-description - provided - - - org.springframework - spring-web - provided - - - javax.ws.rs - javax.ws.rs-api - provided - - - io.swagger - swagger-jaxrs - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - javax.ws.rs - jsr311-api - - - com.google.guava - guava - - - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - provided - - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.api.server.common - provided - - - org.wso2.carbon.identity.governance - org.wso2.carbon.identity.recovery - provided - - - javax.ws.rs - jsr311-api - - - - - diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/ChallengeConstant.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/ChallengeConstant.java deleted file mode 100644 index e8a39039d2..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/ChallengeConstant.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.api.server.challenge.common; - -/** - * Contains all the server challenge management related constants. - */ -public class ChallengeConstant { - - public static final String CHALLENGE_QUESTION_PREFIX = "CQM-"; - public static final String CHALLENGES_PATH_COMPONENT = "/challenges"; - public static final String CHALLENGE_QUESTION_SET_PATH_COMPONENT = CHALLENGES_PATH_COMPONENT + - "/%s"; - - /** - * Enum for server challenge management related errors in the format of - * Error Code - code to identify the error - * Error Message - What went wrong - * Error Description - Why it went wrong - */ - public enum ErrorMessage { - - ERROR_CODE_ERROR_RETRIVING_CHALLENGE("50002", - "Unable to get the challenge.", - "Server encountered an error while retrieving the challenge."), - ERROR_CODE_ERROR_RETRIVING_CHALLENGES("50003", - "Unable to get the challenges.", - "Server encountered an error while retrieving challenges."), - ERROR_CODE_ERROR_ADDING_CHALLENGES("50004", - "Unable to add challenge set.", - "Server encountered an error while setting answers to the user challenges."), - ERROR_CODE_ERROR_UPDATING_CHALLENGE_SET("50005", - "Unable to update challenge set.", - "Server encountered an error while updating the challenge set."), - ERROR_CODE_ERROR_ADDING_CHALLENGE_QUESTION_TO_A_SET("50006", - "Unable to add a new challenge question.", - "Server encountered an error while adding a new question to the set."), - ERROR_CODE_ERROR_DELETING_CHALLENGES("50007", - "Unable to remove challenges.", - "Server encountered an error while removing the challenge set."), - ERROR_CODE_ERROR_DELETING_CHALLENGE("50008", - "Unable to remove challenge question.", - "Server encountered an error while removing the challenge question."), - ERROR_CODE_ERROR_OPERATION_NOT_SUPPORTED("50009", - "Patch operation not supported.", - "Operation is not supported on the challenge set patch API."), - ERROR_CHALLENGE_SET_NOT_EXISTS("500010", - "Challenge set does not exists.", - "Specified challenge does not exist in the system, hence unable to proceed."); - - private final String code; - private final String message; - private final String description; - - ErrorMessage(String code, String message, String description) { - this.code = code; - this.message = message; - this.description = description; - } - - public String getCode() { - return ChallengeConstant.CHALLENGE_QUESTION_PREFIX + code; - } - - public String getMessage() { - return message; - } - - public String getDescription() { - return description; - } - - @Override - public String toString() { - return code + " | " + message; - } - - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/ChallengeQuestionDataHolder.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/ChallengeQuestionDataHolder.java deleted file mode 100644 index 53106619cb..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/ChallengeQuestionDataHolder.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.api.server.challenge.common; - -import org.wso2.carbon.identity.recovery.ChallengeQuestionManager; - -/** - * Service holder class for identity governance. - */ -public class ChallengeQuestionDataHolder { - - private static ChallengeQuestionManager challengeQuestionManager; - - public static ChallengeQuestionManager getChallengeQuestionManager() { - - return challengeQuestionManager; - } - - public static void setChallengeQuestionManager(ChallengeQuestionManager challengeQuestionManager) { - - ChallengeQuestionDataHolder.challengeQuestionManager = challengeQuestionManager; - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/factory/OSGIServiceFactory.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/factory/OSGIServiceFactory.java deleted file mode 100644 index c3207338c3..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.api.server.challenge.common/src/main/java/org/wso2/carbon/identity/api/server/challenge/common/factory/OSGIServiceFactory.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.api.server.challenge.common.factory; - -import org.springframework.beans.factory.config.AbstractFactoryBean; -import org.wso2.carbon.context.PrivilegedCarbonContext; -import org.wso2.carbon.identity.recovery.ChallengeQuestionManager; - -/** - * Factory Beans serves as a factory for creating other beans within the IOC container. This factory bean is used to - * instantiate the IdentityGovernanceService type of object inside the container. - */ -public class OSGIServiceFactory extends AbstractFactoryBean { - - private ChallengeQuestionManager challengeQuestionManager; - - @Override - public Class getObjectType() { - - return Object.class; - } - - @Override - protected ChallengeQuestionManager createInstance() throws Exception { - - if (this.challengeQuestionManager == null) { - ChallengeQuestionManager challengeQuestionManager = (ChallengeQuestionManager) - PrivilegedCarbonContext.getThreadLocalCarbonContext() - .getOSGiService(ChallengeQuestionManager.class, null); - if (challengeQuestionManager != null) { - this.challengeQuestionManager = challengeQuestionManager; - } else { - throw new Exception("Unable to retrieve ChallengeQuestionManager service."); - } - } - return this.challengeQuestionManager; - } - -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/pom.xml b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/pom.xml deleted file mode 100644 index 717be19f74..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/pom.xml +++ /dev/null @@ -1,152 +0,0 @@ - - - - - - - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.api.server.challenge - ../pom.xml - 1.2.118-SNAPSHOT - - 4.0.0 - org.wso2.carbon.identity.rest.api.server.challenge.v1 - jar - WSO2 Identity Server - Challenges Rest API - WSO2 Identity Server - Challenges Rest API - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - 1.8 - - - add-source - generate-sources - - add-source - - - - src/gen/java - - - - - - - - - - - org.apache.cxf - cxf-rt-frontend-jaxrs - provided - - - org.apache.cxf - cxf-rt-rs-service-description - provided - - - org.springframework - spring-web - provided - - - javax.ws.rs - javax.ws.rs-api - provided - - - io.swagger - swagger-jaxrs - - - com.fasterxml.jackson.core - jackson-databind - - - com.fasterxml.jackson.core - jackson-annotations - - - com.fasterxml.jackson.core - jackson-core - - - com.fasterxml.jackson.dataformat - jackson-dataformat-yaml - - - javax.ws.rs - jsr311-api - - - com.google.guava - guava - - - - - com.fasterxml.jackson.jaxrs - jackson-jaxrs-json-provider - provided - - - org.wso2.carbon.identity.governance - org.wso2.carbon.identity.recovery - provided - - - javax.ws.rs - jsr311-api - - - - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.api.server.common - provided - - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.api.server.challenge.common - provided - - - - diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ApiException.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ApiException.java deleted file mode 100644 index 55e5f58037..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ApiException.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.wso2.carbon.identity.rest.api.server.challenge.v1; -//comment -public class ApiException extends Exception{ - private int code; - public ApiException (int code, String msg) { - super(msg); - this.code = code; - } - - public int getCode() { - - return code; - } - - public void setCode(int code) { - - this.code = code; - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ApiResponseMessage.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ApiResponseMessage.java deleted file mode 100644 index d2d1437606..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ApiResponseMessage.java +++ /dev/null @@ -1,68 +0,0 @@ -package org.wso2.carbon.identity.rest.api.server.challenge.v1; - -import javax.xml.bind.annotation.XmlTransient; - -@javax.xml.bind.annotation.XmlRootElement -public class ApiResponseMessage { - public static final int ERROR = 1; - public static final int WARNING = 2; - public static final int INFO = 3; - public static final int OK = 4; - public static final int TOO_BUSY = 5; - - int code; - String type; - String message; - - public ApiResponseMessage(){} - - public ApiResponseMessage(int code, String message){ - this.code = code; - switch(code){ - case ERROR: - setType("error"); - break; - case WARNING: - setType("warning"); - break; - case INFO: - setType("info"); - break; - case OK: - setType("ok"); - break; - case TOO_BUSY: - setType("too busy"); - break; - default: - setType("unknown"); - break; - } - this.message = message; - } - - @XmlTransient - public int getCode() { - return code; - } - - public void setCode(int code) { - this.code = code; - } - - public String getType() { - return type; - } - - public void setType(String type) { - this.type = type; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ChallengesApi.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ChallengesApi.java deleted file mode 100644 index a24157d5d9..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ChallengesApi.java +++ /dev/null @@ -1,193 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.rest.api.server.challenge.v1; - -import org.springframework.beans.factory.annotation.Autowired; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.*; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.ChallengesApiService; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.factories.ChallengesApiServiceFactory; - -import io.swagger.annotations.ApiParam; - -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionPatchDTO; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ErrorDTO; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeSetDTO; -import java.util.List; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO; - -import java.util.List; - -import java.io.InputStream; -import org.apache.cxf.jaxrs.ext.multipart.Attachment; -import org.apache.cxf.jaxrs.ext.multipart.Multipart; - -import javax.ws.rs.core.Response; -import javax.ws.rs.*; - -@Path("/challenges") - - -@io.swagger.annotations.Api(value = "/challenges", description = "the challenges API") -public class ChallengesApi { - - @Autowired - private ChallengesApiService delegate; - - @PATCH - @Path("/{challenge-set-id}") - @Consumes({ "application/json" }) - - @io.swagger.annotations.ApiOperation(value = "Add a challenge question to a set", notes = "Add new challenge question to an existing set.\n\n Permission required:\n * /permission/admin/manage/identity/challenge/update\n", response = void.class) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "OK"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid input request"), - - @io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized"), - - @io.swagger.annotations.ApiResponse(code = 404, message = "The specified resource is not found"), - - @io.swagger.annotations.ApiResponse(code = 500, message = "Internal Server Error") }) - - public Response addChallengeQuestionToASet(@ApiParam(value = "Challenge Question set ID",required=true ) @PathParam("challenge-set-id") String challengeSetId, - @ApiParam(value = "A challenge question to add." ) ChallengeQuestionPatchDTO challengeQuestion) - { - return delegate.addChallengeQuestionToASet(challengeSetId,challengeQuestion); - } - @POST - - @Consumes({ "application/json" }) - - @io.swagger.annotations.ApiOperation(value = "Add a new challenge question set.", notes = "Adds a new challenge question set to the system. A challenge question set can have any number of questions.\n\n Permission required:\n * /permission/admin/manage/identity/challenge/create\n", response = void.class) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 201, message = "Item Created"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid input request"), - - @io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized"), - - @io.swagger.annotations.ApiResponse(code = 409, message = "Element Already Exists"), - - @io.swagger.annotations.ApiResponse(code = 500, message = "Internal Server Error") }) - - public Response addChallenges(@ApiParam(value = "Challenge question set to add" ) List challengeSet) - { - return delegate.addChallenges(challengeSet); - } - @DELETE - @Path("/{challenge-set-id}/questions/{question-id}") - - - @io.swagger.annotations.ApiOperation(value = "Remove a challenge question in a set.", notes = "Removes a specific question from an existing challenge question set. By specifying the locale query parameter, locale specific challenge question entry for the question can be deleted.\n\n Permission required:\n * /permission/admin/manage/identity/challenge/delete\n", response = void.class) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 204, message = "No Content."), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid input request"), - - @io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized"), - - @io.swagger.annotations.ApiResponse(code = 500, message = "Internal Server Error") }) - - public Response deleteChallengeQuestion(@ApiParam(value = "Challenge Question ID",required=true ) @PathParam("question-id") String questionId, - @ApiParam(value = "Challenge Question set ID",required=true ) @PathParam("challenge-set-id") String challengeSetId, - @ApiParam(value = "An optional search string to look-up challenge-questions based on locale.\n") @QueryParam("locale") String locale) - { - return delegate.deleteChallengeQuestion(questionId,challengeSetId,locale); - } - @DELETE - @Path("/{challenge-set-id}") - - - @io.swagger.annotations.ApiOperation(value = "Removes a challenge question set.", notes = "Removes an existing challenge question set from the system. By specifying the locale query parameter, questions of specific locale can be deleted within the Set.\n\n Permission required:\n * /permission/admin/manage/identity/challenge/delete\n", response = void.class) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 204, message = "No Content."), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid input request"), - - @io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized"), - - @io.swagger.annotations.ApiResponse(code = 500, message = "Internal Server Error") }) - - public Response deleteChallengeQuestionSet(@ApiParam(value = "Challenge Question set ID",required=true ) @PathParam("challenge-set-id") String challengeSetId, - @ApiParam(value = "An optional search string to look-up challenge-questions based on locale.\n") @QueryParam("locale") String locale) - { - return delegate.deleteChallengeQuestionSet(challengeSetId,locale); - } - @GET - @Path("/{challenge-set-id}") - - @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Retrieve a challenge set.", notes = "Retrieve the challenge questions in the system in a set identified by the challenge-set-id.\n\n Permission required:\n * /permission/admin/manage/identity/challenge/view\n", response = ChallengeSetDTO.class) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "search results matching criteria"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid input request"), - - @io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized"), - - @io.swagger.annotations.ApiResponse(code = 404, message = "The specified resource is not found"), - - @io.swagger.annotations.ApiResponse(code = 500, message = "Internal Server Error") }) - - public Response getChallengeQuestionSet(@ApiParam(value = "Challenge Question set ID",required=true ) @PathParam("challenge-set-id") String challengeSetId, - @ApiParam(value = "An optional search string to look-up challenge-questions based on locale.\n") @QueryParam("locale") String locale, - @ApiParam(value = "Number of records to skip for pagination. _*This filtering is not yet supported._") @QueryParam("offset") Integer offset, - @ApiParam(value = "Maximum number of records to return. _*This filtering is not yet supported._") @QueryParam("limit") Integer limit) - { - return delegate.getChallengeQuestionSet(challengeSetId,locale,offset,limit); - } - @GET - - - @Produces({ "application/json" }) - @io.swagger.annotations.ApiOperation(value = "Retrieve all the challenge questions.", notes = "Retrieve all the challenge questions in the system.\n\n Permission required:\n * /permission/admin/manage/identity/challenge/view\n", response = ChallengeSetDTO.class, responseContainer = "List") - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "search results matching criteria"), - - @io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized"), - - @io.swagger.annotations.ApiResponse(code = 500, message = "Internal Server Error") }) - - public Response searchChallenges(@ApiParam(value = "An optional search string to look-up challenge-questions based on locale.\n") @QueryParam("locale") String locale, - @ApiParam(value = "Number of records to skip for pagination. _*This filtering is not yet supported._") @QueryParam("offset") Integer offset, - @ApiParam(value = "Maximum number of records to return. _*This filtering is not yet supported._") @QueryParam("limit") Integer limit) - { - return delegate.searchChallenges(locale,offset,limit); - } - @PUT - @Path("/{challenge-set-id}") - @Consumes({ "application/json" }) - - @io.swagger.annotations.ApiOperation(value = "Update challenge questions of a set.", notes = "Updates an existing challenge question set in the system. This will override the existing challenge questions in the set by new challenge questions.\n\n Permission required:\n * /permission/admin/manage/identity/challenge/update\n", response = void.class) - @io.swagger.annotations.ApiResponses(value = { - @io.swagger.annotations.ApiResponse(code = 200, message = "OK"), - - @io.swagger.annotations.ApiResponse(code = 400, message = "Invalid input request"), - - @io.swagger.annotations.ApiResponse(code = 401, message = "Unauthorized"), - - @io.swagger.annotations.ApiResponse(code = 404, message = "The specified resource is not found"), - - @io.swagger.annotations.ApiResponse(code = 500, message = "Internal Server Error") }) - - public Response updateChallengeQuestionSet(@ApiParam(value = "Challenge Question set ID",required=true ) @PathParam("challenge-set-id") String challengeSetId, - @ApiParam(value = "Challenge-questions for the set" ) List challengeSet) - { - return delegate.updateChallengeQuestionSet(challengeSetId,challengeSet); - } -} - diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ChallengesApiService.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ChallengesApiService.java deleted file mode 100644 index a4222c0b09..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/ChallengesApiService.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.rest.api.server.challenge.v1; - -import org.wso2.carbon.identity.rest.api.server.challenge.v1.*; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.*; - -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionPatchDTO; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ErrorDTO; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeSetDTO; -import java.util.List; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO; - -import java.util.List; - -import java.io.InputStream; -import org.apache.cxf.jaxrs.ext.multipart.Attachment; - -import javax.ws.rs.core.Response; - -public abstract class ChallengesApiService { - public abstract Response addChallengeQuestionToASet(String challengeSetId,ChallengeQuestionPatchDTO challengeQuestion); - public abstract Response addChallenges(List challengeSet); - public abstract Response deleteChallengeQuestion(String questionId,String challengeSetId,String locale); - public abstract Response deleteChallengeQuestionSet(String challengeSetId,String locale); - public abstract Response getChallengeQuestionSet(String challengeSetId,String locale,Integer offset,Integer limit); - public abstract Response searchChallenges(String locale,Integer offset,Integer limit); - public abstract Response updateChallengeQuestionSet(String challengeSetId,List challengeSet); -} - diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeQuestionDTO.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeQuestionDTO.java deleted file mode 100644 index 5ac62fbb06..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeQuestionDTO.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.rest.api.server.challenge.v1.dto; - - -import io.swagger.annotations.*; -import com.fasterxml.jackson.annotation.*; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; - - - - - -@ApiModel(description = "") -public class ChallengeQuestionDTO { - - - - private String locale = null; - - @NotNull - private String question = null; - - - private String questionId = null; - - - /** - * The locale of the question. - **/ - @ApiModelProperty(value = "The locale of the question.") - @JsonProperty("locale") - public String getLocale() { - return locale; - } - public void setLocale(String locale) { - this.locale = locale; - } - - - /** - * Challenge question display value. - **/ - @ApiModelProperty(required = true, value = "Challenge question display value.") - @JsonProperty("question") - public String getQuestion() { - return question; - } - public void setQuestion(String question) { - this.question = question; - } - - - /** - * A unique ID for the challenge quesion within the set. - **/ - @ApiModelProperty(value = "A unique ID for the challenge quesion within the set.") - @JsonProperty("questionId") - public String getQuestionId() { - return questionId; - } - public void setQuestionId(String questionId) { - this.questionId = questionId; - } - - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChallengeQuestionDTO {\n"); - - sb.append(" locale: ").append(locale).append("\n"); - sb.append(" question: ").append(question).append("\n"); - sb.append(" questionId: ").append(questionId).append("\n"); - sb.append("}\n"); - return sb.toString(); - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeQuestionPatchDTO.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeQuestionPatchDTO.java deleted file mode 100644 index 38a9237981..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeQuestionPatchDTO.java +++ /dev/null @@ -1,78 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.rest.api.server.challenge.v1.dto; - -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO; - -import io.swagger.annotations.*; -import com.fasterxml.jackson.annotation.*; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; - - - - - -@ApiModel(description = "") -public class ChallengeQuestionPatchDTO { - - - @NotNull - private ChallengeQuestionDTO challengeQuestion = null; - - @NotNull - private String operation = null; - - - /** - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty("challengeQuestion") - public ChallengeQuestionDTO getChallengeQuestion() { - return challengeQuestion; - } - public void setChallengeQuestion(ChallengeQuestionDTO challengeQuestion) { - this.challengeQuestion = challengeQuestion; - } - - - /** - * Operation to perform on the challenge set.\nOnly ['add'] is suppored. - **/ - @ApiModelProperty(required = true, value = "Operation to perform on the challenge set.\nOnly ['add'] is suppored.") - @JsonProperty("operation") - public String getOperation() { - return operation; - } - public void setOperation(String operation) { - this.operation = operation; - } - - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChallengeQuestionPatchDTO {\n"); - - sb.append(" challengeQuestion: ").append(challengeQuestion).append("\n"); - sb.append(" operation: ").append(operation).append("\n"); - sb.append("}\n"); - return sb.toString(); - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeSetDTO.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeSetDTO.java deleted file mode 100644 index fedc819419..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ChallengeSetDTO.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.rest.api.server.challenge.v1.dto; - -import java.util.ArrayList; -import java.util.List; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO; - -import io.swagger.annotations.*; -import com.fasterxml.jackson.annotation.*; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; - - - - - -@ApiModel(description = "") -public class ChallengeSetDTO { - - - - private String questionSetId = null; - - @NotNull - private List questions = new ArrayList(); - - - /** - * A unique ID for the challenge set. - **/ - @ApiModelProperty(value = "A unique ID for the challenge set.") - @JsonProperty("questionSetId") - public String getQuestionSetId() { - return questionSetId; - } - public void setQuestionSetId(String questionSetId) { - this.questionSetId = questionSetId; - } - - - /** - * Challenge questions for the set. - **/ - @ApiModelProperty(required = true, value = "Challenge questions for the set.") - @JsonProperty("questions") - public List getQuestions() { - return questions; - } - public void setQuestions(List questions) { - this.questions = questions; - } - - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ChallengeSetDTO {\n"); - - sb.append(" questionSetId: ").append(questionSetId).append("\n"); - sb.append(" questions: ").append(questions).append("\n"); - sb.append("}\n"); - return sb.toString(); - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ErrorDTO.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ErrorDTO.java deleted file mode 100644 index 5d95b9f308..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/dto/ErrorDTO.java +++ /dev/null @@ -1,108 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.rest.api.server.challenge.v1.dto; - - -import io.swagger.annotations.*; -import com.fasterxml.jackson.annotation.*; - -import javax.validation.constraints.NotNull; -import javax.validation.constraints.Pattern; - - - - - -@ApiModel(description = "") -public class ErrorDTO { - - - @NotNull - private String code = null; - - @NotNull - private String message = null; - - - private String description = null; - - - private String traceId = null; - - - /** - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty("code") - public String getCode() { - return code; - } - public void setCode(String code) { - this.code = code; - } - - - /** - **/ - @ApiModelProperty(required = true, value = "") - @JsonProperty("message") - public String getMessage() { - return message; - } - public void setMessage(String message) { - this.message = message; - } - - - /** - **/ - @ApiModelProperty(value = "") - @JsonProperty("description") - public String getDescription() { - return description; - } - public void setDescription(String description) { - this.description = description; - } - - - /** - **/ - @ApiModelProperty(value = "") - @JsonProperty("traceId") - public String getTraceId() { - return traceId; - } - public void setTraceId(String traceId) { - this.traceId = traceId; - } - - - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class ErrorDTO {\n"); - - sb.append(" code: ").append(code).append("\n"); - sb.append(" message: ").append(message).append("\n"); - sb.append(" description: ").append(description).append("\n"); - sb.append(" traceId: ").append(traceId).append("\n"); - sb.append("}\n"); - return sb.toString(); - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/factories/ChallengesApiServiceFactory.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/factories/ChallengesApiServiceFactory.java deleted file mode 100644 index a6ab751ddb..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/gen/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/factories/ChallengesApiServiceFactory.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.wso2.carbon.identity.rest.api.server.challenge.v1.factories; - -import org.wso2.carbon.identity.rest.api.server.challenge.v1.ChallengesApiService; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.impl.ChallengesApiServiceImpl; - -public class ChallengesApiServiceFactory { - - private final static ChallengesApiService service = new ChallengesApiServiceImpl(); - - public static ChallengesApiService getChallengesApi() - { - return service; - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/core/ServerChallengeService.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/core/ServerChallengeService.java deleted file mode 100644 index 1711a14ac8..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/core/ServerChallengeService.java +++ /dev/null @@ -1,365 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.rest.api.server.challenge.v1.core; - -import org.apache.commons.lang.StringUtils; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.wso2.carbon.identity.api.server.challenge.common.ChallengeConstant; -import org.wso2.carbon.identity.api.server.common.Constants; -import org.wso2.carbon.identity.api.server.common.ContextLoader; -import org.wso2.carbon.identity.api.server.common.error.APIError; -import org.wso2.carbon.identity.api.server.common.error.ErrorResponse; -import org.wso2.carbon.identity.recovery.IdentityRecoveryClientException; -import org.wso2.carbon.identity.recovery.IdentityRecoveryConstants; -import org.wso2.carbon.identity.recovery.IdentityRecoveryException; -import org.wso2.carbon.identity.recovery.IdentityRecoveryServerException; -import org.wso2.carbon.identity.recovery.model.ChallengeQuestion; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.core.functions.ChallengeQuestionToExternal; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionPatchDTO; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeSetDTO; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.stream.Collectors; -import javax.ws.rs.core.Response; - -import static org.wso2.carbon.identity.api.server.challenge.common.ChallengeQuestionDataHolder.getChallengeQuestionManager; -import static java.util.stream.Collectors.groupingBy; - -/** - * Call internal osgi services to perform server challenge related operations - */ -public class ServerChallengeService { - - private static final Log log = LogFactory.getLog(ServerChallengeService.class); - private static final String WSO2_CLAIM_DIALECT = "http://wso2.org/claims/"; - - /** - * Get all challenges of the loaded tenant. - * - * @param locale challenge question locale - * @param offset offset to start listing the challenge questions - * @param limit number of challenge questions to list - * @return list of challenge questions of the given locale - */ - public List getChallenges(String locale, Integer offset, Integer limit) { - - try { - if (StringUtils.isEmpty(locale)) { - - return buildChallengesDTO(getChallengeQuestionManager() - .getAllChallengeQuestions(ContextLoader.getTenantDomainFromContext()), offset, limit); - } else { - return buildChallengesDTO(getChallengeQuestionManager() - .getAllChallengeQuestions(ContextLoader.getTenantDomainFromContext(), locale), offset, limit); - } - } catch (IdentityRecoveryException e) { - throw handleIdentityRecoveryException(e, - ChallengeConstant.ErrorMessage.ERROR_CODE_ERROR_RETRIVING_CHALLENGES); - } - } - - /** - * Get an specific challenge set of the loaded tenant. - * - * @param challengeSetId challenge question set id - * @param locale challenge question locale - * @param offset - * @param limit - * @return - */ - public ChallengeSetDTO getChallengeSet(String challengeSetId, String locale, Integer offset, Integer limit) { - - try { - if (!isChallengeSetExists(challengeSetId, ContextLoader.getTenantDomainFromContext())) { - throw handleError(Response.Status.NOT_FOUND, - ChallengeConstant.ErrorMessage.ERROR_CHALLENGE_SET_NOT_EXISTS); - } - if (StringUtils.isEmpty(locale)) { - return buildChallengeDTO(getChallengeQuestionManager() - .getAllChallengeQuestions(ContextLoader.getTenantDomainFromContext()), challengeSetId - , offset, - limit); - } else { - return buildChallengeDTO(getChallengeQuestionManager() - .getAllChallengeQuestions(ContextLoader.getTenantDomainFromContext(), locale), - challengeSetId, - offset, limit); - } - } catch (IdentityRecoveryException e) { - throw handleIdentityRecoveryException(e, - ChallengeConstant.ErrorMessage.ERROR_CODE_ERROR_RETRIVING_CHALLENGE); - } - - } - - /** - * Delete specific challenge question of a given set. - * - * @param challengeSetId challenge question set id - * @param questionId challenge question to delete - * @param locale - * @return - */ - public boolean deleteQuestion(String challengeSetId, String questionId, String locale) { - - if (StringUtils.isEmpty(locale)) { - locale = StringUtils.EMPTY; - } - try { - if (isChallengeSetExists(challengeSetId, ContextLoader.getTenantDomainFromContext())) { - ChallengeQuestion[] toDelete = { - new ChallengeQuestion(challengeSetId, questionId, StringUtils.EMPTY, locale) - }; - getChallengeQuestionManager() - .deleteChallengeQuestions(toDelete, ContextLoader.getTenantDomainFromContext()); - } - - } catch (IdentityRecoveryException e) { - throw handleIdentityRecoveryException(e, - ChallengeConstant.ErrorMessage.ERROR_CODE_ERROR_DELETING_CHALLENGE); - } - return true; - } - - /** - * Delete a challenge set - * - * @param challengeSetId challenge question set id to delete - * @param locale - * @return - */ - public boolean deleteQuestionSet(String challengeSetId, String locale) { - - if (StringUtils.isEmpty(locale)) { - locale = StringUtils.EMPTY; - } - try { - if (isChallengeSetExists(challengeSetId, ContextLoader.getTenantDomainFromContext())) { - getChallengeQuestionManager() - .deleteChallengeQuestionSet(challengeSetId, locale, ContextLoader.getTenantDomainFromContext()); - } - } catch (IdentityRecoveryException e) { - throw handleIdentityRecoveryException(e, - ChallengeConstant.ErrorMessage.ERROR_CODE_ERROR_DELETING_CHALLENGES); - } - return true; - } - - /** - * Add a new challenge set - * - * @param challengeSets challenge question sets to add - * @return - */ - public boolean addChallengeSets(List challengeSets) { - - ChallengeQuestion[] toAdd = buildChallengeQuestionSets(challengeSets); - - try { - getChallengeQuestionManager().addChallengeQuestions(toAdd, ContextLoader.getTenantDomainFromContext()); - } catch (IdentityRecoveryException e) { - throw handleIdentityRecoveryException(e, ChallengeConstant.ErrorMessage.ERROR_CODE_ERROR_ADDING_CHALLENGES); - - } - return true; - } - - /** - * Update an existing challenge set with new questions - * - * @param challengeSetId - * @param challenges - * @return - */ - public boolean updateChallengeSets(String challengeSetId, List challenges) { - - if (!isChallengeSetExists(challengeSetId, ContextLoader.getTenantDomainFromContext())) { - throw handleError(Response.Status.NOT_FOUND, ChallengeConstant.ErrorMessage.ERROR_CHALLENGE_SET_NOT_EXISTS); - } - deleteQuestionSet(challengeSetId, null); - - List questions = buildChallengeQuestions(challenges, challengeSetId); - ChallengeQuestion[] toPut = questions.toArray(new ChallengeQuestion[0]); - try { - getChallengeQuestionManager().addChallengeQuestions(toPut, ContextLoader.getTenantDomainFromContext()); - } catch (IdentityRecoveryException e) { - throw handleIdentityRecoveryException(e, - ChallengeConstant.ErrorMessage.ERROR_CODE_ERROR_UPDATING_CHALLENGE_SET); - } - return true; - } - - /** - * Update a specific challenge questions of an existing set - * - * @param challengeSetId - * @param challengeQuestionPatchDTO - * @return - */ - public boolean patchChallengeSet(String challengeSetId, ChallengeQuestionPatchDTO challengeQuestionPatchDTO) { - - if (!isChallengeSetExists(challengeSetId, ContextLoader.getTenantDomainFromContext())) { - throw handleError(Response.Status.NOT_FOUND, ChallengeConstant.ErrorMessage.ERROR_CHALLENGE_SET_NOT_EXISTS); - } - if (Constants.OPERATION_ADD.equalsIgnoreCase(challengeQuestionPatchDTO.getOperation())) { - List challenges = new ArrayList<>(); - ChallengeQuestionDTO challengeQuestion = challengeQuestionPatchDTO.getChallengeQuestion(); - challenges.add(challengeQuestion); - List questions = buildChallengeQuestions(challenges, challengeSetId); - - ChallengeQuestion[] toPatch = questions.toArray(new ChallengeQuestion[0]); - - try { - getChallengeQuestionManager() - .addChallengeQuestions(toPatch, ContextLoader.getTenantDomainFromContext()); - } catch (IdentityRecoveryException e) { - throw handleIdentityRecoveryException(e, - ChallengeConstant.ErrorMessage.ERROR_CODE_ERROR_ADDING_CHALLENGE_QUESTION_TO_A_SET); - } - } else { - throw handleError(Response.Status.NOT_IMPLEMENTED, - ChallengeConstant.ErrorMessage.ERROR_CODE_ERROR_OPERATION_NOT_SUPPORTED); - } - return true; - } - - private ChallengeQuestion[] buildChallengeQuestionSets(List challengeSets) { - - List questions = new ArrayList<>(); - for (ChallengeSetDTO challengeSet : challengeSets) { - String setId = challengeSet.getQuestionSetId(); - questions = buildChallengeQuestions(challengeSet.getQuestions(), setId); - } - return questions.toArray(new ChallengeQuestion[0]); - } - - private List buildChallengeQuestions(List challengeSet, String setId) { - - List questions = new ArrayList<>(); - for (ChallengeQuestionDTO q : challengeSet) { - if (StringUtils.isBlank(q.getLocale())) { - q.setLocale(IdentityRecoveryConstants.LOCALE_EN_US); - } - questions.add(createChallengeQuestion(setId, q)); - } - return questions; - } - - private ChallengeQuestion createChallengeQuestion(String setId, ChallengeQuestionDTO q) { - - return new ChallengeQuestion(WSO2_CLAIM_DIALECT + setId, q.getQuestionId(), q.getQuestion(), q.getLocale()); - } - - private List buildChallengesDTO(List challengeQuestions, Integer offset, - Integer limit) { - - Map> challengeSets = groupChallenges(challengeQuestions); - return challengeSets.entrySet().stream().map((e) -> getChallengeSetDTO(e.getKey(), e.getValue())) - .collect(Collectors.toList()); - } - - private ChallengeSetDTO getChallengeSetDTO(String questionSetId, List questions) { - - ChallengeSetDTO challenge = new ChallengeSetDTO(); - challenge.setQuestionSetId(questionSetId); - List questionDTOs = questions.stream().map(new ChallengeQuestionToExternal()) - .collect(Collectors.toList()); - challenge.setQuestions(questionDTOs); - return challenge; - } - - private ChallengeSetDTO buildChallengeDTO(List challengeQuestions, String challengeSetId, - Integer offset, Integer limit) { - - List challengeSets = filterChallengesBySetId(challengeQuestions, challengeSetId); - return getChallengeSetDTO(challengeSetId, challengeSets); - } - - private Map> groupChallenges(List challengeQuestions) { - - return challengeQuestions.stream() - .collect(groupingBy(question -> question.getQuestionSetId().split(WSO2_CLAIM_DIALECT)[1])); - } - - private List filterChallengesBySetId(List challengeQuestions, String setId) { - - return challengeQuestions.stream() - .filter(question -> question.getQuestionSetId().split(WSO2_CLAIM_DIALECT)[1].equals(setId)) - .collect(Collectors.toList()); - } - - private boolean isChallengeSetExists(String setID, String tenantDomain) { - - try { - List existingChallenges = getChallengeQuestionManager() - .getAllChallengeQuestionSetsURIs(tenantDomain); - if (existingChallenges.contains(WSO2_CLAIM_DIALECT.concat(setID))) { - return true; - } - } catch (IdentityRecoveryServerException e) { - log.error("Unable to retrieve existing challenge sets.", e); - } - return false; - } - - /** - * Handle IdentityRecoveryException, extract error code, error description and status code to be sent in the - * response - * - * @param e - * @param errorEnum - * @return - */ - private APIError handleIdentityRecoveryException(IdentityRecoveryException e, - ChallengeConstant.ErrorMessage errorEnum) { - - ErrorResponse errorResponse; - - Response.Status status; - - if (e instanceof IdentityRecoveryClientException) { - errorResponse = getErrorBuilder(errorEnum).build(log, e.getMessage()); - if (e.getErrorCode() != null) { - String errorCode = e.getErrorCode(); - errorCode = errorCode.contains(Constants.ERROR_CODE_DELIMITER) ? errorCode : - ChallengeConstant.CHALLENGE_QUESTION_PREFIX + errorCode; - errorResponse.setCode(errorCode); - } - errorResponse.setDescription(e.getMessage()); - status = Response.Status.BAD_REQUEST; - } else { - errorResponse = getErrorBuilder(errorEnum).build(log, e, errorEnum.getDescription()); - status = Response.Status.INTERNAL_SERVER_ERROR; - } - return new APIError(status, errorResponse); - } - - private APIError handleError(Response.Status status, ChallengeConstant.ErrorMessage error) { - - return new APIError(status, getErrorBuilder(error).build()); - } - - private ErrorResponse.Builder getErrorBuilder(ChallengeConstant.ErrorMessage errorMsg) { - - return new ErrorResponse.Builder().withCode(errorMsg.getCode()).withMessage(errorMsg.getMessage()) - .withDescription(errorMsg.getDescription()); - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/core/functions/ChallengeQuestionToExternal.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/core/functions/ChallengeQuestionToExternal.java deleted file mode 100644 index eba0f239ba..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/core/functions/ChallengeQuestionToExternal.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.wso2.carbon.identity.rest.api.server.challenge.v1.core.functions; - -import org.wso2.carbon.identity.recovery.model.ChallengeQuestion; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO; - -import java.util.function.Function; - -/** - * Transform internal ChallengeQuestion to external ChallengeQuestionDTO - */ -public class ChallengeQuestionToExternal implements Function { - - @Override - public ChallengeQuestionDTO apply(ChallengeQuestion challengeQuestion) { - - ChallengeQuestionDTO question = new ChallengeQuestionDTO(); - question.setLocale(challengeQuestion.getLocale()); - question.setQuestion(challengeQuestion.getQuestion()); - question.setQuestionId(challengeQuestion.getQuestionId()); - - return question; - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/impl/ChallengesApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/impl/ChallengesApiServiceImpl.java deleted file mode 100644 index 9ebc5d6fcb..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/java/org/wso2/carbon/identity/rest/api/server/challenge/v1/impl/ChallengesApiServiceImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -package org.wso2.carbon.identity.rest.api.server.challenge.v1.impl; - -import org.springframework.beans.factory.annotation.Autowired; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.ChallengesApiService; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.core.ServerChallengeService; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionDTO; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeQuestionPatchDTO; -import org.wso2.carbon.identity.rest.api.server.challenge.v1.dto.ChallengeSetDTO; - -import java.util.List; -import javax.ws.rs.core.Response; - -import static org.wso2.carbon.identity.api.server.challenge.common.ChallengeConstant.CHALLENGES_PATH_COMPONENT; -import static org.wso2.carbon.identity.api.server.challenge.common.ChallengeConstant.CHALLENGE_QUESTION_SET_PATH_COMPONENT; -import static org.wso2.carbon.identity.api.server.common.Constants.V1_API_PATH_COMPONENT; -import static org.wso2.carbon.identity.api.server.common.ContextLoader.buildURIForHeader; - -/** - * API service implementation of server challenge operations. - */ -public class ChallengesApiServiceImpl extends ChallengesApiService { - - @Autowired - private ServerChallengeService challengeService; - - @Override - public Response addChallengeQuestionToASet(String challengeSetId, ChallengeQuestionPatchDTO challengeQuestion) { - - challengeService.patchChallengeSet(challengeSetId, challengeQuestion); - String challengeQuestionPath = String - .format(V1_API_PATH_COMPONENT + CHALLENGE_QUESTION_SET_PATH_COMPONENT, challengeSetId); - return Response.created(buildURIForHeader(challengeQuestionPath)).build(); - } - - @Override - public Response addChallenges(List challengeSet) { - - challengeService.addChallengeSets(challengeSet); - return Response.created(buildURIForHeader(V1_API_PATH_COMPONENT + CHALLENGES_PATH_COMPONENT)).build(); - } - - @Override - public Response deleteChallengeQuestion(String questionId, String challengeSetId, String locale) { - - challengeService.deleteQuestion(challengeSetId, questionId, locale); - return Response.noContent().build(); - } - - @Override - public Response deleteChallengeQuestionSet(String challengeSetId, String locale) { - - challengeService.deleteQuestionSet(challengeSetId, locale); - return Response.noContent().build(); - } - - @Override - public Response getChallengeQuestionSet(String challengeSetId, String locale, Integer offset, Integer limit) { - - return Response.ok().entity(challengeService.getChallengeSet(challengeSetId, locale, limit, offset)).build(); - } - - @Override - public Response searchChallenges(String locale, Integer offset, Integer limit) { - - return Response.ok().entity(challengeService.getChallenges(locale, limit, offset)).build(); - } - - @Override - public Response updateChallengeQuestionSet(String challengeSetId, List challengeSet) { - - challengeService.updateChallengeSets(challengeSetId, challengeSet); - return Response.ok().build(); - } -} diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/resources/META-INF/cxf/challenge-server-v1-cxf.xml b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/resources/META-INF/cxf/challenge-server-v1-cxf.xml deleted file mode 100644 index f8693436fb..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/resources/META-INF/cxf/challenge-server-v1-cxf.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/resources/challenge.yaml b/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/resources/challenge.yaml deleted file mode 100644 index 916a959eaf..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/org.wso2.carbon.identity.rest.api.server.challenge.v1/src/main/resources/challenge.yaml +++ /dev/null @@ -1,381 +0,0 @@ -swagger: '2.0' -info: - description: This is the RESTful API for managing Challenge Questions in WSO2 Identity Server - version: "v1" - title: WSO2 Identity Server - Challenge Question API - contact: - name: "WSO2 Identity Server" - url: "https://wso2.com/identity-and-access-management/" - email: "architecture@wso2.com" - license: - name: Apache 2.0 - url: 'http://www.apache.org/licenses/LICENSE-2.0.html' - -schemes: - - https - -# tags are used for organizing operations -tags: -- name: admin - description: Secured Admin-only calls - -# applicable authentication mechanisms -security: - - OAuth2: [] - - BasicAuth: [] - -paths: - /challenges: - post: - tags: - - admin - summary: Add a new challenge question set. - operationId: addChallenges - description: | - Adds a new challenge question set to the system. A challenge question set can have any number of questions. - - Permission required: - * /permission/admin/manage/identity/challenge/create - consumes: - - application/json - parameters: - - in: body - name: challengeSet - description: Challenge question set to add - schema: - type: array - items: - $ref: '#/definitions/ChallengeSet' - responses: - 201: - $ref: '#/responses/Created' - 400: - $ref: '#/responses/InvalidInput' - 401: - $ref: '#/responses/Unauthorized' - 409: - $ref: '#/responses/Conflict' - 500: - $ref: '#/responses/ServerError' - get: - tags: - - admin - summary: Retrieve all the challenge questions. - operationId: searchChallenges - produces: - - application/json - description: | - Retrieve all the challenge questions in the system. - - Permission required: - * /permission/admin/manage/identity/challenge/view - parameters: - - $ref: '#/parameters/localeQueryParam' - - $ref: '#/parameters/offsetQueryParam' - - $ref: '#/parameters/limitQueryParam' - responses: - 200: - description: search results matching criteria - schema: - type: array - items: - $ref: '#/definitions/ChallengeSet' - 401: - $ref: '#/responses/Unauthorized' - 500: - $ref: '#/responses/ServerError' - /challenges/{challenge-set-id}: - get: - tags: - - admin - summary: Retrieve a challenge set. - operationId: getChallengeQuestionSet - produces: - - application/json - description: | - Retrieve the challenge questions in the system in a set identified by the challenge-set-id. - - Permission required: - * /permission/admin/manage/identity/challenge/view - parameters: - - $ref: '#/parameters/questionSetIdPathParam' - - $ref: '#/parameters/localeQueryParam' - - $ref: '#/parameters/offsetQueryParam' - - $ref: '#/parameters/limitQueryParam' - responses: - 200: - description: search results matching criteria - schema: - $ref: '#/definitions/ChallengeSet' - 400: - $ref: '#/responses/InvalidInput' - 401: - $ref: '#/responses/Unauthorized' - 404: - $ref: '#/responses/NotFound' - 500: - $ref: '#/responses/ServerError' - put: - tags: - - admin - summary: Update challenge questions of a set. - operationId: updateChallengeQuestionSet - description: | - Updates an existing challenge question set in the system. This will override the existing challenge questions in the set by new challenge questions. - - Permission required: - * /permission/admin/manage/identity/challenge/update - consumes: - - application/json - parameters: - - $ref: '#/parameters/questionSetIdPathParam' - - in: body - name: challengeSet - description: Challenge-questions for the set - schema: - type: array - items: - $ref: '#/definitions/ChallengeQuestion' - responses: - 200: - $ref: '#/responses/OK' - 400: - $ref: '#/responses/InvalidInput' - 401: - $ref: '#/responses/Unauthorized' - 404: - $ref: '#/responses/NotFound' - 500: - $ref: '#/responses/ServerError' - patch: - tags: - - admin - summary: Add a challenge question to a set - operationId: addChallengeQuestionToASet - description: | - Add new challenge question to an existing set. - - Permission required: - * /permission/admin/manage/identity/challenge/update - consumes: - - application/json - parameters: - - $ref: '#/parameters/questionSetIdPathParam' - - in: body - name: challenge-question - description: A challenge question to add. - schema: - $ref: '#/definitions/ChallengeQuestionPatch' - responses: - 200: - $ref: '#/responses/OK' - 400: - $ref: '#/responses/InvalidInput' - 401: - $ref: '#/responses/Unauthorized' - 404: - $ref: '#/responses/NotFound' - 500: - $ref: '#/responses/ServerError' - x-wso2-curl: | - delete: - tags: - - admin - summary: Removes a challenge question set. - operationId: deleteChallengeQuestionSet - description: | - Removes an existing challenge question set from the system. By specifying the locale query parameter, questions of specific locale can be deleted within the Set. - - Permission required: - * /permission/admin/manage/identity/challenge/delete - parameters: - - $ref: '#/parameters/questionSetIdPathParam' - - $ref: '#/parameters/localeQueryParam' - responses: - 204: - $ref: '#/responses/NoContent' - 400: - $ref: '#/responses/InvalidInput' - 401: - $ref: '#/responses/Unauthorized' - 500: - $ref: '#/responses/ServerError' - /challenges/{challenge-set-id}/questions/{question-id}: - delete: - tags: - - admin - summary: Remove a challenge question in a set. - operationId: deleteChallengeQuestion - description: | - Removes a specific question from an existing challenge question set. By specifying the locale query parameter, locale specific challenge question entry for the question can be deleted. - - Permission required: - * /permission/admin/manage/identity/challenge/delete - parameters: - - $ref: '#/parameters/questionIdPathParam' - - $ref: '#/parameters/questionSetIdPathParam' - - $ref: '#/parameters/localeQueryParam' - responses: - 204: - $ref: '#/responses/NoContent' - 400: - $ref: '#/responses/InvalidInput' - 401: - $ref: '#/responses/Unauthorized' - 500: - $ref: '#/responses/ServerError' -parameters: - questionSetIdPathParam: - in: path - name: challenge-set-id - required: true - type: string - description: Challenge Question set ID - questionIdPathParam: - in: path - name: question-id - required: true - type: string - description: Challenge Question ID - localeQueryParam: - in: query - name: locale - description: > - An optional search string to look-up challenge-questions based on locale. - required: false - type: string - offsetQueryParam: - in: query - name: offset - description: Number of records to skip for pagination. _*This filtering is not yet supported._ - type: integer - format: int32 - minimum: 0 - limitQueryParam: - in: query - name: limit - description: Maximum number of records to return. _*This filtering is not yet supported._ - type: integer - format: int32 - minimum: 0 - -definitions: - #----------------------------------------------------- - # ChallengeSet Properties object - #----------------------------------------------------- - ChallengeSet: - type: object - required: - - challengeSetId - - questions - properties: - questionSetId: - type: string - example: challengeQuestion1 - description: A unique ID for the challenge set. - questions: - type: array - description: Challenge questions for the set. - items: - $ref: '#/definitions/ChallengeQuestion' - #----------------------------------------------------- - # ChallengeQuestion Properties object - #----------------------------------------------------- - ChallengeQuestion: - type: object - required: - - question - properties: - locale: - type: string - example: en_US - description: The locale of the question. - question: - type: string - example: What is your favorite travel destination ? - description: Challenge question display value. - questionId: - type: string - example: question1 - description: A unique ID for the challenge quesion within the set. - #----------------------------------------------------- - # ChallengeAnswer Properties object - #----------------------------------------------------- - ChallengeQuestionPatch: - type: object - required: - - operation - - challengeQuestion - properties: - challengeQuestion: - $ref: '#/definitions/ChallengeQuestion' - operation: - type: string - example: add - description: - Operation to perform on the challenge set. - - Only ['add'] is suppored. - - #----------------------------------------------------- - # The Error Response object - #----------------------------------------------------- - Error: - type: object - required: - - code - - message - properties: - code: - type: string - example: "some_error_code" - message: - type: string - example: "Some Error Message" - description: - type: string - example: "Some Error Description" - traceId: - type: string - example: "Some Trace ID" - -securityDefinitions: - BasicAuth: - type: basic - OAuth2: - type: oauth2 - flow: accessCode - authorizationUrl: https://localhost:9443/oauth2/authorize - tokenUrl: https://localhost:9443/oauth2/token - -#----------------------------------------------------- -# Descriptions of dispatcher responses -#----------------------------------------------------- -responses: - NotFound: - description: The specified resource is not found - schema: - $ref: '#/definitions/Error' - Unauthorized: - description: Unauthorized - ServerError: - description: Internal Server Error - schema: - $ref: '#/definitions/Error' - InvalidInput: - description: Invalid input request - schema: - $ref: '#/definitions/Error' - Conflict: - description: Element Already Exists - schema: - $ref: '#/definitions/Error' - Created: - description: Item Created - OK: - description: OK - NoContent: - description: No Content. - -host: localhost:9443 -basePath: /t/{tenant-domain}/api/server/v1 diff --git a/components/org.wso2.carbon.identity.api.server.challenge/pom.xml b/components/org.wso2.carbon.identity.api.server.challenge/pom.xml deleted file mode 100644 index 9cfeea9c3c..0000000000 --- a/components/org.wso2.carbon.identity.api.server.challenge/pom.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - identity-api-server - org.wso2.carbon.identity.server.api - 1.2.118-SNAPSHOT - ../../pom.xml - - 4.0.0 - org.wso2.carbon.identity.api.server.challenge - pom - - - org.wso2.carbon.identity.rest.api.server.challenge.v1 - org.wso2.carbon.identity.api.server.challenge.common - - - \ No newline at end of file diff --git a/pom.xml b/pom.xml index ebc8b6539d..79bda97d57 100644 --- a/pom.xml +++ b/pom.xml @@ -269,12 +269,6 @@ ${project.version} provided - - org.wso2.carbon.identity.server.api - org.wso2.carbon.identity.api.server.challenge.common - provided - ${project.version} - org.wso2.carbon.identity.server.api org.wso2.carbon.identity.api.server.claim.management.common @@ -801,7 +795,6 @@ components/org.wso2.carbon.identity.api.server.common - components/org.wso2.carbon.identity.api.server.challenge components/org.wso2.carbon.identity.api.server.claim.management components/org.wso2.carbon.identity.api.server.identity.governance components/org.wso2.carbon.identity.api.server.workflow.engine