aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java/at/gv/egovernment
diff options
context:
space:
mode:
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java37
1 files changed, 28 insertions, 9 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 fd47c5f53..766f6e984 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
@@ -1714,7 +1714,7 @@ public class AuthenticationServer implements MOAIDAuthConstants {
* @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 targetType, String targetValue, String oaFriendlyName, String filters) 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 targetType, String targetValue, String oaFriendlyName, List<String> filters) throws SZRGWClientException {
try {
AuthConfigurationProvider authConf = AuthConfigurationProvider.getInstance();
@@ -1751,7 +1751,9 @@ public class AuthenticationServer implements MOAIDAuthConstants {
Filters filterObject = new Filters();
MandateIdentifiers mandateIds = new MandateIdentifiers();
- for(String current : filters.split(","))
+
+ //TODO!
+ for(String current : filters)
mandateIds.getMandateIdentifier().add(current.trim());
filterObject.setMandateIdentifiers(mandateIds);
mis.setFilters(filterObject);
@@ -1815,7 +1817,7 @@ public class AuthenticationServer implements MOAIDAuthConstants {
*/
public CreateIdentityLinkResponse getIdentityLink(String citizenSignature,
String representative, String represented, String mandateContent,
- String organizationAddress, String organizationType, String targetType, String targetValue, String oaFriendlyName, String filters) throws SZRGWClientException {
+ String organizationAddress, String organizationType, String targetType, String targetValue, String oaFriendlyName, List<String> filters) throws SZRGWClientException {
return getIdentityLink(null, null, null, null, null,
citizenSignature, represented, representative, mandateContent, organizationAddress,
organizationType, targetType, targetValue, oaFriendlyName, filters);
@@ -1838,7 +1840,7 @@ 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, String targetType, String targetValue, String oaFriendlyName, String filters) throws SZRGWClientException {
+ String mandate, String targetType, String targetValue, String oaFriendlyName, List<String> filters) throws SZRGWClientException {
return getIdentityLink(eIdentifier, givenName, lastName, dateOfBirth, gender,
citizenSignature, representative, represented, mandate, null,
null, targetType, targetValue, oaFriendlyName, filters);
@@ -1959,12 +1961,27 @@ public class AuthenticationServer implements MOAIDAuthConstants {
Logger.debug("STORK AuthnRequest succesfully assembled.");
- STORKSAMLEngine samlEngine = STORKSAMLEngine.getInstance("outgoing");
+ STORKSAMLEngine samlEngine = null;
+
+ try {
+ samlEngine = STORKSAMLEngine.getInstance("outgoing");
+
+ } catch (Exception e) {
+ Logger.error("STORK engine initialization FAILED with error "
+ + e.getLocalizedMessage(), e);
+ throw new MOAIDException("stork.11", null, e);
+
+ }
+ if (samlEngine == null)
+ throw new MOAIDException("stork.11", null);
+
+
try {
authnRequest = samlEngine.generateSTORKAuthnRequest(authnRequest);
- } catch (STORKSAMLEngineException e) {
+
+ } catch (Exception e ) {
Logger.error("Could not sign STORK SAML AuthnRequest.", e);
- throw new MOAIDException("stork.00", null);
+ throw new MOAIDException("stork.00", null, e);
}
Logger.info("STORK AuthnRequest successfully signed!");
@@ -1972,10 +1989,12 @@ public class AuthenticationServer implements MOAIDAuthConstants {
//validate AuthnRequest
try {
samlEngine.validateSTORKAuthnRequest(authnRequest.getTokenSaml());
- } catch (STORKSAMLEngineException e) {
+
+ } catch (Exception e) {
Logger.error("STORK SAML AuthnRequest not valid.", e);
throw new MOAIDException("stork.01", null);
- }
+
+ }
Logger.debug("STORK AuthnRequest successfully internally validated.");