Class PartnerServiceManager
- java.lang.Object
-
- io.mosip.authentication.common.service.integration.PartnerServiceManager
-
@Component public class PartnerServiceManager extends Object
This class Partner Service Manager connects to partner service to validate and get the policy file for a given partnerID, partner api key and misp license key.- Author:
- Nagarjuna
-
-
Constructor Summary
Constructors Constructor Description PartnerServiceManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreateOIDCClientData(io.mosip.kernel.core.websub.model.EventModel eventModel)Add OIDC client data.voidhandleApiKeyApproved(io.mosip.kernel.core.websub.model.EventModel eventModel)Handle api key approved.voidhandleApiKeyUpdated(io.mosip.kernel.core.websub.model.EventModel eventModel)Handle api key updated.voidupdateMispLicenseData(io.mosip.kernel.core.websub.model.EventModel eventModel)Update misp license data.voidupdateOIDCClientData(io.mosip.kernel.core.websub.model.EventModel eventModel)Update OIDC client data.voidupdatePartnerData(io.mosip.kernel.core.websub.model.EventModel eventModel)Update partner data.voidupdatePolicyData(io.mosip.kernel.core.websub.model.EventModel eventModel)Update policy data.PartnerPolicyResponseDTOvalidateAndGetPolicy(String partnerId, String partner_api_key, String misp_license_key, boolean certificateNeeded, String headerCertificateThumbprint, boolean certValidationNeeded)Validate and get policy.
-
-
-
Method Detail
-
validateAndGetPolicy
public PartnerPolicyResponseDTO validateAndGetPolicy(String partnerId, String partner_api_key, String misp_license_key, boolean certificateNeeded, String headerCertificateThumbprint, boolean certValidationNeeded) throws IdAuthenticationBusinessException
Validate and get policy.- Parameters:
partnerId- the partner idpartner_api_key- the partner api keymisp_license_key- the misp license keycertificateNeeded- the certificate needed- Returns:
- the partner policy response DTO
- Throws:
IdAuthenticationBusinessException- the id authentication business exception
-
handleApiKeyApproved
public void handleApiKeyApproved(io.mosip.kernel.core.websub.model.EventModel eventModel) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOExceptionHandle api key approved.- Parameters:
eventModel- the event model- Throws:
com.fasterxml.jackson.core.JsonParseException- the json parse exceptioncom.fasterxml.jackson.databind.JsonMappingException- the json mapping exceptionIOException- Signals that an I/O exception has occurred.
-
handleApiKeyUpdated
public void handleApiKeyUpdated(io.mosip.kernel.core.websub.model.EventModel eventModel) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOExceptionHandle api key updated.- Parameters:
eventModel- the event model- Throws:
com.fasterxml.jackson.core.JsonParseException- the json parse exceptioncom.fasterxml.jackson.databind.JsonMappingException- the json mapping exceptionIOException- Signals that an I/O exception has occurred.
-
updatePartnerData
public void updatePartnerData(io.mosip.kernel.core.websub.model.EventModel eventModel)
Update partner data.- Parameters:
eventModel- the event model
-
updatePolicyData
public void updatePolicyData(io.mosip.kernel.core.websub.model.EventModel eventModel)
Update policy data.- Parameters:
eventModel- the event model
-
updateMispLicenseData
public void updateMispLicenseData(io.mosip.kernel.core.websub.model.EventModel eventModel)
Update misp license data.- Parameters:
eventModel- the event model
-
createOIDCClientData
public void createOIDCClientData(io.mosip.kernel.core.websub.model.EventModel eventModel) throws IdAuthenticationBusinessExceptionAdd OIDC client data.- Parameters:
eventModel- the event model- Throws:
IdAuthenticationBusinessException
-
updateOIDCClientData
public void updateOIDCClientData(io.mosip.kernel.core.websub.model.EventModel eventModel) throws IdAuthenticationBusinessExceptionUpdate OIDC client data.- Parameters:
eventModel- the event model- Throws:
IdAuthenticationBusinessException
-
-