Skip to content

Commit

Permalink
MOSIP:37899 - APi review comment changes
Browse files Browse the repository at this point in the history
Signed-off-by: sudeep <[email protected]>
  • Loading branch information
Sudeep7353 committed Dec 20, 2024
1 parent 0bf58d7 commit d29f2a5
Show file tree
Hide file tree
Showing 12 changed files with 141 additions and 500 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ public enum ErrorCode {
DOWNLOAD_CERTIFICATE_FTM_DEACTIVATED_ERROR("PMS_FTM_ERROR_009", "Cannot download the certificate for a deactivated FTM"),
UNABLE_TO_DOWNLOAD_ORIGINAL_FTM_CERTIFICATE("PMS_FTM_ERROR_009", "Unable to download original FTM certificate"),
FTM_NOT_APPROVED("PMS_FTM_ERROR_010", "The selected FTM is not in an approved status."),
PARTNERS_FETCH_ERROR("PMS_PS_ERROR_001", "Error while fetching partners list");
PARTNERS_FETCH_ERROR("PMS_PS_ERROR_001", "Error while fetching partners list"),
PARTNER_DOES_NOT_EXIST_ERROR("PMS_PS_ERROR_002", "Partner does not exists"),
PARTNER_POLICIES_FETCH_ERROR("PMS_PS_ERROR_003", "Error while fetching partner policies"),
PARTNER_NOT_APPROVED_ERROR("PMS_PS_ERROR_004", "The Given partner is not approved"),
NOT_AUTH_PARTNER_TYPE_ERROR("PMS_PS_ERROR_004", "The specified partner is not of type Authentication Partner");;
/**
* The error code.
*/
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,7 @@
import javax.validation.constraints.NotNull;

import io.mosip.pms.common.response.dto.ResponseWrapperV2;
import io.mosip.pms.partner.dto.ApiKeyResponseDto;
import io.mosip.pms.partner.dto.CertificateDto;
import io.mosip.pms.partner.dto.PolicyDto;
import io.mosip.pms.partner.dto.PartnerDtoV4;
import io.mosip.pms.partner.dto.PartnerPolicyMappingResponseDto;
import io.mosip.pms.partner.dto.*;
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
Expand Down Expand Up @@ -415,6 +411,18 @@ public ResponseWrapperV2<List<ApiKeyResponseDto>> getAuthPartnerApiKeys() {
return partnerService.getAuthPartnerApiKeys();
}

@PreAuthorize("hasAnyRole(@authorizedRoles.getGetauthpartnerspolicies())")
@GetMapping(value = "/{partnerId}/policies")
@Operation(summary = "Get all approved auth partner policies", description = "Fetch all approved auth partner policies")
@ApiResponses(value = {
@ApiResponse(responseCode = "200", description = "OK"),
@ApiResponse(responseCode = "401", description = "Unauthorized", content = @Content(schema = @Schema(hidden = true))),
@ApiResponse(responseCode = "403", description = "Forbidden", content = @Content(schema = @Schema(hidden = true)))
})
public ResponseWrapperV2<List<ActivePolicyDto>> getAuthPartnersPolicies(@PathVariable("partnerId") String partnerId) {
return partnerService.getAuthPartnersPolicies(partnerId);
}

@ResponseFilter
@PostMapping("/search")
@PreAuthorize("hasAnyRole(@authorizedRoles.getPostpartnerssearch())")
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -239,4 +239,6 @@ public interface PartnerService {
public ResponseWrapperV2<List<ApiKeyResponseDto>> getAuthPartnerApiKeys();

ResponseWrapperV2<List<PartnerDtoV4>> getPartnersV4(String status, Boolean policyGroupAvailable, String partnerType);

ResponseWrapperV2<List<ActivePolicyDto>> getAuthPartnersPolicies(String PartnerId);
}

This file was deleted.

Loading

0 comments on commit d29f2a5

Please sign in to comment.