diff --git a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/gen/java/org/wso2/carbon/identity/api/server/idv/provider/v1/IdvProvidersApi.java b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/gen/java/org/wso2/carbon/identity/api/server/idv/provider/v1/IdvProvidersApi.java index f3e69df429..7d70ef5e74 100644 --- a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/gen/java/org/wso2/carbon/identity/api/server/idv/provider/v1/IdvProvidersApi.java +++ b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/gen/java/org/wso2/carbon/identity/api/server/idv/provider/v1/IdvProvidersApi.java @@ -50,7 +50,7 @@ public class IdvProvidersApi { @Consumes({ "application/json" }) @Produces({ "application/json", "application/xml", }) - @ApiOperation(value = "Add a new identity verification provider. ", notes = "This API provides the capability to add an identity verification provider. Permission required:
* /permission/admin/manage/identity/idvpmgt/create
Scope required:
* internal_idvp_add ", response = IdVProviderResponse.class, authorizations = { + @ApiOperation(value = "Add a new identity verification provider. ", notes = "This API provides the capability to add an identity verification provider. Permission required:
* /permission/admin/manage/identity/idvp/add
Scope required:
* internal_idvp_add ", response = IdVProviderResponse.class, authorizations = { @Authorization(value = "BasicAuth"), @Authorization(value = "OAuth2", scopes = { @@ -74,7 +74,7 @@ public Response addIdVProvider(@ApiParam(value = "This represents the identity p @Path("/{idv-provider-id}") @Produces({ "application/json" }) - @ApiOperation(value = "Delete an identity verification provider by using the identity provider's ID. ", notes = "This API provides the capability to delete an identity verification provider by giving its ID.
Permission required:
* /permission/admin/manage/identity/idvpmgt/delete
Scope required:
* internal_idvp_delete ", response = Void.class, authorizations = { + @ApiOperation(value = "Delete an identity verification provider by using the identity provider's ID. ", notes = "This API provides the capability to delete an identity verification provider by giving its ID.
Permission required:
* /permission/admin/manage/identity/idvp/delete
Scope required:
* internal_idvp_delete ", response = Void.class, authorizations = { @Authorization(value = "BasicAuth"), @Authorization(value = "OAuth2", scopes = { @@ -98,7 +98,7 @@ public Response deleteIdVProvider(@ApiParam(value = "ID of the identity verifica @Path("/{idv-provider-id}") @Produces({ "application/json", "application/xml", }) - @ApiOperation(value = "Retrieve identity verification provider by identity verification provider's ID ", notes = "This API provides the capability to retrieve the identity verification provider details by using its ID. Permission required:
* /permission/admin/manage/identity/idvpmgt/view
Scope required:
* internal_idvp_view ", response = IdVProviderResponse.class, authorizations = { + @ApiOperation(value = "Retrieve identity verification provider by identity verification provider's ID ", notes = "This API provides the capability to retrieve the identity verification provider details by using its ID. Permission required:
* /permission/admin/manage/identity/idvp/view
Scope required:
* internal_idvp_view ", response = IdVProviderResponse.class, authorizations = { @Authorization(value = "BasicAuth"), @Authorization(value = "OAuth2", scopes = { @@ -122,7 +122,7 @@ public Response getIdVProvider(@ApiParam(value = "ID of the identity verificatio @Produces({ "application/json" }) - @ApiOperation(value = "List identity verification providers. ", notes = "This API provides the capability to retrieve the list of identity verification providers.
Permission required:
* /permission/admin/manage/identity/idvpmgt/view
Scope required:
* internal_idvp_view ", response = IdVProviderListResponse.class, authorizations = { + @ApiOperation(value = "List identity verification providers. ", notes = "This API provides the capability to retrieve the list of identity verification providers.
Permission required:
* /permission/admin/manage/identity/idvp/view
Scope required:
* internal_idvp_view ", response = IdVProviderListResponse.class, authorizations = { @Authorization(value = "BasicAuth"), @Authorization(value = "OAuth2", scopes = { @@ -137,9 +137,9 @@ public Response getIdVProvider(@ApiParam(value = "ID of the identity verificatio @ApiResponse(code = 500, message = "Server Error", response = Error.class), @ApiResponse(code = 501, message = "Not Implemented", response = Error.class) }) - public Response getIdVProviders( @Valid@ApiParam(value = "Maximum number of records to return. ") @QueryParam("limit") Integer limit, @Valid@ApiParam(value = "Number of records to skip for pagination. ") @QueryParam("offset") Integer offset) { + public Response getIdVProviders( @Valid@ApiParam(value = "Maximum number of records to return. ") @QueryParam("limit") Integer limit, @Valid@ApiParam(value = "Number of records to skip for pagination. ") @QueryParam("offset") Integer offset, @Valid@ApiParam(value = "Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' and 'eq' operations and also complex queries with 'and' operations. E.g. /idv-providers?filter=name+sw+onfido+and+isEnabled+eq+true ") @QueryParam("filter") String filter) { - return delegate.getIdVProviders(limit, offset ); + return delegate.getIdVProviders(limit, offset, filter ); } @Valid @@ -147,7 +147,7 @@ public Response getIdVProviders( @Valid@ApiParam(value = "Maximum number of r @Path("/{idv-provider-id}") @Consumes({ "application/json" }) @Produces({ "application/json" }) - @ApiOperation(value = "Update an identity verification provider. ", notes = "This API provides the capability to update an identity verification provider
Permission required:
* /permission/admin/manage/identity/idvpmgt/update
Scope required:
* internal_idvp_update ", response = IdVProviderResponse.class, authorizations = { + @ApiOperation(value = "Update an identity verification provider. ", notes = "This API provides the capability to update an identity verification provider
Permission required:
* /permission/admin/manage/identity/idvp/update
Scope required:
* internal_idvp_update ", response = IdVProviderResponse.class, authorizations = { @Authorization(value = "BasicAuth"), @Authorization(value = "OAuth2", scopes = { diff --git a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/gen/java/org/wso2/carbon/identity/api/server/idv/provider/v1/IdvProvidersApiService.java b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/gen/java/org/wso2/carbon/identity/api/server/idv/provider/v1/IdvProvidersApiService.java index c66b1d7e3d..a4be5a79ec 100644 --- a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/gen/java/org/wso2/carbon/identity/api/server/idv/provider/v1/IdvProvidersApiService.java +++ b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/gen/java/org/wso2/carbon/identity/api/server/idv/provider/v1/IdvProvidersApiService.java @@ -39,7 +39,7 @@ public interface IdvProvidersApiService { public Response getIdVProvider(String idvProviderId); - public Response getIdVProviders(Integer limit, Integer offset); + public Response getIdVProviders(Integer limit, Integer offset, String filter); public Response updateIdVProviders(String idvProviderId, IdVProviderRequest idVProviderRequest); } diff --git a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/java/org/wso2/carbon/identity/api/server/idv/provider/v1/core/IdVProviderService.java b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/java/org/wso2/carbon/identity/api/server/idv/provider/v1/core/IdVProviderService.java index 55e809e77c..294085e73b 100644 --- a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/java/org/wso2/carbon/identity/api/server/idv/provider/v1/core/IdVProviderService.java +++ b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/java/org/wso2/carbon/identity/api/server/idv/provider/v1/core/IdVProviderService.java @@ -154,15 +154,27 @@ public IdVProviderResponse getIdVProvider(String idVProviderId) { */ public IdVProviderListResponse getIdVProviders(Integer limit, Integer offset) { + return getIdVProviders(limit, offset, null); + } + + /** + * Get all identity verification providers with filtering. + * + * @param limit Limit per page. + * @param offset Offset value. + * @return Identity verification providers. + */ + public IdVProviderListResponse getIdVProviders(Integer limit, Integer offset, String filter) { + int tenantId = getTenantId(); try { IdVProviderManager idVProviderManager = IdentityVerificationServiceHolder.getIdVProviderManager(); - int totalResults = idVProviderManager.getCountOfIdVProviders(tenantId); + int totalResults = idVProviderManager.getCountOfIdVProviders(tenantId, filter); IdVProviderListResponse idVProviderListResponse = new IdVProviderListResponse(); if (totalResults > 0) { - List idVProviders = idVProviderManager.getIdVProviders(limit, offset, tenantId); + List idVProviders = idVProviderManager.getIdVProviders(limit, offset, filter, tenantId); if (CollectionUtils.isNotEmpty(idVProviders)) { List idVProvidersList = new ArrayList<>(); diff --git a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/java/org/wso2/carbon/identity/api/server/idv/provider/v1/impl/IdvProvidersApiServiceImpl.java b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/java/org/wso2/carbon/identity/api/server/idv/provider/v1/impl/IdvProvidersApiServiceImpl.java index dd7af4f0ee..75605d098e 100644 --- a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/java/org/wso2/carbon/identity/api/server/idv/provider/v1/impl/IdvProvidersApiServiceImpl.java +++ b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/java/org/wso2/carbon/identity/api/server/idv/provider/v1/impl/IdvProvidersApiServiceImpl.java @@ -64,9 +64,9 @@ public Response getIdVProvider(String idvProviderId) { } @Override - public Response getIdVProviders(Integer limit, Integer offset) { + public Response getIdVProviders(Integer limit, Integer offset, String filter) { - IdVProviderListResponse idVProviderListResponse = idVProviderService.getIdVProviders(limit, offset); + IdVProviderListResponse idVProviderListResponse = idVProviderService.getIdVProviders(limit, offset, filter); return Response.ok().entity(idVProviderListResponse).build(); } diff --git a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/resources/idv-provider.yaml b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/resources/idv-provider.yaml index 39db3b6804..c8ea63eb70 100644 --- a/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/resources/idv-provider.yaml +++ b/components/org.wso2.carbon.identity.api.server.idv.provider/org.wso2.carbon.identity.api.server.idv.provider.v1/src/main/resources/idv-provider.yaml @@ -43,6 +43,7 @@ paths: parameters: - $ref: '#/components/parameters/limitQueryParam' - $ref: '#/components/parameters/offsetQueryParam' + - $ref: '#/components/parameters/filterQueryParam' responses: '200': description: Successful Response @@ -317,6 +318,16 @@ components: schema: type: integer format: int32 + filterQueryParam: + in: query + name: filter + required: false + description: > + Condition to filter the retrieval of records. Supports 'sw', 'co', 'ew' + and 'eq' operations and also complex queries with 'and' operations. E.g. + /idv-providers?filter=name+sw+onfido+and+isEnabled+eq+true + schema: + type: string idVPQueryParam: in: query name: idvProviderid diff --git a/pom.xml b/pom.xml index 04367b04d4..743316972b 100644 --- a/pom.xml +++ b/pom.xml @@ -824,7 +824,7 @@ 1.5.55 - 1.0.11 + 1.0.12 1.1.12