From eb283ed27fce8769886fd124ef1e7938f206d1f3 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 21 Oct 2016 10:28:22 +0200 Subject: add functionality to support more than one ELGA mandate-service --- .../moa/id/advancedlogging/MOAIDEventConstants.java | 1 + .../moa/id/client/utils/SZRGWClientUtils.java | 21 +++++++++++---------- .../moa/id/config/ConnectionParameter.java | 12 ++++++------ 3 files changed, 18 insertions(+), 16 deletions(-) (limited to 'id/server/idserverlib/src/main/java/at') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAIDEventConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAIDEventConstants.java index 9d26cc05f..54e459db1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAIDEventConstants.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAIDEventConstants.java @@ -104,6 +104,7 @@ public interface MOAIDEventConstants extends EventConstants { public static final int AUTHPROCESS_ELGA_MANDATE_RECEIVED = 6001; public static final int AUTHPROCESS_ELGA_MANDATE_ERROR_RECEIVED = 6002; public static final int AUTHPROCESS_ELGA_MANDATE_RECEIVED_IP = 6003; + public static final int AUTHPROCESS_ELGA_MANDATE_SERVICE_ENTITYID = 6004; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/utils/SZRGWClientUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/utils/SZRGWClientUtils.java index 622eca0a5..4cca2e625 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/utils/SZRGWClientUtils.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/client/utils/SZRGWClientUtils.java @@ -33,6 +33,7 @@ import at.gv.egovernment.moa.id.client.SZRGWClient; import at.gv.egovernment.moa.id.client.SZRGWClientException; import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.commons.api.ConnectionParameterInterface; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; @@ -60,8 +61,8 @@ public class SZRGWClientUtils { * @throws SZRGWClientException the sZRGW client exception * @throws ConfigurationException the configuration exception */ - public static CreateIdentityLinkResponse getIdentityLink(Element signature) throws SZRGWClientException, ConfigurationException { - return getIdentityLink(null, null, null, null, XMLHelper.nodeToString(signature), null); + public static CreateIdentityLinkResponse getIdentityLink(IRequest pendingReq, Element signature) throws SZRGWClientException, ConfigurationException { + return getIdentityLink(pendingReq, null, null, null, null, XMLHelper.nodeToString(signature), null); } /** @@ -76,8 +77,8 @@ public class SZRGWClientUtils { * @throws SZRGWClientException the sZRGW client exception * @throws ConfigurationException the configuration exception */ - public static CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String signature, String PEPSFiscalNumber) throws SZRGWClientException { - return getIdentityLink(PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, null, signature, null, null, null, null, null, null, null, PEPSFiscalNumber); + public static CreateIdentityLinkResponse getIdentityLink(IRequest pendingReq, String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String signature, String PEPSFiscalNumber) throws SZRGWClientException { + return getIdentityLink(pendingReq, PEPSIdentifier, PEPSFirstname, PEPSFamilyname, PEPSDateOfBirth, null, signature, null, null, null, null, null, null, null, PEPSFiscalNumber); } /** @@ -94,11 +95,11 @@ public class SZRGWClientUtils { * @return the identity link * @throws SZRGWClientException the sZRGW client exception */ - public static CreateIdentityLinkResponse getIdentityLink(String eIdentifier, + public static CreateIdentityLinkResponse getIdentityLink(IRequest pendingReq, String eIdentifier, String givenName, String lastName, String dateOfBirth, String gender, String citizenSignature, String representative, String represented, String mandate, String targetType, String targetValue, String oaFriendlyName, List filters, String PEPSFiscalNumber) throws SZRGWClientException { - return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, + return getIdentityLink(pendingReq, eIdentifier, givenName, lastName, dateOfBirth, gender, citizenSignature, representative, represented, mandate, null, null, targetType, targetValue, oaFriendlyName, filters, PEPSFiscalNumber); } @@ -115,19 +116,19 @@ public class SZRGWClientUtils { * @return the identity link * @throws SZRGWClientException */ - public static CreateIdentityLinkResponse getIdentityLink(String citizenSignature, + public static CreateIdentityLinkResponse getIdentityLink(IRequest pendingReq, String citizenSignature, String representative, String represented, String mandateContent, String organizationAddress, String organizationType, String targetType, String targetValue, String oaFriendlyName, List filters, String PEPSFiscalNumber) throws SZRGWClientException { - return getIdentityLink(null, null, null, null, null, + return getIdentityLink(pendingReq, null, null, null, null, null, citizenSignature, represented, representative, mandateContent, organizationAddress, organizationType, targetType, targetValue, oaFriendlyName, filters, PEPSFiscalNumber); } - public static CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String gender, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType, String targetType, String targetValue, String oaFriendlyName, List filters, String PEPSFiscalNumber) throws SZRGWClientException { + public static CreateIdentityLinkResponse getIdentityLink(IRequest pendingReq, String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String gender, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType, String targetType, String targetValue, String oaFriendlyName, List filters, String PEPSFiscalNumber) throws SZRGWClientException { try { AuthConfiguration authConf = AuthConfigurationProviderFactory.getInstance(); - ConnectionParameterInterface connectionParameters = authConf.getForeignIDConnectionParameter(); + ConnectionParameterInterface connectionParameters = authConf.getForeignIDConnectionParameter(pendingReq.getOnlineApplicationConfiguration()); String requestID = UUID.randomUUID().toString(); SZRGWClient client = new SZRGWClient(connectionParameters); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameter.java index 9d78c348b..6699cc989 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameter.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameter.java @@ -62,12 +62,12 @@ public abstract class ConnectionParameter implements ConnectionParameterInterfac public abstract String getClientKeyStorePassword(); - public boolean isHTTPSURL() { - if (MiscUtil.isEmpty(url)) - return false; - else - return url.indexOf("https") == 0; - } +// public boolean isHTTPSURL() { +// if (MiscUtil.isEmpty(url)) +// return false; +// else +// return url.indexOf("https") == 0; +// } public String getUrl() { if (MiscUtil.isEmpty(url)) -- cgit v1.2.3