aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
diff options
context:
space:
mode:
authorFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-01-30 20:49:58 +0100
committerFlorian Reimair <florian.reimair@iaik.tugraz.at>2014-01-31 17:16:54 +0100
commit20c7b74026da669ff560281e69b4df37392154fd (patch)
tree669eef02722f3510612c940c4a8c34e43223b35e /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
parent8449c5ab138f0b7a1760cb5f2aa6db2eb9d0b22e (diff)
downloadmoa-id-spss-20c7b74026da669ff560281e69b4df37392154fd.tar.gz
moa-id-spss-20c7b74026da669ff560281e69b4df37392154fd.tar.bz2
moa-id-spss-20c7b74026da669ff560281e69b4df37392154fd.zip
supply MIS information to SZRGW
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java45
1 files changed, 34 insertions, 11 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
index decf166c4..60b269059 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -135,9 +135,13 @@ import at.gv.egovernment.moa.util.FileUtils;
import at.gv.egovernment.moa.util.MiscUtil;
import at.gv.egovernment.moa.util.StringUtils;
import at.gv.egovernment.moa.util.XPathUtils;
+import at.gv.util.xsd.mis.MandateIdentifiers;
+import at.gv.util.xsd.mis.Target;
import at.gv.util.xsd.srzgw.CreateIdentityLinkRequest;
import at.gv.util.xsd.srzgw.CreateIdentityLinkRequest.PEPSData;
import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse;
+import at.gv.util.xsd.srzgw.MISType;
+import at.gv.util.xsd.srzgw.MISType.Filters;
import eu.stork.oasisdss.api.ApiUtils;
import eu.stork.oasisdss.api.ApiUtilsException;
import eu.stork.oasisdss.profile.DocumentType;
@@ -1700,20 +1704,19 @@ public class AuthenticationServer implements MOAIDAuthConstants {
/**
* Does the request to the SZR-GW
- * @param signature XMLDSIG signature
+ * @param oaFriendlyName
+ * @param signature XMLDSIG signature
* @return Identity link assertion
* @throws SZRGWClientException
*/
- public CreateIdentityLinkResponse getIdentityLink(String PEPSIdentifier, String PEPSFirstname, String PEPSFamilyname, String PEPSDateOfBirth, String gender, String citizenSignature, String represented, String representative, String mandateContent, String organizationAddress, String organizationType) throws SZRGWClientException {
+ public 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 target, String oaFriendlyName, String filters) throws SZRGWClientException {
- SZRGWClient client = null;
-
try {
AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
ConnectionParameter connectionParameters = authConf.getForeignIDConnectionParameter();
- client = new SZRGWClient(connectionParameters);
+ SZRGWClient client = new SZRGWClient(connectionParameters);
CreateIdentityLinkRequest request = new CreateIdentityLinkRequest();
@@ -1732,8 +1735,24 @@ public class AuthenticationServer implements MOAIDAuthConstants {
data.setLegalPersonCanonicalRegisteredAddress(organizationAddress);
data.setLegalPersonTranslatableType(organizationType);
- // TODO add MIS data
-// request.setMIS(value)
+ if(null != mandateContent) {
+ MISType mis = new MISType();
+
+ Target targetObject = new Target();
+ targetObject.setValue(target);
+ mis.setTarget(targetObject);
+
+ mis.setOAFriendlyName(oaFriendlyName);
+
+ Filters filterObject = new Filters();
+ MandateIdentifiers mandateIds = new MandateIdentifiers();
+ for(String current : filters.split(","))
+ mandateIds.getMandateIdentifier().add(current.trim());
+ filterObject.setMandateIdentifiers(mandateIds);
+ mis.setFilters(filterObject);
+
+ request.setMIS(mis);
+ }
Logger.info("Starte Kommunikation mit dem Stammzahlenregister Gateway(" + connectionParameters.getUrl() + ")...");
CreateIdentityLinkResponse response = client.sentCreateIDLRequest(request , connectionParameters.getUrl());
@@ -1791,8 +1810,10 @@ public class AuthenticationServer implements MOAIDAuthConstants {
*/
public CreateIdentityLinkResponse getIdentityLink(String citizenSignature,
String representative, String represented, String mandateContent,
- String organizationAddress, String organizationType) throws SZRGWClientException {
- return getIdentityLink(null, null, null, null, null, citizenSignature, represented, representative, mandateContent, organizationAddress, organizationType);
+ String organizationAddress, String organizationType, String target, String oaFriendlyName, String filters) throws SZRGWClientException {
+ return getIdentityLink(null, null, null, null, null,
+ citizenSignature, represented, representative, mandateContent, organizationAddress,
+ organizationType, target, oaFriendlyName, filters);
}
/**
@@ -1812,8 +1833,10 @@ public class AuthenticationServer implements MOAIDAuthConstants {
public CreateIdentityLinkResponse getIdentityLink(String eIdentifier,
String givenName, String lastName, String dateOfBirth, String gender,
String citizenSignature, String representative, String represented,
- String mandate) throws SZRGWClientException {
- return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender, citizenSignature, representative, represented, mandate, null, null);
+ String mandate, String target, String oaFriendlyName, String filters) throws SZRGWClientException {
+ return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender,
+ citizenSignature, representative, represented, mandate, null,
+ null, target, oaFriendlyName, filters);
}
/**