Class PartnerManagementController
- java.lang.Object
-
- io.mosip.pmp.partnermanagement.controller.PartnerManagementController
-
@RestController @RequestMapping("/pmpartners") public class PartnerManagementController extends ObjectThis is the MOSIP Partner Management Service controller. This defines all the necessary operations
1.Partner ApiKey To Policy Mappings{#PartnerApiKeyToPolicyMappings(RequestWrapper, String, String)2.Activate Deactivate AuthEKYC Partners{activateDeactivateAuthEKYCPartners(String, RequestWrapper)3.Activate Deactivate Partner APIKey for Given Partner{activateDeactivatePartnerAPIKeyGivenPartner(String, RequestWrapper, String)4.Approve or Reject Partner APIKey Requests Based On APIKeyRequestId{approveRejectPartnerAPIKeyRequestsBasedOnAPIKeyRequestId(RequestWrapper, String)5.Get All Auth EKYC Partners For PolicyGroup{#getAllAuthEKYCPartnersForThePolicyGroup()6.Get particular Auth EKYC PartnerDetails For GivenPartnerId{getparticularAuthEKYCPartnerDetailsForGivenPartnerId(String)7.Get Partner APIKey To PolicyMappings{#getPartnerAPIKeyToPolicyMappings(String, String)8.Get All Partner APIKey Requests As Received By PartnerManager{getAllPartnerAPIKeyRequestsAsReceivedByPartnerManager()9.Get Request For Partner APIKey To PolicyMappings For GivenRequestId{getTheRequestForPartnerAPIKeyToPolicyMappingsForGivenRequestId(String)- Author:
- sanjeev.shrivastava
-
-
Constructor Summary
Constructors Constructor Description PartnerManagementController()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>>activateDeactivateAuthEKYCPartners(String partnerId, @Valid RequestWrapper<ActivateDeactivatePartnerRequest> request)This API would be used to activate/deactivate Auth/E-KYC Partnersorg.springframework.http.ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>>activateDeactivatePartnerAPIKeyGivenPartner(String partnerId, @Valid RequestWrapper<ActivateDeactivatePartnerRequest> request, String partnerApiKey)Partner Manager would be using this API to activate OR de-activate PartnerAPIKey for given partner.org.springframework.http.ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>>approveRejectPartnerAPIKeyRequestsBasedOnAPIKeyRequestId(@Valid RequestWrapper<ActivateDeactivatePartnerRequest> request, String apiKeyReqId)Partner Manager would be using this API to approve OR reject partner API key requests based on API key request id.org.springframework.http.ResponseEntity<ResponseWrapper<RetrievePartnerDetailsResponse>>getAllAuthEKYCPartnersForThePolicyGroup(Optional<String> partnerType)This API would be used to retrieve all Auth/E-KYC Partners for the policy group.org.springframework.http.ResponseEntity<ResponseWrapper<PartnerAPIKeyRequestsResponse>>getAllPartnerAPIKeyRequestsAsReceivedByPartnerManager()This API would be used to retrieve all Partner API Key requests as received by partner managerorg.springframework.http.ResponseEntity<ResponseWrapper<RetrievePartnersDetails>>getparticularAuthEKYCPartnerDetailsForGivenPartnerId(String partnerId)This API would be used to retrieve the particular Auth/E-KYC Partner details for given partner id.org.springframework.http.ResponseEntity<ResponseWrapper<RetrievePartnerManagers>>getPartnerManager()Deprecated.org.springframework.http.ResponseEntity<ResponseWrapper<PolicyIDResponse>>getPolicyID(String policyName)org.springframework.http.ResponseEntity<ResponseWrapper<ApikeyRequests>>getTheRequestForPartnerAPIKeyToPolicyMappingsForGivenRequestId(String apiKeyReqId)This API would be used to retrieve the request for Partner API key to Policy Mappings for given request id.org.springframework.http.ResponseEntity<ResponseWrapper<PartnerAPIKeyToPolicyMappingsResponse>>getValidatPartnerAPIKeyPatternAndExpiry(String partnerId, String partnerApiKey)Partner managers would be using this request to retrieve the Partner API key to Policy Mappings.org.springframework.http.ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>>partnerApiKeyToPolicyMappings(@Valid RequestWrapper<PartnersPolicyMappingRequest> request, String partnerId, String partnerApiKey)This API would be used by partner Manager, to update Partner api key to Policy Mappings.org.springframework.http.ResponseEntity<ResponseWrapper<PartnerPolicyResponse>>validatePartnerAndMisp(String partnerId, String partner_api_key, String misp_license_key)
-
-
-
Method Detail
-
partnerApiKeyToPolicyMappings
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/{partnerId}/{partnerApiKey}", method=PUT) public org.springframework.http.ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>> partnerApiKeyToPolicyMappings(@RequestBody @Valid @Valid RequestWrapper<PartnersPolicyMappingRequest> request, @PathVariable String partnerId, @PathVariable String partnerApiKey)This API would be used by partner Manager, to update Partner api key to Policy Mappings.- Parameters:
request- this class contain oldPolicyID and newPolicyIDpartnerId- this is unique id created after self registered by partnerpartnerApiKey- this is unique id created by partner manager at the time of approving partner request- Returns:
- response this class contains massage about API key created successfully
-
activateDeactivateAuthEKYCPartners
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/{partnerId}", method=PATCH) public org.springframework.http.ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>> activateDeactivateAuthEKYCPartners(@PathVariable String partnerId, @RequestBody @Valid @Valid RequestWrapper<ActivateDeactivatePartnerRequest> request)This API would be used to activate/deactivate Auth/E-KYC Partners- Parameters:
partnerId- this is unique id created after self registered by partnerrequest- this class contains the status of activate/deactivate Auth/E-KYC Partners- Returns:
- respons this class contains massage about Partner status updated successfully
-
activateDeactivatePartnerAPIKeyGivenPartner
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/{partnerId}/{partnerApiKey}", method=PATCH) public org.springframework.http.ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>> activateDeactivatePartnerAPIKeyGivenPartner(@PathVariable String partnerId, @RequestBody @Valid @Valid RequestWrapper<ActivateDeactivatePartnerRequest> request, @PathVariable String partnerApiKey)Partner Manager would be using this API to activate OR de-activate PartnerAPIKey for given partner.- Parameters:
partnerId- this is unique id created after self registered by partnerrequest- this class contains the status about activate OR de-activate PartnerAPIKey for given partnerpartnerApiKey- this is unique id created by partner manager at the time of approving partner request- Returns:
- response this class contains massage about Partner API Key status updated successfully
-
validatePartnerAndMisp
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\',\'ID_AUTHENTICATION\',\'CREDENTIAL_ISSUANCE\')") @RequestMapping(value="/validatePartnerMisp/partnerId/{partnerId}/partnerApiKey/{partner_api_key}/mispLicenseKey/{misp_license_key}", method=GET) public org.springframework.http.ResponseEntity<ResponseWrapper<PartnerPolicyResponse>> validatePartnerAndMisp(@PathVariable String partnerId, @PathVariable String partner_api_key, @PathVariable String misp_license_key)- Parameters:
partnerId-partner_api_key-misp_license_key-- Returns:
-
approveRejectPartnerAPIKeyRequestsBasedOnAPIKeyRequestId
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/PartnerAPIKeyRequests/{apiKeyReqId}", method=PATCH) public org.springframework.http.ResponseEntity<ResponseWrapper<PartnersPolicyMappingResponse>> approveRejectPartnerAPIKeyRequestsBasedOnAPIKeyRequestId(@RequestBody @Valid @Valid RequestWrapper<ActivateDeactivatePartnerRequest> request, @PathVariable String apiKeyReqId)Partner Manager would be using this API to approve OR reject partner API key requests based on API key request id. During approval process of the request unique PartnerAPI Key is generated in Partner Management module, which is mapped to requested policies. Partner API Key would be having default active status, expiry of which would configurable.- Parameters:
request- this class contains the status about approve OR reject partner API key requestsapiKeyReqId- this is unique id created after partner request for Partner API Key- Returns:
- response this class contains massage about PartnerAPIKey approved successfully
-
getAllAuthEKYCPartnersForThePolicyGroup
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\',\'ID_AUTHENTICATION\',\'REGISTRATION_PROCESSOR\',\'RESIDENT\',\'CREDENTIAL_ISSUANCE\')") @RequestMapping(value="", method=GET) public org.springframework.http.ResponseEntity<ResponseWrapper<RetrievePartnerDetailsResponse>> getAllAuthEKYCPartnersForThePolicyGroup(@RequestParam("partnerType") Optional<String> partnerType)This API would be used to retrieve all Auth/E-KYC Partners for the policy group.- Returns:
- response this class contains list of Auth/E-KYC Partners for the policy group
-
getPartnerManager
@Deprecated @PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\',\'ID_AUTHENTICATION\',\'REGISTRATION_PROCESSOR\',\'RESIDENT\',\'CREDENTIAL_ISSUANCE\')") @RequestMapping(value="/getManager", method=GET) public org.springframework.http.ResponseEntity<ResponseWrapper<RetrievePartnerManagers>> getPartnerManager()
Deprecated.This API would be used to retrieve all Partner Details as per UI.- Returns:
- response this class contains List of Partner.
-
getparticularAuthEKYCPartnerDetailsForGivenPartnerId
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/{partnerId}", method=GET) public org.springframework.http.ResponseEntity<ResponseWrapper<RetrievePartnersDetails>> getparticularAuthEKYCPartnerDetailsForGivenPartnerId(@PathVariable String partnerId)This API would be used to retrieve the particular Auth/E-KYC Partner details for given partner id.- Parameters:
partnerID- this is unique id created after self registered by partner- Returns:
- response this class contains Auth/E-KYC Partner details for given partner id
-
getValidatPartnerAPIKeyPatternAndExpiry
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/{partnerId}/{partnerApiKey}", method=GET) public org.springframework.http.ResponseEntity<ResponseWrapper<PartnerAPIKeyToPolicyMappingsResponse>> getValidatPartnerAPIKeyPatternAndExpiry(@PathVariable String partnerId, @PathVariable String partnerApiKey)Partner managers would be using this request to retrieve the Partner API key to Policy Mappings. Partner management system would be able to validate Partner API Key pattern, validate expiry for Partner API Key and status details in background, while fetching Policy to Partner API mappings.- Parameters:
partnerId- this is unique id created after self registered by partnerpartnerApiKey- this is unique id created by partner manager at the time of approving partner request- Returns:
- response this class contains partnerID and policyId
-
getAllPartnerAPIKeyRequestsAsReceivedByPartnerManager
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/PartnerAPIKeyRequests", method=GET) public org.springframework.http.ResponseEntity<ResponseWrapper<PartnerAPIKeyRequestsResponse>> getAllPartnerAPIKeyRequestsAsReceivedByPartnerManager()This API would be used to retrieve all Partner API Key requests as received by partner manager- Returns:
- response this class contains all Partner API Key requests as received by partner manager
-
getTheRequestForPartnerAPIKeyToPolicyMappingsForGivenRequestId
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/PartnerAPIKeyRequests/{apiKeyReqId}", method=GET) public org.springframework.http.ResponseEntity<ResponseWrapper<ApikeyRequests>> getTheRequestForPartnerAPIKeyToPolicyMappingsForGivenRequestId(@PathVariable String apiKeyReqId)This API would be used to retrieve the request for Partner API key to Policy Mappings for given request id.- Parameters:
apiKeyReqId- this is unique id created after partner request for Partner API Key- Returns:
- response this class contains details related to Partner API key to Policy Mappings
-
getPolicyID
@PreAuthorize("hasAnyRole(\'PARTNERMANAGER\',\'partnermanager\')") @RequestMapping(value="/policyname/{policyName}", method=GET) public org.springframework.http.ResponseEntity<ResponseWrapper<PolicyIDResponse>> getPolicyID(@PathVariable String policyName)- Parameters:
policyName- this is unique policy name of partner.- Returns:
- it will return corresponding policy Id.
-
-