From 0fe2bed17c674587a60e63fac211a0354ab4ef03 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 10 Mar 2016 16:07:58 +0100 Subject: remove axis 1 implementation completely --- id/server/auth-edu/pom.xml | 14 +++- id/server/auth-final/pom.xml | 14 +++- .../auth/builder/SignatureVerificationUtils.java | 2 +- .../auth/invoke/SignatureVerificationInvoker.java | 77 +++++++++++++++------- .../moa/id/auth/AuthenticationServer.java | 5 +- 5 files changed, 81 insertions(+), 31 deletions(-) (limited to 'id/server') diff --git a/id/server/auth-edu/pom.xml b/id/server/auth-edu/pom.xml index 0812745b6..404b7c354 100644 --- a/id/server/auth-edu/pom.xml +++ b/id/server/auth-edu/pom.xml @@ -106,7 +106,19 @@ axis-wsdl4j axis - + + axis + axis + + + axis-jaxrpc + org.apache.axis + + + axis-saaj + org.apache.axis + + diff --git a/id/server/auth-final/pom.xml b/id/server/auth-final/pom.xml index a0f20ba1f..776ec00d3 100644 --- a/id/server/auth-final/pom.xml +++ b/id/server/auth-final/pom.xml @@ -90,7 +90,19 @@ axis-wsdl4j axis - + + axis + axis + + + axis-jaxrpc + org.apache.axis + + + axis-saaj + org.apache.axis + + diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java index e321c9d05..f2e4da818 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SignatureVerificationUtils.java @@ -81,7 +81,7 @@ public class SignatureVerificationUtils { Element domVerifyXMLSignatureRequest = build(signature, trustProfileID); //send signature-verification to MOA-SP - Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker() + Element domVerifyXMLSignatureResponse = SignatureVerificationInvoker.getInstance() .verifyXMLSignature(domVerifyXMLSignatureRequest); // parses the diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java index 72a7d3ba1..5c96f6ad2 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/invoke/SignatureVerificationInvoker.java @@ -46,22 +46,16 @@ package at.gv.egovernment.moa.id.auth.invoke; -import java.util.Vector; - import javax.xml.namespace.QName; -import javax.xml.rpc.Call; -import javax.xml.rpc.Service; -import javax.xml.rpc.ServiceFactory; -import org.apache.axis.message.SOAPBodyElement; import org.w3c.dom.Document; import org.w3c.dom.Element; import at.gv.egovernment.moa.id.auth.exception.ServiceException; +import at.gv.egovernment.moa.id.config.ConfigurationException; import at.gv.egovernment.moa.id.config.ConnectionParameter; import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.spss.api.SignatureVerificationService; import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureRequestParser; import at.gv.egovernment.moa.spss.api.xmlbind.VerifyXMLSignatureResponseBuilder; @@ -77,9 +71,43 @@ import at.gv.egovernment.moa.util.MiscUtil; * @version $Id$ */ public class SignatureVerificationInvoker { - /** This QName Object identifies the SignatureVerification endpoint of the web service */ + + private static SignatureVerificationInvoker instance = null; + private SignatureVerificationService svs = null; + + /** This QName Object identifies the SignatureVerification endpoint of the web service */ private static final QName SERVICE_QNAME = new QName("SignatureVerification"); + + public static SignatureVerificationInvoker getInstance() { + if (instance == null) { + instance = new SignatureVerificationInvoker(); + + } + + return instance; + } + + private SignatureVerificationInvoker() { + try { + AuthConfiguration authConfigProvider = AuthConfigurationProviderFactory.getInstance(); + ConnectionParameter authConnParam = authConfigProvider.getMoaSpConnectionParameter(); + + if (authConnParam != null && MiscUtil.isNotEmpty(authConnParam.getUrl())) { + + + } else { + svs = SignatureVerificationService.getInstance(); + + } + + } catch (ConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + } + /** * Method verifyXMLSignature. * @param request to be sent @@ -99,29 +127,28 @@ public class SignatureVerificationInvoker { */ protected Element doCall(QName serviceName, Element request) throws ServiceException { ConnectionParameter authConnParam = null; - try { - Service service = ServiceFactory.newInstance().createService(serviceName); - Call call = service.createCall(); - SOAPBodyElement body = new SOAPBodyElement(request); - SOAPBodyElement[] params = new SOAPBodyElement[] { body }; - Vector responses; - SOAPBodyElement response; - - String endPoint; + try { AuthConfiguration authConfigProvider = AuthConfigurationProviderFactory.getInstance(); authConnParam = authConfigProvider.getMoaSpConnectionParameter(); //If the ConnectionParameter do NOT exist, we try to get the api to work.... if (authConnParam != null && MiscUtil.isNotEmpty(authConnParam.getUrl())) { - Logger.debug("Connecting using auth url: " + authConnParam.getUrl() + ", service " + serviceName.getNamespaceURI() + " : " + serviceName.getLocalPart() + " : "+ serviceName.getPrefix()); - endPoint = authConnParam.getUrl(); - call.setTargetEndpointAddress(endPoint); - responses = (Vector) call.invoke(serviceName, params); - Logger.debug("Got responses: " + responses.size()); // TODO handle axis 302 response when incorrect service url is used - response = (SOAPBodyElement) responses.get(0); - return response.getAsDOM(); + + throw new ServiceException("service.00", new Object[]{"MOA-SP connection via Web-Service is not allowed any more!!!!!!"}); +// Service service = ServiceFactory.newInstance().createService(serviceName); +// Call call = service.createCall(); +// SOAPBodyElement body = new SOAPBodyElement(request); +// SOAPBodyElement[] params = new SOAPBodyElement[] { body }; +// Vector responses; +// SOAPBodyElement response; +// +// Logger.debug("Connecting using auth url: " + authConnParam.getUrl() + ", service " + serviceName.getNamespaceURI() + " : " + serviceName.getLocalPart() + " : "+ serviceName.getPrefix()); +// call.setTargetEndpointAddress(authConnParam.getUrl()); +// responses = (Vector) call.invoke(serviceName, params); +// Logger.debug("Got responses: " + responses.size()); // TODO handle axis 302 response when incorrect service url is used +// response = (SOAPBodyElement) responses.get(0); +// return response.getAsDOM(); } else { - SignatureVerificationService svs = SignatureVerificationService.getInstance(); VerifyXMLSignatureRequest vsrequest = new VerifyXMLSignatureRequestParser().parse(request); VerifyXMLSignatureResponse vsresponse = svs.verifyXMLSignature(vsrequest); diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 21e7f2027..ea4dd868b 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -292,7 +292,7 @@ public class AuthenticationServer extends BaseAuthenticationServer { .getMoaSpIdentityLinkTrustProfileID(pendingReq.getOnlineApplicationConfiguration().isUseIDLTestTrustStore())); // invokes the call - Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker() + Element domVerifyXMLSignatureResponse = SignatureVerificationInvoker.getInstance() .verifyXMLSignature(domVerifyXMLSignatureRequest); // parses the VerifyXMLSignatureResponse verifyXMLSignatureResponse = new VerifyXMLSignatureResponseParser( @@ -952,8 +952,7 @@ public class AuthenticationServer extends BaseAuthenticationServer { // try { // invokes the call - domVsresp = new SignatureVerificationInvoker() - .verifyXMLSignature(domVsreq); + domVsresp = SignatureVerificationInvoker.getInstance().verifyXMLSignature(domVsreq); // parses the VerifyXMLSignatureResponse vsresp = new VerifyXMLSignatureResponseParser( -- cgit v1.2.3 From f67427831d1f8c49ce6c474691b880d90a42b584 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 09:17:57 +0100 Subject: refactor the GUI generation for user interaction --- .../htmlTemplates/loginFormFull.html | 874 +-------------------- .../htmlTemplates/sendAssertionFormFull.html | 581 +------------- .../conf/moa-id/htmlTemplates/css_template.css | 625 +++++++++++++++ .../conf/moa-id/htmlTemplates/error_message.html | 37 + .../moa-id/htmlTemplates/javascript_tempalte.js | 200 +++++ .../conf/moa-id/htmlTemplates/loginFormFull.html | 874 +-------------------- .../conf/moa-id/htmlTemplates/redirectForm.html | 13 + .../htmlTemplates/sendAssertionFormFull.html | 581 +------------- .../conf/moa-id/htmlTemplates/slo_template.html | 372 +-------- id/server/idserverlib/pom.xml | 4 + .../moa/id/advancedlogging/MOAReversionLogger.java | 6 +- .../moa/id/advancedlogging/StatisticLogger.java | 10 +- .../moa/id/advancedlogging/TransactionIDUtils.java | 2 +- .../moa/id/auth/AuthenticationSessionCleaner.java | 4 +- .../moa/id/auth/BaseAuthenticationServer.java | 3 +- .../moa/id/auth/MOAIDAuthConstants.java | 194 ----- .../moa/id/auth/MOAIDAuthInitializer.java | 6 +- .../id/auth/builder/AuthenticationDataBuilder.java | 14 +- .../builder/CreateXMLSignatureRequestBuilder.java | 6 +- .../moa/id/auth/builder/DataURLBuilder.java | 2 +- .../builder/DynamicOAAuthParameterBuilder.java | 6 +- .../moa/id/auth/builder/GUILayoutBuilder.java | 157 ---- .../moa/id/auth/builder/LoginFormBuilder.java | 171 ---- .../moa/id/auth/builder/RedirectFormBuilder.java | 65 -- .../id/auth/builder/SendAssertionFormBuilder.java | 147 ---- .../auth/builder/SignatureVerificationUtils.java | 2 +- .../moa/id/auth/data/AuthenticationSession.java | 2 +- .../id/auth/exception/AuthenticationException.java | 1 + .../moa/id/auth/exception/BKUException.java | 2 + .../moa/id/auth/exception/BuildException.java | 1 + .../exception/DatabaseEncryptionException.java | 2 + .../id/auth/exception/DynamicOABuildException.java | 2 + .../id/auth/exception/ECDSAConverterException.java | 1 + .../exception/InvalidProtocolRequestException.java | 2 + .../auth/exception/MISSimpleClientException.java | 1 + .../moa/id/auth/exception/MOAIDException.java | 222 ------ .../moa/id/auth/exception/MOASPException.java | 2 + .../moa/id/auth/exception/ParseException.java | 1 + .../auth/exception/ProtocolNotActiveException.java | 2 + .../moa/id/auth/exception/ServiceException.java | 1 + .../exception/SessionDataStorageException.java | 45 -- .../moa/id/auth/exception/ValidateException.java | 1 + .../auth/exception/WrongParametersException.java | 1 + .../auth/invoke/SignatureVerificationInvoker.java | 10 +- .../id/auth/modules/AbstractAuthServletTask.java | 6 +- .../id/auth/modules/BKUSelectionModuleImpl.java | 2 +- .../id/auth/modules/TaskExecutionException.java | 2 +- .../internal/tasks/EvaluateBKUSelectionTask.java | 2 +- .../tasks/EvaluateSSOConsentsTaskImpl.java | 2 +- .../internal/tasks/FinalizeAuthenticationTask.java | 4 +- .../tasks/GenerateBKUSelectionFrameTask.java | 43 +- .../GenerateSSOConsentEvaluatorFrameTask.java | 37 +- .../tasks/RestartAuthProzessManagement.java | 2 +- .../StartAuthentificationParameterParser.java | 10 +- .../moa/id/auth/servlet/AbstractController.java | 128 +-- .../AbstractProcessEngineSignalController.java | 6 +- .../id/auth/servlet/GUILayoutBuilderServlet.java | 128 --- .../GeneralProcessEngineSignalController.java | 6 +- .../id/auth/servlet/IDPSingleLogOutServlet.java | 66 +- .../moa/id/auth/servlet/LogOutServlet.java | 4 +- .../moa/id/auth/servlet/RedirectServlet.java | 48 +- .../WebFrontEndSecurityInterceptor.java | 6 +- .../gv/egovernment/moa/id/client/SZRGWClient.java | 25 +- .../moa/id/client/SZRGWClientException.java | 2 +- .../moa/id/client/utils/SZRGWClientUtils.java | 12 +- .../moa/id/config/ConfigurationException.java | 82 -- .../moa/id/config/ConfigurationProvider.java | 66 -- .../moa/id/config/ConfigurationProviderImpl.java | 2 + .../moa/id/config/ConnectionParameter.java | 1 + .../id/config/ConnectionParameterInterface.java | 35 - .../moa/id/config/auth/AuthConfiguration.java | 165 ---- .../auth/AuthConfigurationProviderFactory.java | 3 +- .../moa/id/config/auth/IOAAuthParameters.java | 224 ------ .../moa/id/config/auth/OAAuthParameter.java | 64 +- .../PropertyBasedAuthConfigurationProvider.java | 15 +- .../config/auth/data/BPKDecryptionParameters.java | 137 ---- .../config/auth/data/DynamicOAAuthParameters.java | 18 +- .../moa/id/config/auth/data/ProtocolAllowed.java | 91 --- .../auth/data/SAML1ConfigurationParameters.java | 276 ------- .../gv/egovernment/moa/id/config/stork/CPEPS.java | 138 ---- .../moa/id/config/stork/STORKConfig.java | 33 +- .../config/stork/SignatureCreationParameter.java | 103 --- .../stork/SignatureVerificationParameter.java | 53 -- .../moa/id/config/stork/StorkAttribute.java | 27 - .../config/stork/StorkAttributeProviderPlugin.java | 81 -- .../moa/id/data/AuthenticationData.java | 2 +- .../moa/id/moduls/AuthenticationManager.java | 67 +- .../at/gv/egovernment/moa/id/moduls/IAction.java | 3 +- .../gv/egovernment/moa/id/moduls/IModulInfo.java | 2 + .../at/gv/egovernment/moa/id/moduls/IRequest.java | 202 ----- .../egovernment/moa/id/moduls/IRequestStorage.java | 3 +- .../id/moduls/NoPassivAuthenticationException.java | 2 +- .../gv/egovernment/moa/id/moduls/RequestImpl.java | 9 +- .../egovernment/moa/id/moduls/RequestStorage.java | 3 +- .../gv/egovernment/moa/id/moduls/SSOManager.java | 82 +- .../egovernment/moa/id/process/ProcessEngine.java | 2 +- .../moa/id/process/ProcessEngineImpl.java | 4 +- .../at/gv/egovernment/moa/id/process/api/Task.java | 2 +- .../moa/id/process/springweb/MoaIdTask.java | 2 +- .../AbstractAuthProtocolModulController.java | 4 +- .../protocols/ProtocolFinalizationController.java | 6 +- .../builder/attributes/BPKAttributeBuilder.java | 2 +- .../attributes/BirthdateAttributeBuilder.java | 2 +- .../protocols/builder/attributes/EIDAuthBlock.java | 2 +- .../id/protocols/builder/attributes/EIDCcsURL.java | 2 +- .../EIDCitizenQAALevelAttributeBuilder.java | 2 +- .../builder/attributes/EIDIdentityLinkBuilder.java | 2 +- .../EIDIssuingNationAttributeBuilder.java | 2 +- .../builder/attributes/EIDSTORKTOKEN.java | 2 +- .../attributes/EIDSectorForIDAttributeBuilder.java | 2 +- .../builder/attributes/EIDSignerCertificate.java | 2 +- .../protocols/builder/attributes/EIDSourcePIN.java | 2 +- .../builder/attributes/EIDSourcePINType.java | 2 +- .../attributes/EncryptedBPKAttributeBuilder.java | 2 +- .../attributes/GivenNameAttributeBuilder.java | 2 +- .../protocols/builder/attributes/HolderOfKey.java | 4 +- .../builder/attributes/IAttributeBuilder.java | 2 +- .../MandateFullMandateAttributeBuilder.java | 2 +- ...MandateLegalPersonFullNameAttributeBuilder.java | 2 +- ...andateLegalPersonSourcePinAttributeBuilder.java | 2 +- ...teLegalPersonSourcePinTypeAttributeBuilder.java | 2 +- .../MandateNaturalPersonBPKAttributeBuilder.java | 2 +- ...dateNaturalPersonBirthDateAttributeBuilder.java | 2 +- ...ateNaturalPersonFamilyNameAttributeBuilder.java | 2 +- ...dateNaturalPersonGivenNameAttributeBuilder.java | 2 +- ...dateNaturalPersonSourcePinAttributeBuilder.java | 2 +- ...NaturalPersonSourcePinTypeAttributeBuilder.java | 2 +- .../MandateProfRepDescAttributeBuilder.java | 2 +- .../MandateProfRepOIDAttributeBuilder.java | 2 +- .../MandateReferenceValueAttributeBuilder.java | 2 +- .../attributes/MandateTypeAttributeBuilder.java | 2 +- .../attributes/PVPVersionAttributeBuilder.java | 2 +- .../attributes/PrincipalNameAttributeBuilder.java | 2 +- .../id/protocols/pvp2x/AttributQueryAction.java | 14 +- .../id/protocols/pvp2x/AuthenticationAction.java | 6 +- .../moa/id/protocols/pvp2x/MetadataAction.java | 4 +- .../moa/id/protocols/pvp2x/PVP2XProtocol.java | 16 +- .../moa/id/protocols/pvp2x/SingleLogOutAction.java | 6 +- .../id/protocols/pvp2x/binding/PostBinding.java | 2 +- .../pvp2x/builder/AttributQueryBuilder.java | 4 +- .../pvp2x/builder/AuthResponseBuilder.java | 2 +- .../pvp2x/builder/PVPAttributeBuilder.java | 2 +- .../pvp2x/builder/PVPAuthnRequestBuilder.java | 2 +- .../pvp2x/builder/PVPMetadataBuilder.java | 2 +- .../pvp2x/builder/SingleLogOutBuilder.java | 6 +- .../builder/assertion/PVP2AssertionBuilder.java | 6 +- .../pvp2x/config/IDPPVPMetadataConfiguration.java | 2 +- .../protocols/pvp2x/config/PVPConfiguration.java | 4 +- .../exceptions/AssertionValidationExeption.java | 2 +- .../exceptions/AuthnRequestValidatorException.java | 2 +- .../protocols/pvp2x/exceptions/PVP2Exception.java | 2 +- .../pvp2x/metadata/MOAMetadataProvider.java | 12 +- .../pvp2x/metadata/SimpleMOAMetadataProvider.java | 2 +- .../signer/CredentialsNotAvailableException.java | 2 +- .../pvp2x/signer/IDPCredentialProvider.java | 2 +- .../protocols/pvp2x/utils/MOASAMLSOAPClient.java | 2 +- .../pvp2x/validation/ChainSAMLValidator.java | 2 +- .../protocols/pvp2x/validation/ISAMLValidator.java | 2 +- .../pvp2x/validation/SAMLSignatureValidator.java | 2 +- .../pvp2x/verification/ChainSAMLVerifier.java | 2 +- .../pvp2x/verification/EntityVerifier.java | 8 +- .../pvp2x/verification/ISAMLVerifier.java | 2 +- .../verification/SAMLVerificationEngineSP.java | 6 +- .../metadata/MOASPMetadataSignatureFilter.java | 2 +- .../metadata/MetadataSignatureFilter.java | 3 +- .../metadata/SchemaValidationFilter.java | 2 +- .../storage/DBAuthenticationSessionStoreage.java | 8 +- .../id/storage/IAuthenticationSessionStoreage.java | 2 +- .../moa/id/util/ErrorResponseUtils.java | 2 +- .../gv/egovernment/moa/id/util/FormBuildUtils.java | 136 ---- .../moa/id/util/IdentityLinkReSigner.java | 4 +- .../moa/id/util/MOAIDMessageProvider.java | 104 --- .../moa/id/util/ParamValidatorUtils.java | 6 +- .../at/gv/egovernment/moa/id/util/SSLUtils.java | 6 +- .../moa/id/util/VelocityLogAdapter.java | 99 --- .../egovernment/moa/id/util/VelocityProvider.java | 112 --- .../moa/id/util/legacy/LegacyHelper.java | 2 +- .../resources/properties/id_messages_de.properties | 1 + .../resources/resources/templates/css_template.css | 623 --------------- .../resources/templates/error_message.html | 37 - .../resources/templates/javascript_tempalte.js | 196 ----- .../resources/templates/loginFormFull.html | 92 --- .../resources/templates/redirectForm.html | 13 - .../resources/templates/sendAssertionFormFull.html | 68 -- .../resources/templates/slo_template.html | 94 --- .../resources/templates/sso_transfer_template.html | 59 -- .../moa/id/module/test/TestRequestImpl.java | 6 +- .../spring/test/task/CreateSAML1AssertionTask.java | 2 +- .../spring/test/task/GetIdentityLinkTask.java | 2 +- .../id/process/spring/test/task/SelectBKUTask.java | 2 +- .../spring/test/task/SignAuthBlockTask.java | 2 +- .../spring/test/task/ValidateIdentityLinkTask.java | 2 +- .../test/task/ValidateSignedAuthBlockTask.java | 2 +- .../moa/id/process/test/HalloWeltTask.java | 2 +- .../moa/id/process/test/HelloWorldTask.java | 2 +- .../at/gv/egovernment/moa/id/UnitTestCase.java | 3 +- id/server/moa-id-commons/pom.xml | 27 + .../moa/id/commons/MOAIDAuthConstants.java | 193 +++++ .../moa/id/commons/api/AuthConfiguration.java | 162 ++++ .../moa/id/commons/api/ConfigurationProvider.java | 66 ++ .../commons/api/ConnectionParameterInterface.java | 35 + .../moa/id/commons/api/IOAAuthParameters.java | 222 ++++++ .../egovernment/moa/id/commons/api/IRequest.java | 201 +++++ .../moa/id/commons/api/IStorkConfig.java | 51 ++ .../commons/api/data/BPKDecryptionParameters.java | 135 ++++ .../egovernment/moa/id/commons/api/data/CPEPS.java | 138 ++++ .../moa/id/commons/api/data/ProtocolAllowed.java | 91 +++ .../api/data/SAML1ConfigurationParameters.java | 276 +++++++ .../api/data/SignatureCreationParameter.java | 103 +++ .../api/data/SignatureVerificationParameter.java | 53 ++ .../moa/id/commons/api/data/StorkAttribute.java | 27 + .../api/data/StorkAttributeProviderPlugin.java | 81 ++ .../api/exceptions/ConfigurationException.java | 78 ++ .../id/commons/api/exceptions/MOAIDException.java | 222 ++++++ .../exceptions/SessionDataStorageException.java | 45 ++ .../moa/id/commons/utils/MOAIDMessageProvider.java | 104 +++ id/server/moa-id-frontend-resources/pom.xml | 23 +- .../AbstractGUIFormBuilderConfiguration.java | 106 +++ .../DefaultGUIFormBuilderConfiguration.java | 120 +++ .../auth/frontend/builder/GUIFormBuilderImpl.java | 221 ++++++ .../frontend/builder/IGUIBuilderConfiguration.java | 74 ++ .../id/auth/frontend/builder/IGUIFormBuilder.java | 67 ++ ...roviderSpecificGUIFormBuilderConfiguration.java | 186 +++++ .../auth/frontend/exception/GUIBuildException.java | 46 ++ .../moa/id/auth/frontend/utils/FormBuildUtils.java | 178 +++++ .../auth/frontend/velocity/VelocityLogAdapter.java | 99 +++ .../auth/frontend/velocity/VelocityProvider.java | 113 +++ .../src/main/resources/templates/css_template.css | 625 +++++++++++++++ .../main/resources/templates/error_message.html | 37 + .../resources/templates/javascript_tempalte.js | 200 +++++ .../main/resources/templates/loginFormFull.html | 92 +++ .../src/main/resources/templates/redirectForm.html | 13 + .../resources/templates/sendAssertionFormFull.html | 52 ++ .../src/main/resources/templates/slo_template.html | 94 +++ .../resources/templates/sso_transfer_template.html | 59 ++ .../moa/id/auth/MOAIDAuthSpringInitializer.java | 2 +- .../moa/id/auth/AuthenticationServer.java | 11 +- .../AuthenticationBlockAssertionBuilder.java | 4 +- .../auth/builder/GetIdentityLinkFormBuilder.java | 45 +- .../internal/DefaultCitizenCardAuthModuleImpl.java | 2 +- .../internal/tasks/CertificateReadRequestTask.java | 6 +- .../internal/tasks/CreateIdentityLinkFormTask.java | 8 +- .../modules/internal/tasks/GetForeignIDTask.java | 12 +- .../internal/tasks/GetMISSessionIDTask.java | 10 +- .../tasks/InitializeBKUAuthenticationTask.java | 6 +- .../tasks/PrepareAuthBlockSignatureTask.java | 4 +- .../internal/tasks/PrepareGetMISMandateTask.java | 10 +- .../tasks/VerifyAuthenticationBlockTask.java | 10 +- .../internal/tasks/VerifyCertificateTask.java | 12 +- .../internal/tasks/VerifyIdentityLinkTask.java | 8 +- .../CreateXMLSignatureResponseValidator.java | 8 +- .../VerifyXMLSignatureResponseValidator.java | 8 +- .../moa/id/auth/validator/parep/ParepUtils.java | 2 +- .../moa/id/util/CitizenCardServletUtils.java | 6 +- .../MOAIDCertificateManagerConfigurationImpl.java | 8 +- .../MOAeIDASSAMLEngineConfigurationImpl.java | 2 +- .../modules/eidas/config/ModifiedEncryptionSW.java | 4 +- .../engine/MOAeIDASChainingMetadataProvider.java | 2 +- .../EIDASEngineConfigurationException.java | 2 +- .../eidas/tasks/CreateIdentityLinkTask.java | 2 +- .../eidas/tasks/GenerateAuthnRequestTask.java | 12 +- .../eidas/tasks/ReceiveAuthnResponseTask.java | 2 +- .../moa/id/protocols/eidas/EIDASProtocol.java | 9 +- .../id/protocols/eidas/EidasMetaDataRequest.java | 4 +- .../eidas/eIDASAuthenticationRequest.java | 6 +- .../config/ELGAMandatesMetadataConfiguration.java | 2 +- .../controller/ELGAMandateMetadataController.java | 2 +- .../exceptions/ELGAMetadataException.java | 2 +- .../tasks/ELGAInitializeBKUAuthenticationTask.java | 4 +- .../elgamandates/tasks/RequestELGAMandateTask.java | 4 +- .../utils/ELGAMandateServiceMetadataProvider.java | 2 +- .../utils/ELGAMandatesCredentialProvider.java | 2 +- .../id/protocols/oauth20/OAuth20Configuration.java | 2 +- .../attributes/OAuth20AttributeBuilder.java | 2 +- .../attributes/OpenIdAudiencesAttribute.java | 2 +- .../OpenIdAuthenticationTimeAttribute.java | 2 +- .../attributes/OpenIdExpirationTimeAttribute.java | 2 +- .../attributes/OpenIdIssueInstantAttribute.java | 2 +- .../oauth20/attributes/OpenIdIssuerAttribute.java | 2 +- .../oauth20/attributes/OpenIdNonceAttribute.java | 2 +- .../OpenIdSubjectIdentifierAttribute.java | 2 +- .../attributes/ProfileDateOfBirthAttribute.java | 2 +- .../attributes/ProfileFamilyNameAttribute.java | 2 +- .../attributes/ProfileGivenNameAttribute.java | 2 +- .../oauth20/exceptions/OAuth20Exception.java | 2 +- .../oauth20/protocol/OAuth20AuthAction.java | 6 +- .../oauth20/protocol/OAuth20AuthRequest.java | 6 +- .../oauth20/protocol/OAuth20BaseRequest.java | 6 +- .../oauth20/protocol/OAuth20Protocol.java | 4 +- .../oauth20/protocol/OAuth20TokenAction.java | 4 +- .../oauth20/protocol/OAuth20TokenRequest.java | 6 +- .../modules/moa-id-module-ssoTransfer/pom.xml | 5 + .../data/SSOTransferAuthenticationData.java | 6 +- .../data/SSOTransferOnlineApplication.java | 19 +- .../ssotransfer/servlet/SSOTransferServlet.java | 61 +- .../servlet/SSOTransferSignalServlet.java | 4 +- .../task/InitializeRestoreSSOSessionTask.java | 13 +- .../ssotransfer/task/RestoreSSOSessionTask.java | 8 +- .../auth/modules/ssotransfer/utils/GUIUtils.java | 136 +--- .../ssotransfer/utils/SSOContainerUtils.java | 10 +- .../FederatedAuthenticationModuleImpl.java | 2 +- .../config/FederatedAuthMetadataConfiguration.java | 2 +- .../FederatedAuthMetadataController.java | 2 +- .../tasks/CreateAuthnRequestTask.java | 11 +- .../tasks/ReceiveAuthnResponseTask.java | 15 +- .../utils/FederatedAuthCredentialProvider.java | 2 +- id/server/modules/moa-id-modules-saml1/pom.xml | 7 + .../moa/id/protocols/saml1/GetArtifactAction.java | 6 +- .../saml1/GetAuthenticationDataService.java | 6 +- .../protocols/saml1/SAML1AuthenticationServer.java | 10 +- .../moa/id/protocols/saml1/SAML1Protocol.java | 11 +- .../moa/id/protocols/saml1/SAML1RequestImpl.java | 2 +- .../moa/id/auth/servlet/MonitoringServlet.java | 4 +- .../moa/id/monitoring/DatabaseTestModule.java | 2 +- .../moa/id/monitoring/IdentityLinkTestModule.java | 5 +- .../egovernment/moa/id/monitoring/TestManager.java | 4 +- id/server/pom.xml | 6 +- 317 files changed, 6476 insertions(+), 8596 deletions(-) create mode 100644 id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css create mode 100644 id/server/data/deploy/conf/moa-id/htmlTemplates/error_message.html create mode 100644 id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js create mode 100644 id/server/data/deploy/conf/moa-id/htmlTemplates/redirectForm.html delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthConstants.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/GUILayoutBuilder.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/LoginFormBuilder.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/RedirectFormBuilder.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/SendAssertionFormBuilder.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/MOAIDException.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/SessionDataStorageException.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationException.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProvider.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConnectionParameterInterface.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/AuthConfiguration.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/IOAAuthParameters.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/BPKDecryptionParameters.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/ProtocolAllowed.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/data/SAML1ConfigurationParameters.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/CPEPS.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/SignatureCreationParameter.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/SignatureVerificationParameter.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/StorkAttribute.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/stork/StorkAttributeProviderPlugin.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/IRequest.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/FormBuildUtils.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/MOAIDMessageProvider.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/VelocityLogAdapter.java delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/VelocityProvider.java delete mode 100644 id/server/idserverlib/src/main/resources/resources/templates/css_template.css delete mode 100644 id/server/idserverlib/src/main/resources/resources/templates/error_message.html delete mode 100644 id/server/idserverlib/src/main/resources/resources/templates/javascript_tempalte.js delete mode 100644 id/server/idserverlib/src/main/resources/resources/templates/loginFormFull.html delete mode 100644 id/server/idserverlib/src/main/resources/resources/templates/redirectForm.html delete mode 100644 id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html delete mode 100644 id/server/idserverlib/src/main/resources/resources/templates/slo_template.html delete mode 100644 id/server/idserverlib/src/main/resources/resources/templates/sso_transfer_template.html create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/MOAIDAuthConstants.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/ConfigurationProvider.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/ConnectionParameterInterface.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IOAAuthParameters.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IRequest.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IStorkConfig.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/BPKDecryptionParameters.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/CPEPS.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/ProtocolAllowed.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SAML1ConfigurationParameters.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SignatureCreationParameter.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SignatureVerificationParameter.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/StorkAttribute.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/StorkAttributeProviderPlugin.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/ConfigurationException.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/MOAIDException.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/SessionDataStorageException.java create mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/IGUIBuilderConfiguration.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/IGUIFormBuilder.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/exception/GUIBuildException.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/utils/FormBuildUtils.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/velocity/VelocityLogAdapter.java create mode 100644 id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/velocity/VelocityProvider.java create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/error_message.html create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/redirectForm.html create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/sendAssertionFormFull.html create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/slo_template.html create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/sso_transfer_template.html (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html index 2b0115d4a..02b86472b 100644 --- a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html @@ -4,847 +4,29 @@ - - - + + + + Anmeldung mittels Bürgerkarte oder Handy-Signatur
-

Anmeldung an: #OAName#

+

Anmeldung an: $OAName

-

#HEADER_TEXT#

+

$HEADER_TEXT

-
+
+ onClick='document.getElementById("mandateCheckBox").setAttribute("aria-checked", document.getElementById("mandateCheckBox").checked);'$MANDATECHECKED> -
+

Home Country Selection

i @@ -907,16 +87,6 @@

-
diff --git a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/sendAssertionFormFull.html b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/sendAssertionFormFull.html index 07d018a94..a9f0c4238 100644 --- a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/sendAssertionFormFull.html +++ b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/sendAssertionFormFull.html @@ -3,556 +3,7 @@ - - + Anmeldung an Online-Applikation @@ -574,25 +25,21 @@
-

Anmeldung an: #OAName#

+

Anmeldung an: $OAName

-
+ - - - - + +
-
+ - - - - + +
@@ -600,18 +47,6 @@
-
diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css b/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css new file mode 100644 index 000000000..a8735be60 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css @@ -0,0 +1,625 @@ +@charset "utf-8"; + @media screen and (min-width: 650px) { + + body { + margin:0; + padding:0; + color : #000; + background-color : #fff; + text-align: center; + background-color: #6B7B8B; + } + + .browserInfoButton{ + color: rgb(128, 128, 128); + } + + #localBKU p { + font-size: 0.7em; + } + + #localBKU input{ + font-size: 0.85em; + /*border-radius: 5px;*/ + } + + #bkuselectionarea input[type=button] { + font-size: 0.85em; + /*border-radius: 7px;*/ + margin-bottom: 25px; + min-width: 80px; + } + + #mandateLogin { + font-size: 0.85em; + } + + #bku_header h2 { + font-size: 0.8em; + } + + + #page { + display: block; + border: 2px solid rgb(0,0,0); + width: 650px; + height: 460px; + margin: 0 auto; + margin-top: 5%; + position: relative; + border-radius: 25px; + background: rgb(255,255,255); + } + + #page1 { + text-align: center; + } + + #main { + /* clear:both; */ + position:relative; + margin: 0 auto; + width: 250px; + text-align: center; + } + + .OA_header { + /* background-color: white;*/ + font-size: 20pt; + margin-bottom: 25px; + margin-top: 25px; + } + + #leftcontent { + /*float:left; */ + width:250px; + margin-bottom: 25px; + text-align: left; + border: 1px solid rgb(0,0,0); + } + + #selectArea { + font-size: 15px; + padding-bottom: 65px; + } + + #leftcontent { + width: 300px; + margin-top: 30px; + } + + #bku_header { + height: 5%; + padding-bottom: 3px; + padding-top: 3px; + } + + #bkulogin { + overflow:hidden; + min-width: 190px; + min-height: 180px; + /*height: 260px;*/ + } + + h2#tabheader{ + font-size: 1.1em; + padding-left: 2%; + padding-right: 2%; + position: relative; + } + + #stork h2 { + font-size: 1.0em; + margin-bottom: 2%; + } + + .setAssertionButton_full { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 100px; + height: 30px + } + + #leftbutton { + width: 30%; + float:left; + margin-left: 40px; + } + + #rightbutton { + width: 30%; + float:right; + margin-right: 45px; + text-align: right; + } + + button { + height: 25px; + width: 75px; + margin-bottom: 10px; + } + + + + #validation { + position: absolute; + bottom: 0px; + margin-left: 270px; + padding-bottom: 10px; + } + + } + + @media screen and (max-width: 205px) { + #localBKU p { + font-size: 0.6em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + + #localBKU input { + font-size: 0.6em; + min-width: 60px; + /* max-width: 65px; */ + min-height: 1.0em; + /* border-radius: 5px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 0.7em; + min-width: 55px; + /*min-height: 1.1em; + border-radius: 5px;*/ + margin-bottom: 2% + } + + #mandateLogin { + font-size: 0.65em; + } + + #bku_header h2 { + font-size: 0.8em; + margin-top: -0.4em; + padding-top: 0.4em; + } + + #bkulogin { + min-height: 150px; + } + } + + @media screen and (max-width: 249px) and (min-width: 206px) { + #localBKU p { + font-size: 0.7em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + + #localBKU input { + font-size: 0.7em; + min-width: 70px; + /* max-width: 75px; */ + min-height: 0.95em; + /* border-radius: 6px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 0.75em; + min-width: 60px; + /* min-height: 0.95em; + border-radius: 6px; */ + margin-bottom: 5% + } + + #mandateLogin { + font-size: 0.75em; + } + + #bku_header h2 { + font-size: 0.9em; + margin-top: -0.45em; + padding-top: 0.45em; + } + + #bkulogin { + min-height: 180px; + } + } + + @media screen and (max-width: 299px) and (min-width: 250px) { + #localBKU p { + font-size: 0.9em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + + #localBKU input { + font-size: 0.8em; + min-width: 70px; + /* max-width: 75px; */ + /* border-radius: 6px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 0.85em; + /* min-height: 1.05em; + border-radius: 7px; */ + margin-bottom: 10%; + } + + #mandateLogin { + font-size: 1em; + } + + #bku_header h2 { + font-size: 1.0em; + margin-top: -0.50em; + padding-top: 0.50em; + } + } + + @media screen and (max-width: 399px) and (min-width: 300px) { + #localBKU p { + font-size: 0.9em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + #localBKU input { + font-size: 0.8em; + min-width: 70px; + /* max-width: 75px; */ + /* border-radius: 6px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 0.9em; + /* min-height: 1.2em; + border-radius: 8px; */ + margin-bottom: 10%; + max-width: 80px; + } + + #mandateLogin { + font-size: 1em; + } + + #bku_header h2 { + font-size: 1.1em; + margin-top: -0.55em; + padding-top: 0.55em; + } + } + + @media screen and (max-width: 649px) and (min-width: 400px) { + #localBKU p { + font-size: 0.9em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + #localBKU input { + font-size: 0.8em; + min-width: 70px; + /* max-width: 80px; */ + /* border-radius: 6px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 1.0em; + /* min-height: 1.3em; + border-radius: 10px; */ + margin-bottom: 10%; + max-width: 85px; + } + + #mandateLogin { + font-size: 1.2em; + } + + #bku_header h2 { + font-size: 1.3em; + margin-top: -0.65em; + padding-top: 0.65em; + } + } + + + + @media screen and (max-width: 649px) { + + body { + margin:0; + padding:0; + color : #000; + text-align: center; + font-size: 100%; + background-color: $MAIN_BACKGOUNDCOLOR; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + #page { + visibility: hidden; + margin-top: 0%; + } + + #page1 { + visibility: hidden; + } + + #main { + visibility: hidden; + } + + #validation { + visibility: hidden; + display: none; + } + + .OA_header { + margin-bottom: 0px; + margin-top: 0px; + font-size: 0pt; + visibility: hidden; + } + + #leftcontent { + visibility: visible; + margin-bottom: 0px; + text-align: left; + border:none; + vertical-align: middle; + min-height: 173px; + min-width: 204px; + + } + + #bku_header { + height: 10%; + min-height: 1.2em; + margin-top: 1%; + } + + h2#tabheader{ + padding-left: 2%; + padding-right: 2%; + position: relative; + top: 50%; + } + + #stork h2 { + font-size: 0.9em; + margin-bottom: 2%; + } + + #bkulogin { + min-width: 190px; + min-height: 155px; + } + + .setAssertionButton_full { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 70px; + height: 25px; + } + + input[type=button] { +/* height: 11%; */ + width: 70%; + } + } + + * { + margin: 0; + padding: 0; + #if($FONTTYPE) + font-family: $FONTTYPE; + #end + } + + #selectArea { + padding-top: 10px; + padding-bottom: 55px; + padding-left: 10px; + } + + .setAssertionButton { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 70px; + height: 25px; + } + + #leftbutton { + width: 35%; + float:left; + margin-left: 15px; + } + + #rightbutton { + width: 35%; + float:right; + margin-right: 25px; + text-align: right; + } + + #stork { + /*margin-bottom: 10px;*/ + /* margin-top: 5px; */ + } + + #mandateLogin { + padding-bottom: 4%; + padding-top: 4%; + height: 10%; + position: relative; + text-align: center; + } + + .verticalcenter { + vertical-align: middle; + } + + #mandateLogin div { + clear: both; + margin-top: -1%; + position: relative; + top: 50%; + } + + #bkuselectionarea { + position: relative; + display: block; + } + + #localBKU { + padding-bottom: 4%; + /*padding-top: 4%;*/ + position: relative; + clear: both; + text-align: center; + } + + #bkukarte { + float:left; + text-align:center; + width:40%; + min-height: 70px; + padding-left: 5%; + padding-top: 2%; + } + + #bkuhandy { + float:right; + text-align:center; + width:40%; + min-height: 90px; + padding-right: 5%; + padding-top: 2%; + } + + .bkuimage { + width: 90%; + height: auto; + } + + #mandate{ + text-align:center; + padding : 5px 5px 5px 5px; + } + +/* input[type=button], .sendButton { + background: $BUTTON_BACKGROUNDCOLOR; + color: $BUTTON_COLOR; +/* border:1px solid #000; */ +/* cursor: pointer; +/* box-shadow: 3px 3px 3px #222222; */ +/* } + +/* button:hover, button:focus, button:active, + .sendButton:hover , .sendButton:focus, .sendButton:active, + #mandateCheckBox:hover, #mandateCheckBox:focus, #mandateCheckBox:active { + background: $BUTTON_BACKGROUNDCOLOR_FOCUS; + color: $BUTTON_COLOR; +/* border:1px solid #000; */ +/* cursor: pointer; +/* box-shadow: -1px -1px 3px #222222; */ +/* } + +*/ + input { + /*border:1px solid #000;*/ + cursor: pointer; + } + + #localBKU input { +/* color: $BUTTON_COLOR; */ + /*border: 0px;*/ + display: inline-block; + + } + + #localBKU input:hover, #localBKU input:focus, #localBKU input:active { + /*text-decoration: underline;*/ + } + + #installJava, #BrowserNOK { + clear:both; + font-size:0.8em; + padding:4px; + } + + .selectText{ + + } + + .selectTextHeader{ + + } + + .sendButton { + width: 30%; + margin-bottom: 1%; + } + + #leftcontent a { + text-decoration:none; + color: #000; + /* display:block;*/ + padding:4px; + } + + #leftcontent a:hover, #leftcontent a:focus, #leftcontent a:active { + text-decoration:underline; + color: #000; + } + + .infobutton { + background-color: #005a00; + color: white; + font-family: serif; + text-decoration: none; + padding-top: 2px; + padding-right: 4px; + padding-bottom: 2px; + padding-left: 4px; + font-weight: bold; + } + + .hell { + background-color : $MAIN_BACKGOUNDCOLOR; + color: $MAIN_COLOR; + } + + .dunkel { + background-color: $HEADER_BACKGROUNDCOLOR; + color: $HEADER_COLOR; + } + + .main_header { + color: black; + font-size: 32pt; + position: absolute; + right: 10%; + top: 40px; + + } + + #ssoSessionTransferBlock { + font-size: 0.8em; + margin-left: 5px; + margin-bottom: 5px; + } + + #alert_area { + width: 500px; + padding-left: 80px; + } \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/error_message.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/error_message.html new file mode 100644 index 000000000..4fd4d63cd --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/error_message.html @@ -0,0 +1,37 @@ + + + + + + An error arise ... + + + +
+
+

Authentication error arise

+ + + + + +
+

The authentication stops on account of a process error:

+
+

Error Code: $errorCode

+

Error Message:$errorMsg

+
+ + + #if($stacktrace) +
+

Stacktrace: $stacktrace

+
+ #end + + + +
+
+ + \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js new file mode 100644 index 000000000..e4e05bace --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js @@ -0,0 +1,200 @@ +function isIE() { + return (/MSIE (\d+\.\d+);/.test(navigator.userAgent)); + } + function isFullscreen() { + try { + return ((top.innerWidth == screen.width) && (top.innerHeight == screen.height)); + } catch (e) { + return false; + } + } + function isActivexEnabled() { + var supported = null; + try { + supported = !!new ActiveXObject("htmlfile"); + } catch (e) { + supported = false; + } + return supported; + } + function isMetro() { + if (!isIE()) + return false; + return !isActivexEnabled() && isFullscreen(); + } + window.onload=function() { + document.getElementById("localBKU").style.display="block"; + return; + } + function bkuLocalClicked() { + setMandateSelection(); + } + + function bkuOnlineClicked() { + if (isMetro()) + document.getElementById("metroDetected").style.display="block"; + document.getElementById("localBKU").style.display="block"; +/* if (checkMandateSSO()) + return; */ + + setMandateSelection(); +/* setSSOSelection(); */ + + var iFrameURL = "$contextPath$submitEndpoint" + "?"; + iFrameURL += "&pendingid=" + "$pendingReqID"; + + iFrameURL += "bkuURI=" + "$bkuOnline"; + iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; + + generateIFrame(iFrameURL); + } + function bkuHandyClicked() { + document.getElementById("localBKU").style.display="none"; +/* if (checkMandateSSO()) + return; */ + + setMandateSelection(); +/* setSSOSelection(); */ + + var iFrameURL = "$contextPath$submitEndpoint" + "?"; + iFrameURL += "&pendingid=" + "$pendingReqID"; + + iFrameURL += "bkuURI=" + "$bkuHandy"; + iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; + + generateIFrame(iFrameURL); + } + function storkClicked() { + document.getElementById("localBKU").style.display="none"; +/* if (checkMandateSSO()) + return; */ + + setMandateSelection(); +/* setSSOSelection(); */ + + var ccc = "AT"; + var countrySelection = document.getElementById("cccSelection"); + if (countrySelection != null) { + ccc = document.getElementById("cccSelection").value; + } + var iFrameURL = "$contextPath$submitEndpoint" + "?"; + iFrameURL += "&pendingid=" + "$pendingReqID"; + + #if($bkuOnline) + iFrameURL += "bkuURI=" + "$bkuOnline"; + #end + + iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; + iFrameURL += "&CCC=" + ccc; + + generateIFrame(iFrameURL); + } + function generateIFrame(iFrameURL) { + var el = document.getElementById("bkulogin"); + var width = el.clientWidth; + var heigth = el.clientHeight - 20; + var parent = el.parentNode; + + iFrameURL += "&heigth=" + heigth; + iFrameURL += "&width=" + width; + + var iframe = document.createElement("iframe"); + iframe.setAttribute("src", iFrameURL); + iframe.setAttribute("width", el.clientWidth - 1); + iframe.setAttribute("height", el.clientHeight - 1); + iframe.setAttribute("frameborder", "0"); + iframe.setAttribute("scrolling", "no"); + iframe.setAttribute("title", "Login"); + parent.replaceChild(iframe, el); + } + function setMandateSelection() { + document.getElementById("useMandate").value = "false"; + var checkbox = document.getElementById("mandateCheckBox"); + if (checkbox != null) { + if (document.getElementById("mandateCheckBox").checked) { + document.getElementById("useMandate").value = "true"; + } + } + } + function onChangeChecks() { + if (self.innerWidth < 650) { + document.getElementById("moaidform").setAttribute("target","_parent"); + } else { + document.getElementById("moaidform").removeAttribute("target"); + } + + } + + function checkIfBrowserSupportsJava(){ + console.log("Browser is Chrome: "+checkIfBrowserIsChrome()); + console.log("Browser is Safari: "+checkIfBrowserIsSafari()); + console.log("Browser is Edge: "+checkIfBrowserIsEdge()); + + var cnt = 0; + + if(checkIfBrowserIsChrome())cnt++; + if(checkIfBrowserIsEdge())cnt++; + if(checkIfBrowserIsSafari())cnt++; + + if(cnt==0 || cnt>1)//cnt>1 means perhaps wrong detection + return true; + + var image = document.getElementById("bkuimage"); + var srcatt = image.getAttribute("src"); + var last = srcatt.substring(srcatt.lastIndexOf('/')+1); + srcatt = srcatt.replace(last,'online-bku-deactivated.png'); + image.setAttribute("src",srcatt); + + + var button = document.getElementsByName("bkuButtonOnline")[0]; + button.setAttribute("class","browserInfoButton"); + button.setAttribute("title","Java wird nicht unterstützt, klicken für mehr Informationen."); + button.setAttribute("onClick","alert('Java wird von Ihrem Browser nicht unterstützt, ist jedoch für den Betrieb der Online Bürgerkartenumgebung notwendig.\\nWollen Sie dennoch die Online Bürgerkartenumgebung verwenden, wird zur Zeit Java noch von Firefox und MS Internet Explorer unterstützt. \\nAlternativ koennen Sie auch eine lokale Bürgerkartenumgebung verwenden, verfügbar unter www.buergerkarte.at.');"); + + return false; + + } + function checkIfBrowserIsChrome(){ + var chrome_defined = !!window.chrome;//chrome object defined + var webstore_defined = false; + if(window.chrome){ + webstore_defined = !!window.chrome.webstore; + } + return chrome_defined && webstore_defined; + } + function checkIfBrowserIsEdge(){//edge also defines the chrome object, but not the webapp + var chrome_defined = !!window.chrome;//chrome object defined + var webstore_defined = true; + if(window.chrome){ + webstore_defined = !!window.chrome.webstore; + } + return chrome_defined && !webstore_defined; + } + function checkIfBrowserIsSafari(){ + var cond1 = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; + return cond1; + } +/* function setSSOSelection() { + document.getElementById("useSSO").value = "false"; + var checkbox = document.getElementById("SSOCheckBox"); + if (checkbox != null) { + if (document.getElementById("SSOCheckBox").checked) { + document.getElementById("useSSO").value = "true"; + } + } + } */ + +/* function checkMandateSSO() { + var sso = document.getElementById("SSOCheckBox"); + var mandate = document.getElementById("mandateCheckBox"); + + + if (sso.checked && mandate.checked) { + alert("Anmeldung in Vertretung in kombination mit Single Sign-On wird aktuell noch nicht unterstützt!") + mandate.checked = false; + sso.checked = false; + return true; + } else { + return false; + } + } */ \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html index af133525e..02b86472b 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html @@ -4,847 +4,29 @@ - - - + + + + Anmeldung mittels Bürgerkarte oder Handy-Signatur
-

Anmeldung an: #OAName#

+

Anmeldung an: $OAName

-

#HEADER_TEXT#

+

$HEADER_TEXT

-
+
+ onClick='document.getElementById("mandateCheckBox").setAttribute("aria-checked", document.getElementById("mandateCheckBox").checked);'$MANDATECHECKED> -
+

Home Country Selection

i @@ -907,16 +87,6 @@

-
diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/redirectForm.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/redirectForm.html new file mode 100644 index 000000000..ac3242c89 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/redirectForm.html @@ -0,0 +1,13 @@ + + + + + + + + + CLICK to perform a + redirect back to Online Application + + diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html index 07d018a94..a9f0c4238 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html @@ -3,556 +3,7 @@ - - + Anmeldung an Online-Applikation @@ -574,25 +25,21 @@
-

Anmeldung an: #OAName#

+

Anmeldung an: $OAName

-
+ - - - - + +
-
+ - - - - + +
@@ -600,18 +47,6 @@
-
diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/slo_template.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/slo_template.html index a9d73e0d3..b3eb18082 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/slo_template.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/slo_template.html @@ -3,377 +3,7 @@ - + #if($timeoutURL) - - -Anmeldung mittels Bürgerkarte oder Handy-Signatur - - -
-
-

Anmeldung an: #OAName#

-
-
-
-

#HEADER_TEXT#

-
-
-
-
- - - -
-
-
-
- OnlineBKU -
-
- HandyBKU -
-
-
-
- - -
-
- - - - -
-

Home Country Selection

-

- - - i -

-
- - -
-
-
-
-
- - diff --git a/id/server/idserverlib/src/main/resources/resources/templates/redirectForm.html b/id/server/idserverlib/src/main/resources/resources/templates/redirectForm.html deleted file mode 100644 index 9bddee931..000000000 --- a/id/server/idserverlib/src/main/resources/resources/templates/redirectForm.html +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - CLICK to perform a - redirect back to Online Application - - diff --git a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html b/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html deleted file mode 100644 index ecda6550b..000000000 --- a/id/server/idserverlib/src/main/resources/resources/templates/sendAssertionFormFull.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - Anmeldung an Online-Applikation - - - - -
- -
- - - -
-
-
-

- Anmeldeinformationen: -

-
- -
-

Anmeldung an: #OAName#

- - -
-
- - - - - -
-
-
-
- - - - - -
-
- -
-
-
-
- -
- - diff --git a/id/server/idserverlib/src/main/resources/resources/templates/slo_template.html b/id/server/idserverlib/src/main/resources/resources/templates/slo_template.html deleted file mode 100644 index b3eb18082..000000000 --- a/id/server/idserverlib/src/main/resources/resources/templates/slo_template.html +++ /dev/null @@ -1,94 +0,0 @@ - - - - - - - - #if($timeoutURL) - - #end - - Single LogOut Vorgang ... - - -#if($timeoutURL) - -#else - -#end - - -
-
-

MOA-ID Single LogOut Information

-
-
- - #if($errorMsg) -
-

$errorMsg

-
- #end - - #if($successMsg) -
-

$successMsg

-
- #end - - #if($redirectURLs) -
-

- Sie werden von allen Online-Applikationen abgemeldet.
- Dieser Vorgang kann einige Zeit in Anspruch nehmen. -

-
- #end - -
-
-
- -
- - - #foreach( $el in $redirectURLs ) - - #end - - \ No newline at end of file diff --git a/id/server/idserverlib/src/main/resources/resources/templates/sso_transfer_template.html b/id/server/idserverlib/src/main/resources/resources/templates/sso_transfer_template.html deleted file mode 100644 index e9c2fae76..000000000 --- a/id/server/idserverlib/src/main/resources/resources/templates/sso_transfer_template.html +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - - Single Sign-On Session Transfer - - - - - -
-
-

MOA-ID Single Sign-On Session Transfer Service

-
-
- - #if($errorMsg) -
-

$errorMsg

-
- #end - - #if($successMsg) -
-

$successMsg

-
- #end - - #if($QRImage) -
- -
- #end - -
-
-
- -
- - - \ No newline at end of file diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/module/test/TestRequestImpl.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/module/test/TestRequestImpl.java index 125d83d6d..66dffe311 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/module/test/TestRequestImpl.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/module/test/TestRequestImpl.java @@ -24,9 +24,9 @@ package at.gv.egovernment.moa.id.module.test; import java.util.Collection; -import at.gv.egovernment.moa.id.auth.exception.SessionDataStorageException; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.SessionDataStorageException; /** * @author tlenz diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java index 005ad8bcc..54515ab8e 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/CreateSAML1AssertionTask.java @@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.process.api.Task; diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java index 6ba2f24e4..266878d7e 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/GetIdentityLinkTask.java @@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.process.api.Task; diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SelectBKUTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SelectBKUTask.java index 89b5a5e2a..915cb3b1e 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SelectBKUTask.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SelectBKUTask.java @@ -4,7 +4,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.process.api.Task; diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java index 6c91c574c..41ccb4451 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/SignAuthBlockTask.java @@ -11,7 +11,7 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.process.api.Task; diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateIdentityLinkTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateIdentityLinkTask.java index 766f9fadb..818e8b479 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateIdentityLinkTask.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateIdentityLinkTask.java @@ -6,7 +6,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.process.api.Task; diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java index 7a4d5f70d..2ee67ec27 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/task/ValidateSignedAuthBlockTask.java @@ -7,7 +7,7 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.process.api.Task; diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/HalloWeltTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/HalloWeltTask.java index 32e7bda2f..1f77eadbc 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/HalloWeltTask.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/HalloWeltTask.java @@ -2,7 +2,7 @@ package at.gv.egovernment.moa.id.process.test; import org.springframework.stereotype.Service; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.process.api.Task; diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/HelloWorldTask.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/HelloWorldTask.java index 81fc32d24..bc640e97a 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/HelloWorldTask.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/HelloWorldTask.java @@ -2,7 +2,7 @@ package at.gv.egovernment.moa.id.process.test; import org.springframework.stereotype.Service; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.process.api.Task; diff --git a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java index a645aa5a2..a05159c27 100644 --- a/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java +++ b/id/server/idserverlib/src/test/java/test/at/gv/egovernment/moa/id/UnitTestCase.java @@ -46,10 +46,9 @@ package test.at.gv.egovernment.moa.id; +import at.gv.egovernment.moa.id.commons.api.ConfigurationProvider; import test.MOAIDTestCase; -import at.gv.egovernment.moa.id.config.ConfigurationProvider; - /** * Base class for MOA ID test cases. * diff --git a/id/server/moa-id-commons/pom.xml b/id/server/moa-id-commons/pom.xml index bbaba6a50..c722b265e 100644 --- a/id/server/moa-id-commons/pom.xml +++ b/id/server/moa-id-commons/pom.xml @@ -50,6 +50,33 @@ + + at.gv.util + egovutils + + + * + * + + + + + + org.opensaml + opensaml + + + * + * + + + + + + org.apache.commons + commons-lang3 + + at.gv.egiz.components egiz-configuration-api diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/MOAIDAuthConstants.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/MOAIDAuthConstants.java new file mode 100644 index 000000000..8d893be9d --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/MOAIDAuthConstants.java @@ -0,0 +1,193 @@ + + + +package at.gv.egovernment.moa.id.commons; + +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import iaik.asn1.ObjectID; + + +/** + * Constants used throughout moa-id-auth component. + * + * @author Paul Ivancsics + * @version $Id$ + */ +public class MOAIDAuthConstants extends MOAIDConstants{ + + /** servlet parameter "Target" */ + public static final String PARAM_TARGET = "Target"; + /** servlet parameter "useMandate" */ + public static final String PARAM_USEMANDATE = "useMandate"; + public static final String PARAM_USEMISMANDATE = "useMISMandate"; + public static final String PARAM_USEELGAMANDATE = "useELGAMandate"; + /** servlet parameter "OA" */ + public static final String PARAM_OA = "OA"; + /** servlet parameter "bkuURI" */ + public static final String PARAM_BKU = "bkuURI"; + public static final String PARAM_MODUL = "MODUL"; + public static final String PARAM_ACTION = "ACTION"; + public static final String PARAM_SSO = "SSO"; + public static final String INTERFEDERATION_IDP = "interIDP"; + public static final String PARAM_TARGET_PENDINGREQUESTID = "pendingid"; + + public static final String PARAM_SLOSTATUS = "status"; + public static final String PARAM_SLORESTART = "restart"; + public static final String SLOSTATUS_SUCCESS = "success"; + public static final String SLOSTATUS_ERROR = "error"; + + /** servlet parameter "sourceID" */ + public static final String PARAM_SOURCEID = "sourceID"; + /** servlet parameter "BKUSelectionTemplate" */ + public static final String PARAM_BKUTEMPLATE = "BKUSelectionTemplate"; + /** servlet parameter "CCC (Citizen Country Code)" */ + public static final String PARAM_CCC = "CCC"; + /** servlet parameter "BKUSelectionTemplate" */ + public static final String PARAM_INPUT_PROCESSOR_SIGN_TEMPLATE = "InputProcessorSignTemplate"; + /** default BKU URL */ + public static final String DEFAULT_BKU = "http://localhost:3495/http-security-layer-request"; + /** default BKU URL for https connections*/ + public static final String DEFAULT_BKU_HTTPS = "https://127.0.0.1:3496/https-security-layer-request"; + /** servlet parameter "returnURI" */ + public static final String PARAM_RETURN = "returnURI"; + /** servlet parameter "Template" */ + public static final String PARAM_TEMPLATE = "Template"; + /** servlet parameter "MOASessionID" */ + public static final String PARAM_SESSIONID = "MOASessionID"; + /** servlet parameter "XMLResponse" */ + public static final String PARAM_XMLRESPONSE = "XMLResponse"; + /** servlet parameter "SAMLArtifact" */ + public static final String PARAM_SAMLARTIFACT = "SAMLArtifact"; + /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.StartAuthenticationServlet} is mapped to */ + public static final String REQ_START_AUTHENTICATION = "StartAuthentication"; + /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.VerifyIdentityLinkServlet} is mapped to */ + public static final String REQ_VERIFY_IDENTITY_LINK = "VerifyIdentityLink"; + /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.GetForeignIDServlet} is mapped to */ + public static final String REQ_GET_FOREIGN_ID = "GetForeignID"; + /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.VerifyCertificateServlet} is mapped to */ + public static final String REQ_VERIFY_CERTIFICATE = "VerifyCertificate"; + /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.GetMISSessionIDServlet} is mapped to */ + public static final String GET_MIS_SESSIONID = "GetMISSessionID"; + /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.ProcessValidatorInputServlet} is mapped to */ + public static final String REQ_PROCESS_VALIDATOR_INPUT = "ProcessInput"; + /** Request name {@link at.gv.egovernment.moa.id.auth.servlet.VerifyAuthenticationBlockServlet} is mapped to */ + public static final String REQ_VERIFY_AUTH_BLOCK = "VerifyAuthBlock"; + /** Logging hierarchy used for controlling debug output of XML structures to files */ + public static final String DEBUG_OUTPUT_HIERARCHY = "moa.id.auth"; + /** Header Name for controlling the caching mechanism of the browser */ + public static final String HEADER_EXPIRES = "Expires"; + /** Header Value for controlling the caching mechanism of the browser */ + public static final String HEADER_VALUE_EXPIRES = "Sat, 6 May 1995 12:00:00 GMT"; + /** Header Name for controlling the caching mechanism of the browser */ + public static final String HEADER_PRAGMA = "Pragma"; + /** Header Value for controlling the caching mechanism of the browser */ + public static final String HEADER_VALUE_PRAGMA = "no-cache"; + /** Header Name for controlling the caching mechanism of the browser */ + public static final String HEADER_CACHE_CONTROL = "Cache-control"; + /** Header Value for controlling the caching mechanism of the browser */ + public static final String HEADER_VALUE_CACHE_CONTROL = "no-store, no-cache, must-revalidate"; + /** Header Value for controlling the caching mechanism of the browser */ + public static final String HEADER_VALUE_CACHE_CONTROL_IE = "post-check=0, pre-check=0"; + /** + * the identity link signer X509Subject names of those identity link signer certificates + * not including the identity link signer OID. The authorisation for signing the identity + * link must be checked by using their issuer names. After february 19th 2007 the OID of + * the certificate will be used fo checking the authorisation for signing identity links. + */ + public static final String[] IDENTITY_LINK_SIGNERS_WITHOUT_OID = + new String[] {"T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitgieds der Datenschutzkommission", + "T=Dr.,CN=Nikolaus Schwab,O=BM f. Inneres i.A. des gf. Mitglieds der Datenschutzkommission"}; + + /** the number of the certifcate extension "Eigenschaft zur Ausstellung von Personenbindungen" */ + public static final String IDENTITY_LINK_SIGNER_OID_NUMBER = "1.2.40.0.10.1.7.1"; + /** + * the OID of the identity link signer certificate (Eigenschaft zur Ausstellung von Personenbindungen); + * used for checking the authorisation for signing the identity link for identity links signed after february 19th 2007 + */ + public static final ObjectID IDENTITY_LINK_SIGNER_OID = new ObjectID(IDENTITY_LINK_SIGNER_OID_NUMBER); + + /** the number of the certifcate extension for party representatives */ + public static final String PARTY_REPRESENTATION_OID_NUMBER = "1.2.40.0.10.3"; + +// /** the number of the certifcate extension for party organ representatives */ +// public static final String PARTY_ORGAN_REPRESENTATION_OID_NUMBER = PARTY_REPRESENTATION_OID_NUMBER + ".10"; + + /** OW */ + public static final String OW_ORGANWALTER = PARTY_REPRESENTATION_OID_NUMBER + ".4"; + + /** List of OWs */ + public static final List OW_LIST = Arrays.asList( + new ObjectID(OW_ORGANWALTER)); + + /**BKU type identifiers to use bkuURI from configuration*/ + public static final String REQ_BKU_TYPE_LOCAL = "local"; + public static final String REQ_BKU_TYPE_ONLINE = "online"; + public static final String REQ_BKU_TYPE_HANDY = "handy"; + public static final List REQ_BKU_TYPES = Arrays.asList(REQ_BKU_TYPE_LOCAL, REQ_BKU_TYPE_ONLINE, REQ_BKU_TYPE_HANDY); + + public static final List LEGACYPARAMETERWHITELIST + = Arrays.asList(PARAM_TARGET, PARAM_BKU, PARAM_OA, PARAM_TEMPLATE, PARAM_USEMANDATE, PARAM_CCC, PARAM_SOURCEID); + + public final static String EXT_SAML_MANDATE_OIDTEXTUALDESCRIPTION = "OIDTextualDescription"; + public final static String EXT_SAML_MANDATE_OID = "OID"; + public final static String EXT_SAML_MANDATE_RAW = "Mandate"; + public final static String EXT_SAML_MANDATE_NAME = "MandatorName"; + public final static String EXT_SAML_MANDATE_DOB = "MandatorDateOfBirth"; + public final static String EXT_SAML_MANDATE_WBPK = "MandatorWbpk"; + public final static String EXT_SAML_MANDATE_REPRESENTATIONTYPE = "RepresentationType"; + public final static String EXT_SAML_MANDATE_REPRESENTATIONTEXT = "Vollmachtsvertreter"; + public final static String EXT_SAML_MANDATE_CB_BASE_ID = "MandatorDomainIdentifier"; + + public static final String PARAM_APPLET_HEIGTH = "heigth"; + public static final String PARAM_APPLET_WIDTH = "width"; + + public static final Map COUNTRYCODE_XX_TO_NAME = + Collections.unmodifiableMap(new HashMap() { + private static final long serialVersionUID = 1L; + { + put("AT", "Other Countries");//"Workaround for PEPS Simulator" + put("BE", "België/Belgique"); + //put("CH", "Schweiz"); + put("EE", "Eesti"); + put("ES", "España"); + put("FI", "Suomi"); + put("IS", "Ísland"); + put("IT", "Italia"); + put("LI", "Liechtenstein"); + put("LT", "Lithuania"); + put("LU", "Luxemburg"); + put("PT", "Portugal"); + put("SE", "Sverige"); + put("SI", "Slovenija"); + } + }); + + public static final String COUNTRYCODE_AUSTRIA = "AT"; + + public static final String REGEX_PATTERN_TARGET = "^[A-Za-z]{2}(-.*)?$"; + + public static final String MDC_TRANSACTION_ID = "transactionId"; + public static final String MDC_SESSION_ID = "sessionId"; + + //AuthnRequest IssueInstant validation + public static final int TIME_JITTER = 5; //all 5 minutes time jitter + + public static final String PROCESSCONTEXT_PERFORM_INTERFEDERATION_AUTH = "interfederationAuthentication"; + public static final String PROCESSCONTEXT_REQUIRELOCALAUTHENTICATION = "requireLocalAuthentication"; + public static final String PROCESSCONTEXT_PERFORM_BKUSELECTION = "performBKUSelection"; + public static final String PROCESSCONTEXT_ISLEGACYREQUEST = "isLegacyRequest"; + + //General protocol-request data-store keys + public static final String AUTHPROCESS_DATA_TARGET = "authProces_Target"; + public static final String AUTHPROCESS_DATA_TARGETFRIENDLYNAME = "authProces_TargetFriendlyName"; + public static final String AUTHPROCESS_DATA_SECURITYLAYERTEMPLATE = "authProces_SecurityLayerTemplate"; + + //General MOASession data-store keys + public static final String MOASESSION_DATA_HOLDEROFKEY_CERTIFICATE = "holderofkey_cert"; + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java new file mode 100644 index 000000000..fa08dcab6 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/AuthConfiguration.java @@ -0,0 +1,162 @@ +package at.gv.egovernment.moa.id.commons.api; + +import java.util.List; +import java.util.Map; +import java.util.Properties; + +import at.gv.egovernment.moa.id.commons.api.data.ProtocolAllowed; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; +import at.gv.util.config.EgovUtilPropertiesConfiguration; + +public interface AuthConfiguration extends ConfigurationProvider{ + + public static final String DEFAULT_X509_CHAININGMODE = "pkix"; + + public Properties getGeneralPVP2ProperiesConfig(); + + public Properties getGeneralOAuth20ProperiesConfig(); + + public ProtocolAllowed getAllowedProtocols(); + + public Map getConfigurationWithPrefix(final String Prefix); + + public String getConfigurationWithKey(final String key); + + /** + * Get a configuration value from basic file based MOA-ID configuration + * + * @param key configuration key + * @return configuration value + */ + public String getBasicMOAIDConfiguration(final String key); + + public int getTransactionTimeOut(); + public int getSSOCreatedTimeOut(); + public int getSSOUpdatedTimeOut(); + + public String getAlternativeSourceID() throws ConfigurationException; + + public List getLegacyAllowedProtocols(); + + public IOAAuthParameters getOnlineApplicationParameter(String oaURL); + + public String getMoaSpAuthBlockTrustProfileID(boolean useTestTrustStore) throws ConfigurationException; + + public List getMoaSpAuthBlockVerifyTransformsInfoIDs() throws ConfigurationException; + + public ConnectionParameterInterface getMoaSpConnectionParameter() throws ConfigurationException; + + public ConnectionParameterInterface getForeignIDConnectionParameter() throws ConfigurationException; + + public ConnectionParameterInterface getOnlineMandatesConnectionParameter() throws ConfigurationException; + + public String getMoaSpIdentityLinkTrustProfileID(boolean useTestTrustStore) throws ConfigurationException; + + public List getTransformsInfos() throws ConfigurationException; + + public List getIdentityLinkX509SubjectNames() throws ConfigurationException; + + public List getSLRequestTemplates() throws ConfigurationException; + + public String getSLRequestTemplates(String type) throws ConfigurationException; + + public List getDefaultBKUURLs() throws ConfigurationException; + + public String getDefaultBKUURL(String type) throws ConfigurationException; + + public String getSSOTagetIdentifier() throws ConfigurationException; + + public String getSSOFriendlyName(); + + public String getSSOSpecialText(); + + public String getMOASessionEncryptionKey(); + + public String getMOAConfigurationEncryptionKey(); + + public boolean isIdentityLinkResigning(); + + public String getIdentityLinkResigningKey(); + + public boolean isMonitoringActive(); + + public String getMonitoringTestIdentityLinkURL(); + + public String getMonitoringMessageSuccess(); + + public boolean isAdvancedLoggingActive(); + + /** + * Returns the PublicURLPrefix. + * + * @return the PublicURLPrefix (one or more) of this IDP instance. All publicURLPrefix URLs are ends without / + * @throws ConfigurationException if no PublicURLPrefix is found. + */ + public List getPublicURLPrefix() throws ConfigurationException; + + public boolean isVirtualIDPsEnabled(); + + public boolean isPVP2AssertionEncryptionActive(); + + public boolean isCertifiacteQCActive(); + + public IStorkConfig getStorkConfig() throws ConfigurationException; + + public EgovUtilPropertiesConfiguration geteGovUtilsConfig(); + + public String getDocumentServiceUrl(); + + /** + * Notify, if the STORK fake IdentityLink functionality is active + * + * @return true/false + */ + public boolean isStorkFakeIdLActive(); + + /** + * Get a list of all STORK countries for which a faked IdentityLink should be created + * + * @return {List} of country codes + */ + public List getStorkFakeIdLCountries(); + + /** + * Get a list of all STORK countries for which no signature is required + * + * @return {List} of country codes + */ + public List getStorkNoSignatureCountries(); + + /** + * Get the MOA-SS key-group identifier for fake IdentityLink signing + * + * @return MOA-SS key-group identifier {String} + */ + public String getStorkFakeIdLResigningKey(); + + + /** + * Notify, if the PVP2x metadata schema validation is active + * + * @return true/false + */ + public boolean isPVPSchemaValidationActive(); + + /** + * Get all configuration values with prefix and wildcard + * + * @param key: Search key. * and % can be used as wildcards + * @return Key/Value pairs {Map}, which key maps the search key + */ + Map getConfigurationWithWildCard(String key); + + /** + * Get configured default revisions-log event codes which should be logged + * + * @return {List} if event codes or null + */ + List getDefaultRevisionsLogEventCodes(); + + @Deprecated + public boolean isHTTPAuthAllowed(); +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/ConfigurationProvider.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/ConfigurationProvider.java new file mode 100644 index 000000000..ca0a56049 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/ConfigurationProvider.java @@ -0,0 +1,66 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.commons.api; + +/** + * @author tlenz + * + */ +public interface ConfigurationProvider { + + /** + * The name of the system property which contains the file name of the + * configuration file. + */ + public static final String CONFIG_PROPERTY_NAME = + "moa.id.configuration"; + + /** + * The name of the system property which contains the file name of the + * configuration file. + */ + public static final String PROXY_CONFIG_PROPERTY_NAME = + "moa.id.proxy.configuration"; + + /** + * The name of the generic configuration property giving the certstore directory path. + */ + public static final String DIRECTORY_CERTSTORE_PARAMETER_PROPERTY = + "DirectoryCertStoreParameters.RootDir"; + + /** + * The name of the generic configuration property switching the ssl revocation checking on/off + */ + public static final String TRUST_MANAGER_REVOCATION_CHECKING = + "TrustManager.RevocationChecking"; + + public String getRootConfigFileDir(); + + public String getDefaultChainingMode(); + + public String getTrustedCACertificates(); + + public String getCertstoreDirectory(); + + public boolean isTrustmanagerrevoationchecking(); +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/ConnectionParameterInterface.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/ConnectionParameterInterface.java new file mode 100644 index 000000000..89a21661b --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/ConnectionParameterInterface.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +package at.gv.egovernment.moa.id.commons.api; + +public interface ConnectionParameterInterface { + + + public boolean isHTTPSURL(); + public String getUrl(); + public String getAcceptedServerCertificates(); + + public String getClientKeyStore(); + public String getClientKeyStorePassword(); + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IOAAuthParameters.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IOAAuthParameters.java new file mode 100644 index 000000000..be6d34275 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IOAAuthParameters.java @@ -0,0 +1,222 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.commons.api; + +import java.security.PrivateKey; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +import at.gv.egovernment.moa.id.commons.api.data.CPEPS; +import at.gv.egovernment.moa.id.commons.api.data.SAML1ConfigurationParameters; +import at.gv.egovernment.moa.id.commons.api.data.StorkAttribute; +import at.gv.egovernment.moa.id.commons.api.data.StorkAttributeProviderPlugin; + +/** + * @author tlenz + * + */ +public interface IOAAuthParameters { + + public static final String ONLINEBKU = "online"; + public static final String HANDYBKU = "handy"; + public static final String LOCALBKU = "local"; + public static final String INDERFEDERATEDIDP = "interfederated"; + + /** + * Get the full key/value configuration for this online application + * + * @return an unmodifiable map of key/value pairs + */ + public Map getFullConfiguration(); + + /** + * Get a configuration value from online application key/value configuration + * + * @param key: The key identifier of a configuration value * + * @return The configuration value {String} or null if the key does not exist + */ + public String getConfigurationValue(String key); + + public String getFriendlyName(); + + public String getPublicURLPrefix(); + + public String getOaType(); + + public boolean getBusinessService(); + + /** + * Get target of a public service-provider + * + * @return target identifier without prefix + */ + public String getTarget(); + + public String getTargetFriendlyName(); + + public boolean isInderfederationIDP(); + + public boolean isSTORKPVPGateway(); + + public boolean isRemovePBKFromAuthBlock(); + + /** + * Return the private-service domain-identifier with PreFix + * + * @return the identityLinkDomainIdentifier + */ + public String getIdentityLinkDomainIdentifier(); + + /** + * @return the keyBoxIdentifier + */ + public String getKeyBoxIdentifier(); + + public SAML1ConfigurationParameters getSAML1Parameter(); + + /** + * Get a list of online application specific trusted security layer templates + * + * @return a {List} with template URLs, maybe empty but never null + */ + public List getTemplateURL(); + + + /** + * Return the additional AuthBlock text for this online application + * + * @return authblock text {String} or null if no text is configured + */ + public String getAditionalAuthBlockText(); + + /** + * Return an online application specific BKU URL for a requested BKU type + * + * @param bkutype: defines the type of BKU + * @return BKU URL {String} or null if no BKU URL is configured + */ + public String getBKUURL(String bkutype); + + /** + * Return a list of all configured BKU URLs for this online application + * + * @return List of BKU URLs or an empty list if no BKU is configured + */ + public List getBKUURL(); + + public boolean useSSO(); + + public boolean useSSOQuestion(); + + /** + * Return all mandate-profile types configured for this online application + * + * @return the mandateProfiles {List} or null if no profile is defined + */ + public List getMandateProfiles(); + + /** + * @return the identityLinkDomainIdentifierType + */ + public String getIdentityLinkDomainIdentifierType(); + + public boolean isShowMandateCheckBox(); + + public boolean isOnlyMandateAllowed(); + + /** + * Shall we show the stork login in the bku selection frontend? + * + * @return true, if is we should show stork login + */ + public boolean isShowStorkLogin(); + + public Integer getQaaLevel(); + + public boolean isRequireConsentForStorkAttributes(); + + /** + * Return a {Collection} of requested STORK attributes + * + * @return {Collection} maybe empty but never null + */ + public Collection getRequestedSTORKAttributes(); + + public byte[] getBKUSelectionTemplate(); + + public byte[] getSendAssertionTemplate(); + + /** + * Return a {Collection} of configured STORK CPEPS + * + * @return {Collection} maybe empty but never null + */ + public Collection getPepsList(); + + public String getIDPAttributQueryServiceURL(); + + /** + * @return + */ + boolean isInboundSSOInterfederationAllowed(); + + /** + * @return + */ + boolean isInterfederationSSOStorageAllowed(); + + /** + * @return + */ + boolean isOutboundSSOInterfederationAllowed(); + + boolean isTestCredentialEnabled(); + + List getTestCredentialOIDs(); + + boolean isUseIDLTestTrustStore(); + boolean isUseAuthBlockTestTestStore(); + + PrivateKey getBPKDecBpkDecryptionKey(); + + /** + * @return + */ + boolean isPassivRequestUsedForInterfederation(); + + /** + * @return + */ + boolean isPerformLocalAuthenticationOnInterfederationError(); + + /** + * Get a {Collection} of configured STORK attribute provider plug-ins + * + * @return {Collection} maybe empty but never null + */ + public Collection getStorkAPs(); + + public List getReversionsLoggingEventCodes(); + +} \ No newline at end of file diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IRequest.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IRequest.java new file mode 100644 index 000000000..b23b4474b --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IRequest.java @@ -0,0 +1,201 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +package at.gv.egovernment.moa.id.commons.api; + +import java.util.Collection; + +import at.gv.egovernment.moa.id.commons.api.exceptions.SessionDataStorageException; + +public interface IRequest { + + /** + * Indicates the module, which implements this authentication protocol. + * The class, which is referenced, had to implement the 'IModulInfo' interface. + * + * @return Full-qualified name of the class which implements this protocol + */ + public String requestedModule(); + + /** + * Indicates the protocol specific action, which should executed if the request is processed. + * The class, which is referenced, had to implement the 'IAction' interface. + * + * @return Full-qualified name of the class which implements the action + */ + public String requestedAction(); + + /** + * Unique identifier, which indicates the service provider. + * In case of SAML1 protocol, it is the OA http-GET parameter + * + * @return Unique identifier for the service provider + */ + public String getOAURL(); + + /** + * Indicates the passive flag in authentication requests. + * If the passive flag is set, the identification and authentication process + * failed if no active SSO session is found. + * + * @return true, if the is passive flag is set in authentication request, otherwise false + */ + public boolean isPassiv(); + + /** + * Indicates the force authentication flag in authentication request + * If this flag is set, a new identification and authentication process + * is carried out in any case. + * + * @return true, if the force authentication flag is set, otherwise false + */ + public boolean forceAuth(); + + + /** + * Returns a generic request-data object with is stored with a specific identifier + * + * @param key The specific identifier of the request-data object + * @return The request-data object or null if no data is found with this key + */ + public Object getGenericData(String key); + + /** + * Returns a generic request-data object with is stored with a specific identifier + * + * @param key The specific identifier of the request-data object + * @param clazz The class type which is stored with this key + * @return The request-data object or null if no data is found with this key + */ + public T getGenericData(String key, final Class clazz); + + /** + * Store a generic data-object to request with a specific identifier + * + * @param key Identifier for this data-object + * @param object Generic data-object which should be stored. This data-object had to be implement the 'java.io.Serializable' interface + * @throws SessionDataStorageException Error message if the data-object can not stored to generic request-data storage + */ + public void setGenericDataToSession(String key, Object object) throws SessionDataStorageException; + + /** + * Hold the identifier of this request object. + * This identifier can be used to load the request from request storage + * + * @return Request identifier + */ + public String getRequestID(); + + + /** + * Hold the identifier of the MOASession which is associated with this request + * + * @return MOASession identifier if a associated session exists, otherwise null + */ + public String getMOASessionIdentifier(); + + + /** + * Holds a unique transaction identifier, which could be used for looging + * This transaction identifier is unique for a single identification and authentication process + * + * @return Unique transaction identifier. + */ + public String getUniqueTransactionIdentifier(); + + /** + * Holds a unique session identifier, which could be used for logging + * This session identifier is unique for the full Single Sign-On session time + * + * @return Unique session identifier + */ + public String getUniqueSessionIdentifier(); + + + /** + * Hold the identifier if the process instance, which is associated with this request + * + * @return ProcessInstanceID if this request is associated with a authentication process, otherwise null + */ + public String getProcessInstanceId(); + + + /** + * get the IDP URL PreFix, which was used for authentication request + * + * @return IDP URL PreFix . The URL prefix always ends without / + */ + public String getAuthURL(); + public String getAuthURLWithOutSlash(); + + /** + * Indicates if this pending request needs authentication + * + * @return true if this request needs authentication, otherwise false + */ + public boolean isNeedAuthentication(); + + /** + * Indicates, if this pending request needs Single Sign-On (SSO) functionality + * + * @return true if this request needs SSO, otherwise false + */ + public boolean needSingleSignOnFunctionality(); + public void setNeedSingleSignOnFunctionality(boolean needSSO); + + /** + * Indicates, if this pending request is already authenticated + * + * @return true if this request is already authenticated, otherwise false + */ + public boolean isAuthenticated(); + public void setAuthenticated(boolean isAuthenticated); + + /** + * Get get Service-Provider configuration which is associated with this request. + * + * @return Service-Provider configuration + */ + public IOAAuthParameters getOnlineApplicationConfiguration(); + + /** + * Indicates, if this pending-request is aborted by the user + * + * @return true, if it is aborted, otherwise false + */ + public boolean isAbortedByUser(); + + /** + * Set the 'isAboredByUser' flag of this pending-request + * + * @param b true, if the user has abort the authentication process, otherwise false + */ + public void setAbortedByUser(boolean isAborted); + + /** + * This method get a Set of PVP 2.1 attribute, which are request by this pending-request. + * + * @return A set of PVP attribute names or null if no attributes are requested + * or the Service Provider, which sends this request needs no attributes + */ + public Collection getRequestedAttributes(); +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IStorkConfig.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IStorkConfig.java new file mode 100644 index 000000000..b2d90aed4 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/IStorkConfig.java @@ -0,0 +1,51 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.commons.api; + +import java.util.List; +import java.util.Map; + +import at.gv.egovernment.moa.id.commons.api.data.CPEPS; +import at.gv.egovernment.moa.id.commons.api.data.SignatureCreationParameter; +import at.gv.egovernment.moa.id.commons.api.data.SignatureVerificationParameter; +import at.gv.egovernment.moa.id.commons.api.data.StorkAttribute; + +/** + * @author tlenz + * + */ +public interface IStorkConfig { + + SignatureCreationParameter getSignatureCreationParameter(); + + SignatureVerificationParameter getSignatureVerificationParameter(); + + Map getCpepsMap(); + + boolean isSTORKAuthentication(String ccc); + + CPEPS getCPEPS(String ccc); + + List getStorkAttributes(); + +} \ No newline at end of file diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/BPKDecryptionParameters.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/BPKDecryptionParameters.java new file mode 100644 index 000000000..cb81fe79e --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/BPKDecryptionParameters.java @@ -0,0 +1,135 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.commons.api.data; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.Serializable; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.UnrecoverableKeyException; + +import org.apache.commons.lang3.SerializationUtils; + +import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.KeyStoreUtils; + + +/** + * @author tlenz + * + */ +public class BPKDecryptionParameters implements Serializable{ + + private static final long serialVersionUID = 1L; + + private byte[] keyStore = null; + private String keyStorePassword = null; + private String keyAlias = null; + private String keyPassword = null; + + /** + * @return + * @throws IOException + */ + public PrivateKey getPrivateKey() { + InputStream in = null; + try { + in = new ByteArrayInputStream(keyStore); + KeyStore store = KeyStoreUtils.loadKeyStore(in , keyStorePassword); + + char[] chPassword = " ".toCharArray(); + if (keyPassword != null) + chPassword = keyPassword.toCharArray(); + +// Certificate test = store.getCertificate(keyAlias); +// Base64Utils.encode(test.getPublicKey().getEncoded()); + + return (PrivateKey) store.getKey(keyAlias, chPassword); + + + } catch (KeyStoreException e) { + Logger.error("Can not load private key from keystore.", e); + + } catch (IOException e) { + Logger.error("Can not load private key from keystore.", e); + + } catch (UnrecoverableKeyException e) { + Logger.error("Can not load private key from keystore.", e); + + } catch (NoSuchAlgorithmException e) { + Logger.error("Can not load private key from keystore.", e); + + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException e) { + Logger.warn("Close InputStream failed." , e); + } + } + } + + return null; + } + + public byte[] serialize() { + return SerializationUtils.serialize(this); + + } + + /** + * @param keyStore the keyStore to set + */ + public void setKeyStore(byte[] keyStore) { + this.keyStore = keyStore; + } + + /** + * @param keyStorePassword the keyStorePassword to set + */ + public void setKeyStorePassword(String keyStorePassword) { + this.keyStorePassword = keyStorePassword; + } + + /** + * @param keyAlias the keyAlias to set + */ + public void setKeyAlias(String keyAlias) { + this.keyAlias = keyAlias; + } + + /** + * @param keyPassword the keyPassword to set + */ + public void setKeyPassword(String keyPassword) { + this.keyPassword = keyPassword; + } + + + + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/CPEPS.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/CPEPS.java new file mode 100644 index 000000000..a88aa2171 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/CPEPS.java @@ -0,0 +1,138 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +/** + * + */ +package at.gv.egovernment.moa.id.commons.api.data; + +import java.net.URL; +import java.util.ArrayList; +import java.util.List; + +import org.opensaml.saml2.metadata.RequestedAttribute; + +/** + * Encpasulates C-PEPS information according MOA configuration + * + * @author bzwattendorfer + * + */ +public class CPEPS { + + /** Country Code of C-PEPS */ + private String countryCode; + + /** URL of C-PEPS */ + private URL pepsURL; + + private Boolean isXMLSignatureSupported; + + /** Specific attributes to be requested for this C-PEPS */ + private List countrySpecificRequestedAttributes = new ArrayList(); + + /** + * Constructs a C-PEPS + * @param countryCode ISO Country Code of C-PEPS + * @param pepsURL URL of C-PEPS + */ + public CPEPS(String countryCode, URL pepsURL, Boolean isXMLSignatureSupported) { + super(); + this.countryCode = countryCode; + this.pepsURL = pepsURL; + this.isXMLSignatureSupported = isXMLSignatureSupported; + } + + /** + * Gets the country code of this C-PEPS + * @return ISO country code + */ + public String getCountryCode() { + return countryCode; + } + + /** + * Sets the country code of this C-PEPS + * @param countryCode ISO country code + */ + public void setCountryCode(String countryCode) { + this.countryCode = countryCode; + } + + /** + * Gets the URL of this C-PEPS + * @return C-PEPS URL + */ + public URL getPepsURL() { + return pepsURL; + } + + /** + * Sets the C-PEPS URL + * @param pepsURL C-PEPS URL + */ + public void setPepsURL(URL pepsURL) { + this.pepsURL = pepsURL; + } + + /** + * Returns weather the C-PEPS supports XMl Signatures or not (important for ERnB) + */ + public Boolean isXMLSignatureSupported() { + return isXMLSignatureSupported; + } + + /** + * Sets weather the C-PEPS supports XMl Signatures or not (important for ERnB) + * @param isXMLSignatureSupported C-PEPS XML Signature support + */ + public void setXMLSignatureSupported(boolean isXMLSignatureSupported) { + this.isXMLSignatureSupported = isXMLSignatureSupported; + } + + /** + * Gets the country specific attributes of this C-PEPS + * @return List of country specific attributes + */ + public List getCountrySpecificRequestedAttributes() { + return countrySpecificRequestedAttributes; + } + + /** + * Sets the country specific attributes + * @param countrySpecificRequestedAttributes List of country specific requested attributes + */ + public void setCountrySpecificRequestedAttributes( + List countrySpecificRequestedAttributes) { + this.countrySpecificRequestedAttributes = countrySpecificRequestedAttributes; + } + + /** + * Adds a Requested attribute to the country specific attribute List + * @param countrySpecificRequestedAttribute Additional country specific requested attribute to add + */ + public void addCountrySpecificRequestedAttribute(RequestedAttribute countrySpecificRequestedAttribute) { + this.countrySpecificRequestedAttributes.add(countrySpecificRequestedAttribute); + } + + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/ProtocolAllowed.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/ProtocolAllowed.java new file mode 100644 index 000000000..4f63dca54 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/ProtocolAllowed.java @@ -0,0 +1,91 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.commons.api.data; + +/** + * @author tlenz + * + */ +public class ProtocolAllowed { + + private boolean isSAML1Active = false; + private boolean isPVP21Active = true; + private boolean isOAUTHActive = true; + + /** + * + */ + public ProtocolAllowed() { + + } + + /** + * + */ + public ProtocolAllowed(boolean saml1, boolean pvp21, boolean oauth) { + this.isOAUTHActive = oauth; + this.isPVP21Active = pvp21; + this.isSAML1Active = saml1; + + } + + /** + * @return the isSAML1Active + */ + public boolean isSAML1Active() { + return isSAML1Active; + } + /** + * @param isSAML1Active the isSAML1Active to set + */ + public void setSAML1Active(boolean isSAML1Active) { + this.isSAML1Active = isSAML1Active; + } + /** + * @return the isPVP21Active + */ + public boolean isPVP21Active() { + return isPVP21Active; + } + /** + * @param isPVP21Active the isPVP21Active to set + */ + public void setPVP21Active(boolean isPVP21Active) { + this.isPVP21Active = isPVP21Active; + } + /** + * @return the isOAUTHActive + */ + public boolean isOAUTHActive() { + return isOAUTHActive; + } + /** + * @param isOAUTHActive the isOAUTHActive to set + */ + public void setOAUTHActive(boolean isOAUTHActive) { + this.isOAUTHActive = isOAUTHActive; + } + + + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SAML1ConfigurationParameters.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SAML1ConfigurationParameters.java new file mode 100644 index 000000000..eb709a6f1 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SAML1ConfigurationParameters.java @@ -0,0 +1,276 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.commons.api.data; + +/** + * @author tlenz + * + */ +public class SAML1ConfigurationParameters { + + private boolean isActive = false; + private boolean provideBaseId = false; + private boolean provideAuthBlock = false; + private boolean provideIdl = false; + private boolean provideCertificate = false; + private boolean provideMandate = false; + private boolean provideAllErrors = true; + private boolean useCondition = false; + private String sourceID = null; + private String condition = new String(); + + + /** + * + */ + public SAML1ConfigurationParameters(boolean isActive, + boolean provideBaseId, boolean provideAuthBlock, + boolean provideIdl, boolean provideCertificate, + boolean provideMandate, boolean provideAllErrors, + boolean useCondition, String condition, + String sourceID) { + this.condition = condition; + this.isActive = isActive; + this.provideAllErrors = provideAllErrors; + this.provideAuthBlock = provideAuthBlock; + this.provideBaseId = provideBaseId; + this.provideCertificate = provideCertificate; + this.provideIdl = provideIdl; + this.provideMandate = provideMandate; + this.useCondition = useCondition; + this.sourceID = sourceID; + + } + + + /** + * + */ + public SAML1ConfigurationParameters() { + + } + + + /** + * Gets the value of the isActive property. + * + * @return + * possible object is + * {@link String } + * + */ + public Boolean isIsActive() { + return this.isActive; + } + + /** + * @param isActive the isActive to set + */ + public void setActive(boolean isActive) { + this.isActive = isActive; + } + + + /** + * @param provideBaseId the provideBaseId to set + */ + public void setProvideBaseId(boolean provideBaseId) { + this.provideBaseId = provideBaseId; + } + + + /** + * @param provideAuthBlock the provideAuthBlock to set + */ + public void setProvideAuthBlock(boolean provideAuthBlock) { + this.provideAuthBlock = provideAuthBlock; + } + + + /** + * @param provideIdl the provideIdl to set + */ + public void setProvideIdl(boolean provideIdl) { + this.provideIdl = provideIdl; + } + + + /** + * @param provideCertificate the provideCertificate to set + */ + public void setProvideCertificate(boolean provideCertificate) { + this.provideCertificate = provideCertificate; + } + + + /** + * @param provideMandate the provideMandate to set + */ + public void setProvideMandate(boolean provideMandate) { + this.provideMandate = provideMandate; + } + + + /** + * @param provideAllErrors the provideAllErrors to set + */ + public void setProvideAllErrors(boolean provideAllErrors) { + this.provideAllErrors = provideAllErrors; + } + + + /** + * @param useCondition the useCondition to set + */ + public void setUseCondition(boolean useCondition) { + this.useCondition = useCondition; + } + + + /** + * @param sourceID the sourceID to set + */ + public void setSourceID(String sourceID) { + this.sourceID = sourceID; + } + + + /** + * @param condition the condition to set + */ + public void setCondition(String condition) { + this.condition = condition; + } + + + /** + * Gets the value of the provideStammzahl property. + * + * @return + * possible object is + * {@link String } + * + */ + public Boolean isProvideStammzahl() { + return this.provideBaseId; + } + + /** + * Gets the value of the provideAUTHBlock property. + * + * @return + * possible object is + * {@link String } + * + */ + public Boolean isProvideAUTHBlock() { + return this.provideAuthBlock; + } + + /** + * Gets the value of the provideIdentityLink property. + * + * @return + * possible object is + * {@link String } + * + */ + public Boolean isProvideIdentityLink() { + return this.provideIdl; + } + + /** + * Gets the value of the provideCertificate property. + * + * @return + * possible object is + * {@link String } + * + */ + public Boolean isProvideCertificate() { + return this.provideCertificate; + } + + /** + * Gets the value of the provideFullMandatorData property. + * + * @return + * possible object is + * {@link String } + * + */ + public Boolean isProvideFullMandatorData() { + return this.provideMandate; + } + + /** + * Gets the value of the useCondition property. + * + * @return + * possible object is + * {@link String } + * + */ + public Boolean isUseCondition() { + return this.useCondition; + } + + /** + * Gets the value of the conditionLength property. + * + * @return + * possible object is + * {@link BigInteger } + * + */ + + public int getConditionLength() { + return condition.length(); + } + + /** + * Gets the value of the sourceID property. + * + * @return + * possible object is + * {@link String } + * + */ + public String getSourceID() { + return this.sourceID; + } + + /** + * Gets the value of the provideAllErrors property. + * + * @return + * possible object is + * {@link String } + * + */ + public Boolean isProvideAllErrors() { + return this.provideAllErrors; + } + +} + diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SignatureCreationParameter.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SignatureCreationParameter.java new file mode 100644 index 000000000..9bfd93977 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SignatureCreationParameter.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + +package at.gv.egovernment.moa.id.commons.api.data; + +import java.util.Properties; + +/** + * Encapsulates signature creation parameters according MOA configuration + * + * @author bzwattendorfer + * + */ +public class SignatureCreationParameter { + + private static final String PROPS_PREFIX = "stork.samlsigningparameter.signaturecreation."; + private static final String PROPS_KEYSTORE_FILE = "keystore.file"; + private static final String PROPS_KEYSTORE_PASS = "keystore.password"; + private static final String PROPS_KEYNAME_NAME = "keyname.name"; + private static final String PROPS_KEYNAME_PASS = "keyname.password"; + + private Properties props; + private String basedirectory; + + public SignatureCreationParameter(Properties props, String basedirectory) { + this.props = props; + this.basedirectory = basedirectory; + } + + /** + * Gets the KeyStore Path + * @return File Path to KeyStore + */ + public String getKeyStorePath() { + return basedirectory + props.getProperty(PROPS_PREFIX+PROPS_KEYSTORE_FILE); + } + + /** + * Gets the KeyStore Password + * @return Password to KeyStore + */ + public String getKeyStorePassword() { + return props.getProperty(PROPS_PREFIX+PROPS_KEYSTORE_PASS); + } + + /** + * Gets the Signing Key Name + * @return Siging Key Name + */ + public String getKeyName() { + return props.getProperty(PROPS_PREFIX+PROPS_KEYNAME_NAME); + } + + /** + * Gets the Signing Key Password + * @return Signing Key Password + */ + public String getKeyPassword() { + return props.getProperty(PROPS_PREFIX+PROPS_KEYNAME_PASS); + } +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SignatureVerificationParameter.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SignatureVerificationParameter.java new file mode 100644 index 000000000..f408ea7fe --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/SignatureVerificationParameter.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +/** + * + */ +package at.gv.egovernment.moa.id.commons.api.data; + +/** + * Encapsulates Signature Verification data for STORK according MOA configuration + * + * @author bzwattendorfer + * + */ +public class SignatureVerificationParameter { + + /** ID of the MOA-SP TrustProfile to be used for STORK SAML signature verification */ + private String trustProfileID; + + public SignatureVerificationParameter(String trustProfileID2) { + this.trustProfileID = trustProfileID2; + } + + /** + * Gets the MOA-SP TrustProfileID + * @return TrustProfileID of MOA-SP for STORK signature verification + */ + public String getTrustProfileID() { + return trustProfileID; + } + + + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/StorkAttribute.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/StorkAttribute.java new file mode 100644 index 000000000..1bbb7d3fe --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/StorkAttribute.java @@ -0,0 +1,27 @@ +package at.gv.egovernment.moa.id.commons.api.data; + +public class StorkAttribute { + + protected Boolean mandatory; + protected String name; + + public StorkAttribute(String name, boolean mandatory) { + this.name = name; + this.mandatory = mandatory; + } + + public Boolean getMandatory() { + return mandatory; + } + public void setMandatory(Boolean mandatory) { + this.mandatory = mandatory; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/StorkAttributeProviderPlugin.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/StorkAttributeProviderPlugin.java new file mode 100644 index 000000000..070d304a6 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/data/StorkAttributeProviderPlugin.java @@ -0,0 +1,81 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.commons.api.data; + +/** + * @author tlenz + * + */ +public class StorkAttributeProviderPlugin { + private String name = null; + private String url = null; + private String attributes = null; + + /** + * + */ + public StorkAttributeProviderPlugin(String name, String url, String attributes) { + this.name = name; + this.url = url; + this.attributes = attributes; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + /** + * @return the url + */ + public String getUrl() { + return url; + } + /** + * @param url the url to set + */ + public void setUrl(String url) { + this.url = url; + } + /** + * @return the attributes + */ + public String getAttributes() { + return attributes; + } + /** + * @param attributes the attributes to set + */ + public void setAttributes(String attributes) { + this.attributes = attributes; + } + + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/ConfigurationException.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/ConfigurationException.java new file mode 100644 index 000000000..e8f6da323 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/ConfigurationException.java @@ -0,0 +1,78 @@ +package at.gv.egovernment.moa.id.commons.api.exceptions; +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + +/** + * Exception signalling an error in the configuration. + * + * @author Patrick Peck + * @version $Id$ + */ +public class ConfigurationException extends MOAIDException { + + /** + * + */ + private static final long serialVersionUID = -7199539463319751278L; + +/** + * Create a MOAConfigurationException. + */ + public ConfigurationException(String messageId, Object[] parameters) { + super(messageId, parameters); + } + + /** + * Create a MOAConfigurationException. + */ + public ConfigurationException( + String messageId, + Object[] parameters, + Throwable wrapped) { + + super(messageId, parameters, wrapped); + } + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/MOAIDException.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/MOAIDException.java new file mode 100644 index 000000000..955b0f5ea --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/MOAIDException.java @@ -0,0 +1,222 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.id.commons.api.exceptions; + +import java.io.PrintStream; +import java.io.PrintWriter; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.w3c.dom.DOMImplementation; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; +import at.gv.egovernment.moa.util.Constants; + +/** + * Base class of technical MOA exceptions. + * + * Technical exceptions are exceptions that originate from system failure (e.g., + * a database connection fails, a component is not available, etc.) + * + * @author Patrick Peck, Ivancsics Paul + * @version $Id$ + */ +public class MOAIDException extends Exception { + /** + * + */ + private static final long serialVersionUID = -1507246171708083912L; +/** message ID */ + private String messageId; + /** wrapped exception */ + private Throwable wrapped; + + private Object[] parameters; + + /** + * Create a new MOAIDException. + * + * @param messageId The identifier of the message associated with this + * exception. + * @param parameters Additional message parameters. + */ + public MOAIDException(String messageId, Object[] parameters) { + super(MOAIDMessageProvider.getInstance().getMessage(messageId, parameters)); + this.messageId = messageId; + this.parameters = parameters; + } + + /** + * Create a new MOAIDException. + * + * @param messageId The identifier of the message associated with this + * MOAIDException. + * @param parameters Additional message parameters. + * @param wrapped The exception wrapped by this + * MOAIDException. + */ + public MOAIDException( + String messageId, + Object[] parameters, + Throwable wrapped) { + + super(MOAIDMessageProvider.getInstance().getMessage(messageId, parameters)); + this.messageId = messageId; + this.wrapped = wrapped; + this.parameters = parameters; + } + + /** + * Print a stack trace of this exception to System.err. + * + * @see java.lang.Throwable#printStackTrace() + */ + public void printStackTrace() { + printStackTrace(System.err); + } + + /** + * Print a stack trace of this exception, including the wrapped exception. + * + * @param s The stream to write the stack trace to. + * @see java.lang.Throwable#printStackTrace(java.io.PrintStream) + */ + public void printStackTrace(PrintStream s) { + if (getWrapped() == null) + super.printStackTrace(s); + else { + s.print("Root exception: "); + getWrapped().printStackTrace(s); + } + } + + /** + * Print a stack trace of this exception, including the wrapped exception. + * + * @param s The stream to write the stacktrace to. + * @see java.lang.Throwable#printStackTrace(java.io.PrintWriter) + */ + public void printStackTrace(PrintWriter s) { + if (getWrapped() == null) + super.printStackTrace(s); + else { + s.print("Root exception: "); + getWrapped().printStackTrace(s); + } + } + + /** + * @return message ID + */ + public String getMessageId() { + return messageId; + } + + /** + * @return wrapped exception + */ + public Throwable getWrapped() { + return wrapped; + } + + + + /** + * @return the parameters + */ +public Object[] getParameters() { + return parameters; +} + +/** + * Convert this MOAIDException to an ErrorResponse + * element from the MOA namespace. + * + * @return An ErrorResponse element, containing the subelements + * ErrorCode and Info required by the MOA schema. + */ + public Element toErrorResponse() { + DocumentBuilder builder; + DOMImplementation impl; + Document doc; + Element errorResponse; + Element errorCode; + Element info; + + // create a new document + try { + builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + impl = builder.getDOMImplementation(); + } catch (ParserConfigurationException e) { + return null; + } + + // build the ErrorResponse element + doc = impl.createDocument(Constants.MOA_NS_URI, "ErrorResponse", null); + errorResponse = doc.getDocumentElement(); + + // add MOA namespace declaration + errorResponse.setAttributeNS( + Constants.XMLNS_NS_URI, + "xmlns", + Constants.MOA_NS_URI); + + // build the child elements + errorCode = doc.createElementNS(Constants.MOA_NS_URI, "ErrorCode"); + errorCode.appendChild(doc.createTextNode(messageId)); + info = doc.createElementNS(Constants.MOA_NS_URI, "Info"); + info.appendChild(doc.createTextNode(toString())); + errorResponse.appendChild(errorCode); + errorResponse.appendChild(info); + return errorResponse; + } + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/SessionDataStorageException.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/SessionDataStorageException.java new file mode 100644 index 000000000..9414556a2 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/SessionDataStorageException.java @@ -0,0 +1,45 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.commons.api.exceptions; + +/** + * @author tlenz + * + */ +public class SessionDataStorageException extends MOAIDException { + + /** + * + */ + private static final long serialVersionUID = 5743057708136365929L; + + /** + * @param messageId + * @param parameters + */ + public SessionDataStorageException(String messageId, Object[] parameters) { + super(messageId, parameters); + + } + +} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java new file mode 100644 index 000000000..4d8a07a55 --- /dev/null +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/utils/MOAIDMessageProvider.java @@ -0,0 +1,104 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ +/* + * Copyright 2003 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +package at.gv.egovernment.moa.id.commons.utils; + +import java.util.Locale; + +import at.gv.egovernment.moa.util.Messages; + +/** + * A singleton wrapper around a Message object, providing the messages used in MOA-ID. + * + * @author Paul Ivancsics + * @version $Id$ + */ +public class MOAIDMessageProvider { + + /** DEFAULT_MESSAGE_RESOURCES are resources/properties/id_messages */ + private static final String[] DEFAULT_MESSAGE_RESOURCES = + { "resources/properties/id_messages" }; + /** DEFAULT_MESSAGE_LOCALES are "de", "AT" */ + private static final Locale[] DEFAULT_MESSAGE_LOCALES = + new Locale[] { new Locale("de", "AT") }; + /** The instance for our singleton */ + private static MOAIDMessageProvider instance; + /** The Messages */ + private Messages messages; + + /** + * Returns the single instance of MOAIDMessageProvider. + * + * @return the single instance of MOAIDMessageProvider + */ + public static MOAIDMessageProvider getInstance() { + if (instance == null) + instance = new MOAIDMessageProvider(DEFAULT_MESSAGE_RESOURCES, DEFAULT_MESSAGE_LOCALES); + return instance; + } + + /** + * Create a MOAIDMessageProvider. + * + * @param resourceNames The names of the resources containing the messages. + * @param locales The corresponding locales. + */ + protected MOAIDMessageProvider(String[] resourceNames, Locale[] locales) { + this.messages = new Messages(resourceNames, locales); + } + + /** + * Get the message corresponding to a given message ID. + * + * @param messageId The ID of the message. + * @param parameters The parameters to fill in into the message arguments. + * @return The formatted message. + */ + public String getMessage(String messageId, Object[] parameters) { + return messages.getMessage(messageId, parameters); + } + +} diff --git a/id/server/moa-id-frontend-resources/pom.xml b/id/server/moa-id-frontend-resources/pom.xml index 4107e98e3..64ebc14b6 100644 --- a/id/server/moa-id-frontend-resources/pom.xml +++ b/id/server/moa-id-frontend-resources/pom.xml @@ -12,7 +12,7 @@ jar MOA-ID-Auth FrontEnd-Resources - Static FrontEnd resources for MOA-ID-Auth + FrontEnd resources for MOA-ID-Auth EGIZ https://www.egiz.gv.at @@ -29,7 +29,12 @@ ${basedir}/../../../../repository - + + + MOA.id.server + moa-id-commons + + org.springframework spring-webmvc @@ -40,6 +45,20 @@ + + + org.apache.velocity + velocity + 1.7 + + + + javax.servlet + javax.servlet-api + provided + + + \ No newline at end of file diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java new file mode 100644 index 000000000..71a4837d4 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java @@ -0,0 +1,106 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.frontend.builder; + +import java.util.HashMap; +import java.util.Map; + +import at.gv.egovernment.moa.util.MiscUtil; + +/** + * @author tlenz + * + */ +public abstract class AbstractGUIFormBuilderConfiguration implements IGUIBuilderConfiguration { + + public static final String PARAM_AUTHCONTEXT = "contextPath"; + public static final String PARAM_FORMSUBMITENDPOINT = "submitEndpoint"; + + public static final String PARAM_PENDINGREQUESTID = "pendingReqID"; + + private String authURL = null; + private String viewName = null; + private String formSubmitEndpoint = null; + + /** + * @param authURL IDP PublicURL-Prefix which should be used, but never null + * @param viewName Name of the template (with suffix) but never null + * @param formSubmitEndpoint EndPoint on which the form should be submitted, + * or null if the form must not submitted + * + */ + public AbstractGUIFormBuilderConfiguration(String authURL, String viewName, String formSubmitEndpoint) { + this.viewName = viewName; + + if (authURL.endsWith("/")) + this.authURL = authURL.substring(0, authURL.length() - 1); + else + this.authURL = authURL; + + if (MiscUtil.isNotEmpty(formSubmitEndpoint)) { + if (formSubmitEndpoint.startsWith("/")) + this.formSubmitEndpoint = formSubmitEndpoint; + else + this.formSubmitEndpoint = "/" + formSubmitEndpoint; + } + } + + + /** + * Define the parameters, which should be evaluated in the template + * + * @return Map of parameters, which should be added to template + */ + abstract protected Map getSpecificViewParameters(); + + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.builder.IGUIBuilderConfiguration#getViewName() + */ + @Override + public final String getViewName() { + return this.viewName; + + } + + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.builder.IGUIBuilderConfiguration#getViewParameters() + */ + @Override + public final Map getViewParameters() { + //get parameters from detail implementation + Map specParams = getSpecificViewParameters(); + if (specParams == null) + specParams = new HashMap(); + + //add generic parameters + specParams.put(PARAM_AUTHCONTEXT, this.authURL); + if (this.formSubmitEndpoint != null) + specParams.put(PARAM_FORMSUBMITENDPOINT, this.formSubmitEndpoint); + + return specParams; + + } + +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java new file mode 100644 index 000000000..2c2792b84 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/DefaultGUIFormBuilderConfiguration.java @@ -0,0 +1,120 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.frontend.builder; + +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import at.gv.egovernment.moa.id.commons.api.IRequest; + +/** + * This class builds MOA-ID GUI forms from default resource paths + * + * @author tlenz + * + */ +public class DefaultGUIFormBuilderConfiguration extends AbstractGUIFormBuilderConfiguration { + + public static final String VIEW_REDIRECT = "redirectForm.html"; + public static final String VIEW_ERRORMESSAGE = "error_message.html"; + public static final String VIEW_SINGLELOGOUT = "slo_template.html"; + public static final String VIEW_SSO_SESSION_TRANSFER = "sso_transfer_template.html"; + + private IRequest pendingReq; + private Map customParameters = null; + + + /** + * @param authURL PublicURLPrefix of the IDP but never null + * @param viewName Name of the template (with suffix) but never null + * @param formSubmitEndpoint EndPoint on which the form should be submitted, + * or null if the form must not submitted + */ + public DefaultGUIFormBuilderConfiguration(String authURL, String viewName, String formSubmitEndpoint) { + super(authURL, viewName, formSubmitEndpoint); + } + + /** + * @param Current processed pending-request DAO but never null + * @param viewName Name of the template (with suffix) but never null + * @param formSubmitEndpoint EndPoint on which the form should be submitted, + * or null if the form must not submitted + */ + public DefaultGUIFormBuilderConfiguration(IRequest pendingReq, String viewName, String formSubmitEndpoint) { + super(pendingReq.getAuthURL(), viewName, formSubmitEndpoint); + this.pendingReq = pendingReq; + + + } + + public void putCustomParameter(String key, Object value) { + if (customParameters == null) + customParameters = new HashMap(); + + customParameters.put(key, value); + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.builder.IGUIBuilderConfiguration#getViewParameters() + */ + @Override + public Map getSpecificViewParameters() { + Map params = new HashMap(); + if (pendingReq != null) { + params.put(PARAM_PENDINGREQUESTID, pendingReq.getRequestID()); + + } + if (customParameters != null) + params.putAll(customParameters); + + return params; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.AbstractGUIFormBuilder#getTemplate(java.lang.String) + */ + @Override + public InputStream getTemplate(String viewName) { + return null; + + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.AbstractGUIFormBuilder#getContentType() + */ + @Override + public String getDefaultContentType() { + return null; + + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.AbstractGUIFormBuilder#getClasspathTemplateDir() + */ + @Override + public String getClasspathTemplateDir() { + return null; + + } +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java new file mode 100644 index 000000000..862c7edcf --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java @@ -0,0 +1,221 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.frontend.builder; + +import java.io.BufferedReader; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.StringWriter; +import java.net.URI; +import java.util.Iterator; +import java.util.Map; +import java.util.Map.Entry; + +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.VelocityEngine; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import at.gv.egovernment.moa.id.auth.frontend.exception.GUIBuildException; +import at.gv.egovernment.moa.id.auth.frontend.velocity.VelocityProvider; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; + +/** + * @author tlenz + * + */ +@Service("guiFormBuilder") +public class GUIFormBuilderImpl implements IGUIFormBuilder { + + private static final String DEFAULT_CONTENT_TYPE = "text/html;charset=UTF-8"; + private static final String CONFIG_HTMLTEMPLATES_DIR = "htmlTemplates"; + private static final String CLASSPATH_HTMLTEMPLATES_DIR = "templates"; + + @Autowired private AuthConfiguration authConfig; + private VelocityEngine engine; + + public GUIFormBuilderImpl() throws GUIBuildException { + try { + engine = VelocityProvider.getClassPathVelocityEngine(); + + } catch (Exception e) { + Logger.fatal("Initialization of Velocity-Engine to render GUI components FAILED.", e); + throw new GUIBuildException("Initialization of Velocity-Engine to render GUI components FAILED.", e); + + } + + } + + public void build(HttpServletResponse httpResp, IGUIBuilderConfiguration config, String loggerName) throws GUIBuildException { + build(httpResp, config, getInternalContentType(config), loggerName); + + } + + + @Override + public void build(HttpServletResponse httpResp, IGUIBuilderConfiguration config, + String contentType, String loggerName) throws GUIBuildException { + + InputStream is = null; + try { + String viewName = config.getViewName(); + + //load Tempate + is = getInternalTemplate(config); + if (is == null) { + Logger.warn("No GUI with viewName:" + viewName + " FOUND."); + throw new GUIBuildException("No GUI with viewName:" + viewName + " FOUND."); + + } + + //build Velocity Context from input paramters + VelocityContext context = buildContextFromViewParams(config.getViewParameters()); + + //evaluate template + StringWriter writer = new StringWriter(); + engine.evaluate(context, writer, loggerName, new BufferedReader(new InputStreamReader(is))); + + //write template to response + httpResp.setStatus(HttpServletResponse.SC_OK); + httpResp.setContentType(contentType); + httpResp.getOutputStream().write(writer.toString().getBytes("UTF-8")); + + } catch (IOException e) { + Logger.error("GUI form-builder has an internal error.", e); + throw new GUIBuildException("GUI form-builder has an internal error.", e); + + } finally { + if (is != null) + try { + is.close(); + + } catch (IOException e) { + Logger.error("Can NOT close GUI-Template InputStream.", e); + + } + } + + } + + private String getInternalContentType(IGUIBuilderConfiguration config) { + if (MiscUtil.isEmpty(config.getDefaultContentType())) + return DEFAULT_CONTENT_TYPE; + + else + return config.getDefaultContentType(); + + } + + private InputStream getInternalTemplate(IGUIBuilderConfiguration config) throws GUIBuildException { + String viewName = config.getViewName(); + + //load specific template + InputStream is = config.getTemplate(viewName); + + if (is == null) { + //load template from default resources + try { + Logger.trace("Loading GUI template:" + viewName + " from default resources ... "); + String pathLocation = null; + try { + //load template from config directory + String rootconfigdir = authConfig.getRootConfigFileDir(); + pathLocation = rootconfigdir + CONFIG_HTMLTEMPLATES_DIR + + viewName; + File file = new File(new URI(pathLocation)); + is = new FileInputStream(file); + + } catch (Exception e) { + //load template from classpath as backup + Logger.info("GUI template:" + viewName + " is not found in configuration directory. " + + " Load template from project library ... "); + try { + pathLocation = getInternalClasspathTemplateDir(config) + viewName; + is = Thread.currentThread() + .getContextClassLoader() + .getResourceAsStream(pathLocation); + + } catch (Exception e1) { + Logger.error("GUI template:" + pathLocation + " is NOT loadable!", e); + throw new GUIBuildException("GUI template:" + pathLocation + " is NOT loadable!", e); + + } + } + + } catch (GUIBuildException e) { + throw e; + + } catch (Exception e) { + Logger.error("GUI builder has an internal error during template load operation", e); + throw new GUIBuildException("GUI builder has an internal error during template load operation", e); + + } + } + + return is; + + } + + + /** + * @return + */ + private String getInternalClasspathTemplateDir(IGUIBuilderConfiguration config) { + String dir = config.getClasspathTemplateDir(); + if (dir != null) { + if (!dir.endsWith("/")) + dir += "/"; + + return dir; + + } else + return CLASSPATH_HTMLTEMPLATES_DIR; + } + + /** + * @param viewParams + * @return + */ + private VelocityContext buildContextFromViewParams(Map viewParams) { + VelocityContext context = new VelocityContext(); + + if (viewParams != null) { + Iterator> interator = viewParams.entrySet().iterator(); + while (interator.hasNext()) { + Entry el = interator.next(); + context.put(el.getKey(), el.getValue()); + } + + } + + return context; + } + +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/IGUIBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/IGUIBuilderConfiguration.java new file mode 100644 index 000000000..51f6295c7 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/IGUIBuilderConfiguration.java @@ -0,0 +1,74 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.frontend.builder; + +import java.io.InputStream; +import java.util.Map; + +/** + * @author tlenz + * + */ +public interface IGUIBuilderConfiguration { + + + /** + * Define the name of the template (with suffix) which should be used + * + * @return templatename, but never null + */ + public String getViewName(); + + /** + * Define the parameters, which should be evaluated in the template + * + * @return Map of parameters, which should be added to template + */ + public Map getViewParameters(); + + + /** + * Get a specific classpath template-directory prefix, which is used + * to load a template from classpath by using ClassLoader.getResourceAsStream(...) + * + * @return Classpath directory, or null if the default directory should be used + */ + public String getClasspathTemplateDir(); + + /** + * Get the GUI template with a specific name + * + * @param viewName Name of the template + * @return Tempate as InputStream, or null if default getTemplate method should be used + */ + public InputStream getTemplate(String viewName); + + /** + * Get the contentType, which should be set in HTTP response + *

+ * DefaultValue: text/html;charset=UTF-8 + * + * @return ContentType, or null if default ContentType should be used. + */ + public String getDefaultContentType(); +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/IGUIFormBuilder.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/IGUIFormBuilder.java new file mode 100644 index 000000000..198220e97 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/IGUIFormBuilder.java @@ -0,0 +1,67 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.frontend.builder; + +import javax.servlet.http.HttpServletResponse; + +import at.gv.egovernment.moa.id.auth.frontend.exception.GUIBuildException; + +/** + * @author tlenz + * + */ +public interface IGUIFormBuilder { + + /** + * Parse a GUI template, with parameters into a http servlet-response + * and use the default http-response content-type. + *

+ * The parser use the VelocityEngine as internal template evaluator. + * + * @param httpResp http-response object + * @param viewName Name of the template (with suffix), which should be used. + * The template is selected by using the getTemplate(String viewName) method + * @param viewParams Map of parameters, which should be added to template + * @param loggerName String, which should be used from logger + * + * @throws GUIBuildException + */ + public void build(HttpServletResponse httpResp, IGUIBuilderConfiguration config, String loggerName) throws GUIBuildException; + + /** + * Parse a GUI template, with parameters into a http servlet-response. + *

+ * The parser use the VelocityEngine as internal template evaluator. + * + * @param httpResp http-response object + * @param viewName Name of the template (with suffix), which should be used. + * The template is selected by using the getTemplate(String viewName) method + * @param viewParams Map of parameters, which should be added to template + * @param contentType http-response content-type, which should be set + * @param loggerName String, which should be used from logger + * + * @throws GUIBuildException + */ + void build(HttpServletResponse httpResp, IGUIBuilderConfiguration config, String contentType, + String loggerName) throws GUIBuildException; +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java new file mode 100644 index 000000000..73a0e7691 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java @@ -0,0 +1,186 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.frontend.builder; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.util.HashMap; +import java.util.Map; + +import at.gv.egovernment.moa.id.auth.frontend.utils.FormBuildUtils; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.data.CPEPS; +import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; + +/** + * @author tlenz + * + */ +public class ServiceProviderSpecificGUIFormBuilderConfiguration extends AbstractGUIFormBuilderConfiguration { + + public static final String VIEW_BKUSELECTION = "/loginFormFull.html"; + public static final String VIEW_SENDASSERTION = "/sendAssertionFormFull.html"; + public static final String VIEW_TEMPLATE_CSS = "/css_template.css"; + public static final String VIEW_TEMPLATE_JS = "/javascript_tempalte.js"; + + public static final String PARAM_BKU_ONLINE = "bkuOnline"; + public static final String PARAM_BKU_HANDY = "bkuLocal"; + public static final String PARAM_BKU_LOCAL = "bkuHandy"; + + public static final String PARAM_OANAME = "OAName"; + public static final String PARAM_COUNTRYLIST = "countryList"; + + private IRequest pendingReq = null; + + /** + * @param authURL PublicURLPrefix of the IDP but never null + * @param viewName Name of the template (with suffix) but never null + * @param formSubmitEndpoint EndPoint on which the form should be submitted, + * or null if the form must not submitted + */ + public ServiceProviderSpecificGUIFormBuilderConfiguration(String authURL, String viewName, + String formSubmitEndpoint) { + super(authURL, viewName, formSubmitEndpoint); + + } + + /** + * @param Current processed pending-request DAO but never null + * @param viewName Name of the template (with suffix) but never null + * @param formSubmitEndpoint EndPoint on which the form should be submitted, + * or null if the form must not submitted + */ + public ServiceProviderSpecificGUIFormBuilderConfiguration(IRequest pendingReq, String viewName, + String formSubmitEndpoint) { + super(pendingReq.getAuthURL(), viewName, formSubmitEndpoint); + this.pendingReq = pendingReq; + + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.builder.IGUIBuilderConfiguration#getViewParameters() + */ + @Override + public Map getSpecificViewParameters() { + Map params = new HashMap(); + params.put(PARAM_BKU_ONLINE, IOAAuthParameters.ONLINEBKU); + params.put(PARAM_BKU_HANDY, IOAAuthParameters.HANDYBKU); + params.put(PARAM_BKU_LOCAL, IOAAuthParameters.LOCALBKU); + + if (pendingReq != null) { + params.put(PARAM_PENDINGREQUESTID, pendingReq.getRequestID()); + + //add service-provider specific GUI parameters + IOAAuthParameters oaParam = pendingReq.getOnlineApplicationConfiguration(); + if (oaParam != null) { + params.put(PARAM_OANAME, oaParam.getFriendlyName()); + + + if (oaParam.isShowStorkLogin()) + addCountrySelection(params, oaParam); + + FormBuildUtils.customiceLayoutBKUSelection(params, oaParam); + + } else + FormBuildUtils.defaultLayoutBKUSelection(params); + + + } else { + //add default GUI parameters + FormBuildUtils.defaultLayoutBKUSelection(params); + + } + + return params; + } + + /** + * @param params + * @param oaParam + */ + private void addCountrySelection(Map params, IOAAuthParameters oaParam) { + String pepslist = ""; + try { + for (CPEPS current : oaParam.getPepsList()) { + String countryName = null; + if (MiscUtil.isNotEmpty(MOAIDAuthConstants.COUNTRYCODE_XX_TO_NAME.get(current.getCountryCode().toUpperCase()))) + countryName = MOAIDAuthConstants.COUNTRYCODE_XX_TO_NAME.get(current.getCountryCode().toUpperCase()); + else + countryName = current.getCountryCode().toUpperCase(); + + pepslist += "\n"; + + } + params.put(PARAM_COUNTRYLIST, pepslist); + + } catch (NullPointerException e) { + Logger.warn("Can not at Countries to GUI. Msg:" + e.getMessage()); + + } + + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.AbstractGUIFormBuilder#getClasspathTemplateDir() + */ + @Override + public String getClasspathTemplateDir() { + return null; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.AbstractGUIFormBuilder#getTemplate(java.lang.String) + */ + @Override + public InputStream getTemplate(String viewName) { + if (pendingReq != null && pendingReq.getOnlineApplicationConfiguration() != null) { + + byte[] oatemplate = null; + if (VIEW_BKUSELECTION.equals(viewName)) + oatemplate = pendingReq.getOnlineApplicationConfiguration().getBKUSelectionTemplate(); + + else if (VIEW_SENDASSERTION.equals(viewName)) + oatemplate = pendingReq.getOnlineApplicationConfiguration().getSendAssertionTemplate(); + + // OA specific template requires a size of 8 bits minimum + if (oatemplate != null && oatemplate.length > 7) + return new ByteArrayInputStream(oatemplate); + } + + return null; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.frontend.AbstractGUIFormBuilder#getDefaultContentType() + */ + @Override + public String getDefaultContentType() { + return null; + } + +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/exception/GUIBuildException.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/exception/GUIBuildException.java new file mode 100644 index 000000000..fff458546 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/exception/GUIBuildException.java @@ -0,0 +1,46 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.frontend.exception; + +/** + * @author tlenz + * + */ +public class GUIBuildException extends Exception { + + private static final long serialVersionUID = -278663750102498205L; + + /** + * @param string + */ + public GUIBuildException(String msg) { + super(msg); + + } + + public GUIBuildException(String msg, Throwable e) { + super(msg, e); + + } + +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/utils/FormBuildUtils.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/utils/FormBuildUtils.java new file mode 100644 index 000000000..71093a4d3 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/utils/FormBuildUtils.java @@ -0,0 +1,178 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +package at.gv.egovernment.moa.id.auth.frontend.utils; + + +import java.util.HashMap; +import java.util.Map; + +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants; +import at.gv.egovernment.moa.util.MiscUtil; + +public class FormBuildUtils { + + private static Map defaultmap = null; + + public static String PARAM_MAIN_BACKGROUNDCOLOR = "MAIN_BACKGOUNDCOLOR"; + public static String PARAM_MAIN_COLOR = "MAIN_COLOR"; + public static String PARAM_HEADER_BACKGROUNDCOLOR = "HEADER_BACKGROUNDCOLOR"; + public static String PARAM_HEADER_COLOR = "HEADER_COLOR"; + public static String PARAM_BUTTON_BACKGROUNDCOLOR = "BUTTON_BACKGROUNDCOLOR"; + public static String PARAM_BUTTON_BACKGROUNDCOLOR_FOCUS = "BUTTON_BACKGROUNDCOLOR_FOCUS"; + public static String PARAM_BUTTON_COLOR = "BUTTON_COLOR"; + public static String PARAM_FONTFAMILY = "FONTTYPE"; + public static String PARAM_HEADER_TEXT = "HEADER_TEXT"; + public static String PARAM_REDIRECTTARGET = "REDIRECTTARGET"; + public static String PARAM_APPLET_HEIGHT = "APPLETHEIGHT"; + public static String PARAM_APPLET_WIDTH = "APPLETWIDTH"; + + private static String PARAM_MANDATEVISIBLE = "MANDATEVISIBLE"; + private static String PARAM_MANDATECHECKED = "MANDATECHECKED"; + + private static String PARAM_STORKVISIBLE = "STORKVISIBLE"; + + private static final String TEMPLATEVISIBLE = " display: none"; + private static final String TEMPLATEDISABLED = "disabled=\"true\""; + private static final String TEMPLATECHECKED = "checked=\"true\""; + private static final String TEMPLATE_ARIACHECKED = "aria-checked="; + + + static { + if (defaultmap == null) { + defaultmap = new HashMap(); + defaultmap.put(PARAM_MAIN_BACKGROUNDCOLOR, "#F7F8F7"); + defaultmap.put(PARAM_MAIN_COLOR, "#000000"); + + defaultmap.put(PARAM_HEADER_BACKGROUNDCOLOR, "#C3D2E2"); + defaultmap.put(PARAM_HEADER_COLOR, "#000000"); + defaultmap.put(PARAM_HEADER_TEXT, "Login"); + + defaultmap.put(PARAM_BUTTON_BACKGROUNDCOLOR, "#EBEBEB"); + defaultmap.put(PARAM_BUTTON_BACKGROUNDCOLOR_FOCUS, "#EBEBEB"); + defaultmap.put(PARAM_BUTTON_COLOR, "#000000"); + + defaultmap.put(PARAM_FONTFAMILY, "Verdana,Geneva,Arial,sans-serif"); + + defaultmap.put(PARAM_REDIRECTTARGET, "_top"); + } + } + + public static void customiceLayoutBKUSelection(Map params, IOAAuthParameters oaParam) { + + if (oaParam.isShowMandateCheckBox()) + params.put(PARAM_MANDATEVISIBLE, ""); + else + params.put(PARAM_MANDATEVISIBLE, TEMPLATEVISIBLE); + + if (oaParam.isOnlyMandateAllowed()) { + params.put(PARAM_MANDATECHECKED, TEMPLATECHECKED + " " + + TEMPLATEDISABLED + " " +TEMPLATE_ARIACHECKED + "\"true\""); + + } else + params.put(PARAM_MANDATECHECKED, TEMPLATE_ARIACHECKED + "\"false\""); + + if (oaParam.isShowStorkLogin()) + params.put(PARAM_STORKVISIBLE, ""); + else + params.put(PARAM_STORKVISIBLE, TEMPLATEVISIBLE); + + //add more SP specific infos + setFormCustomizatenFromSP(params, oaParam); + + //format parameter-value for fontss + String fonttype = (String) params.get(PARAM_FONTFAMILY); + if (MiscUtil.isNotEmpty(fonttype)) { + String[] fonttypeList = fonttype.split(","); + String fonttypeformated = "\"" + fonttypeList[0].trim().replace("\"", "") + "\""; + + for (int i=1; i getDefaultMap() { + return defaultmap; + } + + /** + * @param value + * @return + */ + public static void defaultLayoutBKUSelection(Map params) { + params.put(PARAM_MANDATEVISIBLE, TEMPLATEVISIBLE); + params.put(PARAM_MANDATECHECKED, TEMPLATE_ARIACHECKED + "\"false\""); + params.put(PARAM_STORKVISIBLE, TEMPLATEVISIBLE); + + params.putAll(getDefaultMap()); + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.config.auth.IOAAuthParameters#getFormCustomizaten() + */ + private static void setFormCustomizatenFromSP(Map params, IOAAuthParameters spConfig) { + params.putAll(FormBuildUtils.getDefaultMap()); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BACKGROUNDCOLOR))) + params.put(FormBuildUtils.PARAM_MAIN_BACKGROUNDCOLOR, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BACKGROUNDCOLOR)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BUTTONBACKGROUNDCOLOR))) + params.put(FormBuildUtils.PARAM_BUTTON_BACKGROUNDCOLOR, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BUTTONBACKGROUNDCOLOR)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BUTTONBACLGROUNDCOLORFOCUS))) + params.put(FormBuildUtils.PARAM_BUTTON_BACKGROUNDCOLOR_FOCUS, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BUTTONBACLGROUNDCOLORFOCUS)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BUTTONFRONTCOLOR))) + params.put(FormBuildUtils.PARAM_BUTTON_COLOR, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BUTTONFRONTCOLOR)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_FONTTYPE))) + params.put(FormBuildUtils.PARAM_FONTFAMILY, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_FONTTYPE)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_FRONTCOLOR))) + params.put(FormBuildUtils.PARAM_MAIN_COLOR, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_FRONTCOLOR)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_HEADERBACKGROUNDCOLOR))) + params.put(FormBuildUtils.PARAM_HEADER_BACKGROUNDCOLOR, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_HEADERBACKGROUNDCOLOR)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_HEADERFRONTCOLOR))) + params.put(FormBuildUtils.PARAM_HEADER_COLOR, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_HEADERFRONTCOLOR)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_HEADERTEXT))) + params.put(FormBuildUtils.PARAM_HEADER_TEXT, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_HEADERTEXT)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETREDIRECTTARGET))) + params.put(FormBuildUtils.PARAM_REDIRECTTARGET, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETREDIRECTTARGET)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETHEIGHT))) + params.put(FormBuildUtils.PARAM_APPLET_HEIGHT, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETHEIGHT)); + + if (MiscUtil.isNotEmpty(spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETWIDTH))) + params.put(FormBuildUtils.PARAM_APPLET_WIDTH, spConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETWIDTH)); + + } + +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/velocity/VelocityLogAdapter.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/velocity/VelocityLogAdapter.java new file mode 100644 index 000000000..3d5c5ed2f --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/velocity/VelocityLogAdapter.java @@ -0,0 +1,99 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +package at.gv.egovernment.moa.id.auth.frontend.velocity; + +import org.apache.velocity.app.Velocity; +import org.apache.velocity.runtime.RuntimeServices; +import org.apache.velocity.runtime.log.LogChute; + +import at.gv.egovernment.moa.logging.Logger; + +public class VelocityLogAdapter implements LogChute { + + public VelocityLogAdapter() { + try + { + /* + * register this class as a logger with the Velocity singleton + * (NOTE: this would not work for the non-singleton method.) + */ + Velocity.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM, this ); + Velocity.init(); + } + catch (Exception e) + { + Logger.error("Failed to register Velocity logger"); + } + } + + public void init(RuntimeServices arg0) throws Exception { + } + + public boolean isLevelEnabled(int arg0) { + switch(arg0) { + case LogChute.DEBUG_ID: + return Logger.isDebugEnabled(); + case LogChute.TRACE_ID: + return Logger.isTraceEnabled(); + default: + return true; + } + } + + public void log(int arg0, String arg1) { + switch(arg0) { + case LogChute.DEBUG_ID: + Logger.debug(arg1); + break; + case LogChute.TRACE_ID: + Logger.trace(arg1); + break; + case LogChute.INFO_ID: + Logger.info(arg1); + break; + case LogChute.WARN_ID: + Logger.warn(arg1); + break; + case LogChute.ERROR_ID: + default: + Logger.error(arg1); + break; + } + } + + public void log(int arg0, String arg1, Throwable arg2) { + switch(arg0) { + case LogChute.DEBUG_ID: + case LogChute.TRACE_ID: + case LogChute.INFO_ID: + case LogChute.WARN_ID: + Logger.warn(arg1, arg2); + break; + case LogChute.ERROR_ID: + default: + Logger.error(arg1, arg2); + break; + } + } + +} diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/velocity/VelocityProvider.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/velocity/VelocityProvider.java new file mode 100644 index 000000000..022c144f0 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/velocity/VelocityProvider.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + ******************************************************************************/ +/* + * Copyright 2011 by Graz University of Technology, Austria + * The Austrian STORK Modules have been developed by the E-Government + * Innovation Center EGIZ, a joint initiative of the Federal Chancellery + * Austria and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ + + +/** + * + */ +package at.gv.egovernment.moa.id.auth.frontend.velocity; + +import org.apache.velocity.app.VelocityEngine; +import org.apache.velocity.runtime.RuntimeConstants; + +/** + * Gets a Velocity Engine + * + * @author bzwattendorfer + * + */ +public class VelocityProvider { + + /** + * Gets velocityEngine from Classpath + * @return VelocityEngine + * @throws Exception + */ + public static VelocityEngine getClassPathVelocityEngine() throws Exception { + VelocityEngine velocityEngine = getBaseVelocityEngine(); + velocityEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath"); + velocityEngine.setProperty("classpath.resource.loader.class", + "org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); + + + velocityEngine.init(); + + return velocityEngine; + } + + /** + * Gets VelocityEngine from File + * @param rootPath File Path to template file + * @return VelocityEngine + * @throws Exception + */ + public static VelocityEngine getFileVelocityEngine(String rootPath) throws Exception { + VelocityEngine velocityEngine = getBaseVelocityEngine(); + velocityEngine.setProperty(RuntimeConstants.RESOURCE_LOADER, "file"); + velocityEngine.setProperty("file.resource.loader.class", + "org.apache.velocity.runtime.resource.loader.FileResourceLoader"); + velocityEngine.setProperty("file.resource.loader.path", rootPath); + + velocityEngine.init(); + + return velocityEngine; + } + + /** + * Gets a basic VelocityEngine + * @return VelocityEngine + */ + private static VelocityEngine getBaseVelocityEngine() { + VelocityEngine velocityEngine = new VelocityEngine(); + velocityEngine.setProperty(RuntimeConstants.INPUT_ENCODING, "UTF-8"); + velocityEngine.setProperty(RuntimeConstants.OUTPUT_ENCODING, "UTF-8"); + velocityEngine.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM_CLASS, + "org.apache.velocity.runtime.log.SimpleLog4JLogSystem"); + + return velocityEngine; + } + +} diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css new file mode 100644 index 000000000..a8735be60 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css @@ -0,0 +1,625 @@ +@charset "utf-8"; + @media screen and (min-width: 650px) { + + body { + margin:0; + padding:0; + color : #000; + background-color : #fff; + text-align: center; + background-color: #6B7B8B; + } + + .browserInfoButton{ + color: rgb(128, 128, 128); + } + + #localBKU p { + font-size: 0.7em; + } + + #localBKU input{ + font-size: 0.85em; + /*border-radius: 5px;*/ + } + + #bkuselectionarea input[type=button] { + font-size: 0.85em; + /*border-radius: 7px;*/ + margin-bottom: 25px; + min-width: 80px; + } + + #mandateLogin { + font-size: 0.85em; + } + + #bku_header h2 { + font-size: 0.8em; + } + + + #page { + display: block; + border: 2px solid rgb(0,0,0); + width: 650px; + height: 460px; + margin: 0 auto; + margin-top: 5%; + position: relative; + border-radius: 25px; + background: rgb(255,255,255); + } + + #page1 { + text-align: center; + } + + #main { + /* clear:both; */ + position:relative; + margin: 0 auto; + width: 250px; + text-align: center; + } + + .OA_header { + /* background-color: white;*/ + font-size: 20pt; + margin-bottom: 25px; + margin-top: 25px; + } + + #leftcontent { + /*float:left; */ + width:250px; + margin-bottom: 25px; + text-align: left; + border: 1px solid rgb(0,0,0); + } + + #selectArea { + font-size: 15px; + padding-bottom: 65px; + } + + #leftcontent { + width: 300px; + margin-top: 30px; + } + + #bku_header { + height: 5%; + padding-bottom: 3px; + padding-top: 3px; + } + + #bkulogin { + overflow:hidden; + min-width: 190px; + min-height: 180px; + /*height: 260px;*/ + } + + h2#tabheader{ + font-size: 1.1em; + padding-left: 2%; + padding-right: 2%; + position: relative; + } + + #stork h2 { + font-size: 1.0em; + margin-bottom: 2%; + } + + .setAssertionButton_full { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 100px; + height: 30px + } + + #leftbutton { + width: 30%; + float:left; + margin-left: 40px; + } + + #rightbutton { + width: 30%; + float:right; + margin-right: 45px; + text-align: right; + } + + button { + height: 25px; + width: 75px; + margin-bottom: 10px; + } + + + + #validation { + position: absolute; + bottom: 0px; + margin-left: 270px; + padding-bottom: 10px; + } + + } + + @media screen and (max-width: 205px) { + #localBKU p { + font-size: 0.6em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + + #localBKU input { + font-size: 0.6em; + min-width: 60px; + /* max-width: 65px; */ + min-height: 1.0em; + /* border-radius: 5px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 0.7em; + min-width: 55px; + /*min-height: 1.1em; + border-radius: 5px;*/ + margin-bottom: 2% + } + + #mandateLogin { + font-size: 0.65em; + } + + #bku_header h2 { + font-size: 0.8em; + margin-top: -0.4em; + padding-top: 0.4em; + } + + #bkulogin { + min-height: 150px; + } + } + + @media screen and (max-width: 249px) and (min-width: 206px) { + #localBKU p { + font-size: 0.7em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + + #localBKU input { + font-size: 0.7em; + min-width: 70px; + /* max-width: 75px; */ + min-height: 0.95em; + /* border-radius: 6px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 0.75em; + min-width: 60px; + /* min-height: 0.95em; + border-radius: 6px; */ + margin-bottom: 5% + } + + #mandateLogin { + font-size: 0.75em; + } + + #bku_header h2 { + font-size: 0.9em; + margin-top: -0.45em; + padding-top: 0.45em; + } + + #bkulogin { + min-height: 180px; + } + } + + @media screen and (max-width: 299px) and (min-width: 250px) { + #localBKU p { + font-size: 0.9em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + + #localBKU input { + font-size: 0.8em; + min-width: 70px; + /* max-width: 75px; */ + /* border-radius: 6px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 0.85em; + /* min-height: 1.05em; + border-radius: 7px; */ + margin-bottom: 10%; + } + + #mandateLogin { + font-size: 1em; + } + + #bku_header h2 { + font-size: 1.0em; + margin-top: -0.50em; + padding-top: 0.50em; + } + } + + @media screen and (max-width: 399px) and (min-width: 300px) { + #localBKU p { + font-size: 0.9em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + #localBKU input { + font-size: 0.8em; + min-width: 70px; + /* max-width: 75px; */ + /* border-radius: 6px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 0.9em; + /* min-height: 1.2em; + border-radius: 8px; */ + margin-bottom: 10%; + max-width: 80px; + } + + #mandateLogin { + font-size: 1em; + } + + #bku_header h2 { + font-size: 1.1em; + margin-top: -0.55em; + padding-top: 0.55em; + } + } + + @media screen and (max-width: 649px) and (min-width: 400px) { + #localBKU p { + font-size: 0.9em; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + #localBKU input { + font-size: 0.8em; + min-width: 70px; + /* max-width: 80px; */ + /* border-radius: 6px; */ + } + + #bkuselectionarea input[type=button] { + font-size: 1.0em; + /* min-height: 1.3em; + border-radius: 10px; */ + margin-bottom: 10%; + max-width: 85px; + } + + #mandateLogin { + font-size: 1.2em; + } + + #bku_header h2 { + font-size: 1.3em; + margin-top: -0.65em; + padding-top: 0.65em; + } + } + + + + @media screen and (max-width: 649px) { + + body { + margin:0; + padding:0; + color : #000; + text-align: center; + font-size: 100%; + background-color: $MAIN_BACKGOUNDCOLOR; + } + .browserInfoButton{ + color: rgb(128, 128, 128); + } + #page { + visibility: hidden; + margin-top: 0%; + } + + #page1 { + visibility: hidden; + } + + #main { + visibility: hidden; + } + + #validation { + visibility: hidden; + display: none; + } + + .OA_header { + margin-bottom: 0px; + margin-top: 0px; + font-size: 0pt; + visibility: hidden; + } + + #leftcontent { + visibility: visible; + margin-bottom: 0px; + text-align: left; + border:none; + vertical-align: middle; + min-height: 173px; + min-width: 204px; + + } + + #bku_header { + height: 10%; + min-height: 1.2em; + margin-top: 1%; + } + + h2#tabheader{ + padding-left: 2%; + padding-right: 2%; + position: relative; + top: 50%; + } + + #stork h2 { + font-size: 0.9em; + margin-bottom: 2%; + } + + #bkulogin { + min-width: 190px; + min-height: 155px; + } + + .setAssertionButton_full { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 70px; + height: 25px; + } + + input[type=button] { +/* height: 11%; */ + width: 70%; + } + } + + * { + margin: 0; + padding: 0; + #if($FONTTYPE) + font-family: $FONTTYPE; + #end + } + + #selectArea { + padding-top: 10px; + padding-bottom: 55px; + padding-left: 10px; + } + + .setAssertionButton { + background: #efefef; + cursor: pointer; + margin-top: 15px; + width: 70px; + height: 25px; + } + + #leftbutton { + width: 35%; + float:left; + margin-left: 15px; + } + + #rightbutton { + width: 35%; + float:right; + margin-right: 25px; + text-align: right; + } + + #stork { + /*margin-bottom: 10px;*/ + /* margin-top: 5px; */ + } + + #mandateLogin { + padding-bottom: 4%; + padding-top: 4%; + height: 10%; + position: relative; + text-align: center; + } + + .verticalcenter { + vertical-align: middle; + } + + #mandateLogin div { + clear: both; + margin-top: -1%; + position: relative; + top: 50%; + } + + #bkuselectionarea { + position: relative; + display: block; + } + + #localBKU { + padding-bottom: 4%; + /*padding-top: 4%;*/ + position: relative; + clear: both; + text-align: center; + } + + #bkukarte { + float:left; + text-align:center; + width:40%; + min-height: 70px; + padding-left: 5%; + padding-top: 2%; + } + + #bkuhandy { + float:right; + text-align:center; + width:40%; + min-height: 90px; + padding-right: 5%; + padding-top: 2%; + } + + .bkuimage { + width: 90%; + height: auto; + } + + #mandate{ + text-align:center; + padding : 5px 5px 5px 5px; + } + +/* input[type=button], .sendButton { + background: $BUTTON_BACKGROUNDCOLOR; + color: $BUTTON_COLOR; +/* border:1px solid #000; */ +/* cursor: pointer; +/* box-shadow: 3px 3px 3px #222222; */ +/* } + +/* button:hover, button:focus, button:active, + .sendButton:hover , .sendButton:focus, .sendButton:active, + #mandateCheckBox:hover, #mandateCheckBox:focus, #mandateCheckBox:active { + background: $BUTTON_BACKGROUNDCOLOR_FOCUS; + color: $BUTTON_COLOR; +/* border:1px solid #000; */ +/* cursor: pointer; +/* box-shadow: -1px -1px 3px #222222; */ +/* } + +*/ + input { + /*border:1px solid #000;*/ + cursor: pointer; + } + + #localBKU input { +/* color: $BUTTON_COLOR; */ + /*border: 0px;*/ + display: inline-block; + + } + + #localBKU input:hover, #localBKU input:focus, #localBKU input:active { + /*text-decoration: underline;*/ + } + + #installJava, #BrowserNOK { + clear:both; + font-size:0.8em; + padding:4px; + } + + .selectText{ + + } + + .selectTextHeader{ + + } + + .sendButton { + width: 30%; + margin-bottom: 1%; + } + + #leftcontent a { + text-decoration:none; + color: #000; + /* display:block;*/ + padding:4px; + } + + #leftcontent a:hover, #leftcontent a:focus, #leftcontent a:active { + text-decoration:underline; + color: #000; + } + + .infobutton { + background-color: #005a00; + color: white; + font-family: serif; + text-decoration: none; + padding-top: 2px; + padding-right: 4px; + padding-bottom: 2px; + padding-left: 4px; + font-weight: bold; + } + + .hell { + background-color : $MAIN_BACKGOUNDCOLOR; + color: $MAIN_COLOR; + } + + .dunkel { + background-color: $HEADER_BACKGROUNDCOLOR; + color: $HEADER_COLOR; + } + + .main_header { + color: black; + font-size: 32pt; + position: absolute; + right: 10%; + top: 40px; + + } + + #ssoSessionTransferBlock { + font-size: 0.8em; + margin-left: 5px; + margin-bottom: 5px; + } + + #alert_area { + width: 500px; + padding-left: 80px; + } \ No newline at end of file diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/error_message.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/error_message.html new file mode 100644 index 000000000..4fd4d63cd --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/error_message.html @@ -0,0 +1,37 @@ + + + + + + An error arise ... + + + +
+
+

Authentication error arise

+ + + + + +
+

The authentication stops on account of a process error:

+
+

Error Code: $errorCode

+

Error Message:$errorMsg

+
+ + + #if($stacktrace) +
+

Stacktrace: $stacktrace

+
+ #end + + + +
+
+ + \ No newline at end of file diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js b/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js new file mode 100644 index 000000000..e4e05bace --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js @@ -0,0 +1,200 @@ +function isIE() { + return (/MSIE (\d+\.\d+);/.test(navigator.userAgent)); + } + function isFullscreen() { + try { + return ((top.innerWidth == screen.width) && (top.innerHeight == screen.height)); + } catch (e) { + return false; + } + } + function isActivexEnabled() { + var supported = null; + try { + supported = !!new ActiveXObject("htmlfile"); + } catch (e) { + supported = false; + } + return supported; + } + function isMetro() { + if (!isIE()) + return false; + return !isActivexEnabled() && isFullscreen(); + } + window.onload=function() { + document.getElementById("localBKU").style.display="block"; + return; + } + function bkuLocalClicked() { + setMandateSelection(); + } + + function bkuOnlineClicked() { + if (isMetro()) + document.getElementById("metroDetected").style.display="block"; + document.getElementById("localBKU").style.display="block"; +/* if (checkMandateSSO()) + return; */ + + setMandateSelection(); +/* setSSOSelection(); */ + + var iFrameURL = "$contextPath$submitEndpoint" + "?"; + iFrameURL += "&pendingid=" + "$pendingReqID"; + + iFrameURL += "bkuURI=" + "$bkuOnline"; + iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; + + generateIFrame(iFrameURL); + } + function bkuHandyClicked() { + document.getElementById("localBKU").style.display="none"; +/* if (checkMandateSSO()) + return; */ + + setMandateSelection(); +/* setSSOSelection(); */ + + var iFrameURL = "$contextPath$submitEndpoint" + "?"; + iFrameURL += "&pendingid=" + "$pendingReqID"; + + iFrameURL += "bkuURI=" + "$bkuHandy"; + iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; + + generateIFrame(iFrameURL); + } + function storkClicked() { + document.getElementById("localBKU").style.display="none"; +/* if (checkMandateSSO()) + return; */ + + setMandateSelection(); +/* setSSOSelection(); */ + + var ccc = "AT"; + var countrySelection = document.getElementById("cccSelection"); + if (countrySelection != null) { + ccc = document.getElementById("cccSelection").value; + } + var iFrameURL = "$contextPath$submitEndpoint" + "?"; + iFrameURL += "&pendingid=" + "$pendingReqID"; + + #if($bkuOnline) + iFrameURL += "bkuURI=" + "$bkuOnline"; + #end + + iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; + iFrameURL += "&CCC=" + ccc; + + generateIFrame(iFrameURL); + } + function generateIFrame(iFrameURL) { + var el = document.getElementById("bkulogin"); + var width = el.clientWidth; + var heigth = el.clientHeight - 20; + var parent = el.parentNode; + + iFrameURL += "&heigth=" + heigth; + iFrameURL += "&width=" + width; + + var iframe = document.createElement("iframe"); + iframe.setAttribute("src", iFrameURL); + iframe.setAttribute("width", el.clientWidth - 1); + iframe.setAttribute("height", el.clientHeight - 1); + iframe.setAttribute("frameborder", "0"); + iframe.setAttribute("scrolling", "no"); + iframe.setAttribute("title", "Login"); + parent.replaceChild(iframe, el); + } + function setMandateSelection() { + document.getElementById("useMandate").value = "false"; + var checkbox = document.getElementById("mandateCheckBox"); + if (checkbox != null) { + if (document.getElementById("mandateCheckBox").checked) { + document.getElementById("useMandate").value = "true"; + } + } + } + function onChangeChecks() { + if (self.innerWidth < 650) { + document.getElementById("moaidform").setAttribute("target","_parent"); + } else { + document.getElementById("moaidform").removeAttribute("target"); + } + + } + + function checkIfBrowserSupportsJava(){ + console.log("Browser is Chrome: "+checkIfBrowserIsChrome()); + console.log("Browser is Safari: "+checkIfBrowserIsSafari()); + console.log("Browser is Edge: "+checkIfBrowserIsEdge()); + + var cnt = 0; + + if(checkIfBrowserIsChrome())cnt++; + if(checkIfBrowserIsEdge())cnt++; + if(checkIfBrowserIsSafari())cnt++; + + if(cnt==0 || cnt>1)//cnt>1 means perhaps wrong detection + return true; + + var image = document.getElementById("bkuimage"); + var srcatt = image.getAttribute("src"); + var last = srcatt.substring(srcatt.lastIndexOf('/')+1); + srcatt = srcatt.replace(last,'online-bku-deactivated.png'); + image.setAttribute("src",srcatt); + + + var button = document.getElementsByName("bkuButtonOnline")[0]; + button.setAttribute("class","browserInfoButton"); + button.setAttribute("title","Java wird nicht unterstützt, klicken für mehr Informationen."); + button.setAttribute("onClick","alert('Java wird von Ihrem Browser nicht unterstützt, ist jedoch für den Betrieb der Online Bürgerkartenumgebung notwendig.\\nWollen Sie dennoch die Online Bürgerkartenumgebung verwenden, wird zur Zeit Java noch von Firefox und MS Internet Explorer unterstützt. \\nAlternativ koennen Sie auch eine lokale Bürgerkartenumgebung verwenden, verfügbar unter www.buergerkarte.at.');"); + + return false; + + } + function checkIfBrowserIsChrome(){ + var chrome_defined = !!window.chrome;//chrome object defined + var webstore_defined = false; + if(window.chrome){ + webstore_defined = !!window.chrome.webstore; + } + return chrome_defined && webstore_defined; + } + function checkIfBrowserIsEdge(){//edge also defines the chrome object, but not the webapp + var chrome_defined = !!window.chrome;//chrome object defined + var webstore_defined = true; + if(window.chrome){ + webstore_defined = !!window.chrome.webstore; + } + return chrome_defined && !webstore_defined; + } + function checkIfBrowserIsSafari(){ + var cond1 = Object.prototype.toString.call(window.HTMLElement).indexOf('Constructor') > 0; + return cond1; + } +/* function setSSOSelection() { + document.getElementById("useSSO").value = "false"; + var checkbox = document.getElementById("SSOCheckBox"); + if (checkbox != null) { + if (document.getElementById("SSOCheckBox").checked) { + document.getElementById("useSSO").value = "true"; + } + } + } */ + +/* function checkMandateSSO() { + var sso = document.getElementById("SSOCheckBox"); + var mandate = document.getElementById("mandateCheckBox"); + + + if (sso.checked && mandate.checked) { + alert("Anmeldung in Vertretung in kombination mit Single Sign-On wird aktuell noch nicht unterstützt!") + mandate.checked = false; + sso.checked = false; + return true; + } else { + return false; + } + } */ \ No newline at end of file diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html new file mode 100644 index 000000000..02b86472b --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html @@ -0,0 +1,92 @@ + + + + + + + + + + + + +Anmeldung mittels Bürgerkarte oder Handy-Signatur + + +
+
+

Anmeldung an: $OAName

+
+
+
+

$HEADER_TEXT

+
+
+
+
+ + + +
+
+
+
+ OnlineBKU +
+
+ HandyBKU +
+
+
+
+ + + + + + +
+
+ + + + +
+

Home Country Selection

+

+ + + i +

+
+ + +
+
+
+
+
+ + diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/redirectForm.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/redirectForm.html new file mode 100644 index 000000000..ac3242c89 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/redirectForm.html @@ -0,0 +1,13 @@ + + + + + + + + + CLICK to perform a + redirect back to Online Application + + diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/sendAssertionFormFull.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/sendAssertionFormFull.html new file mode 100644 index 000000000..a9f0c4238 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/sendAssertionFormFull.html @@ -0,0 +1,52 @@ + + + + + + + + Anmeldung an Online-Applikation + + + + +
+ +
+ + + +
+
+
+

+ Anmeldeinformationen: +

+
+ +
+

Anmeldung an: $OAName

+ + +
+
+ + + +
+
+
+
+ + + +
+
+ +
+
+
+
+
+ + diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/slo_template.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/slo_template.html new file mode 100644 index 000000000..b3eb18082 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/slo_template.html @@ -0,0 +1,94 @@ + + + + + + + + #if($timeoutURL) + + #end + + Single LogOut Vorgang ... + + +#if($timeoutURL) + +#else + +#end + + +
+
+

MOA-ID Single LogOut Information

+
+
+ + #if($errorMsg) +
+

$errorMsg

+
+ #end + + #if($successMsg) +
+

$successMsg

+
+ #end + + #if($redirectURLs) +
+

+ Sie werden von allen Online-Applikationen abgemeldet.
+ Dieser Vorgang kann einige Zeit in Anspruch nehmen. +

+
+ #end + +
+
+
+ +
+ + + #foreach( $el in $redirectURLs ) + + #end + + \ No newline at end of file diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/sso_transfer_template.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/sso_transfer_template.html new file mode 100644 index 000000000..e9c2fae76 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/sso_transfer_template.html @@ -0,0 +1,59 @@ + + + + + + + + Single Sign-On Session Transfer + + + + + +
+
+

MOA-ID Single Sign-On Session Transfer Service

+
+
+ + #if($errorMsg) +
+

$errorMsg

+
+ #end + + #if($successMsg) +
+

$successMsg

+
+ #end + + #if($QRImage) +
+ +
+ #end + +
+
+
+ +
+ + + \ No newline at end of file diff --git a/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java b/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java index cc5552e81..636a3ed03 100644 --- a/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java +++ b/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java @@ -17,7 +17,7 @@ import org.springframework.web.context.support.ServletContextResource; import org.springframework.web.servlet.DispatcherServlet; import at.gv.egiz.components.spring.api.SpringLoader; -import at.gv.egovernment.moa.id.util.MOAIDMessageProvider; +import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; import at.gv.egovernment.moa.logging.Logger; /** diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index ea4dd868b..7122c6577 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -43,7 +43,6 @@ import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.BKUException; import at.gv.egovernment.moa.id.auth.exception.BuildException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.ParseException; import at.gv.egovernment.moa.id.auth.exception.ServiceException; import at.gv.egovernment.moa.id.auth.exception.ValidateException; @@ -57,11 +56,13 @@ import at.gv.egovernment.moa.id.auth.validator.IdentityLinkValidator; import at.gv.egovernment.moa.id.auth.validator.VerifyXMLSignatureResponseValidator; import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils; import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWConstants; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +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.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.data.MISMandate; -import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.util.XMLUtil; import at.gv.egovernment.moa.logging.LogMsg; diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilder.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilder.java index f00f4386f..e51700111 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilder.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationBlockAssertionBuilder.java @@ -48,10 +48,10 @@ import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute; import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttributeImpl; import at.gv.egovernment.moa.id.auth.exception.BuildException; import at.gv.egovernment.moa.id.auth.exception.ParseException; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.config.TargetToSectorNameMapper; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; import at.gv.egovernment.moa.id.util.Random; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Constants; diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java index dc981ba33..18495381e 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java @@ -49,11 +49,11 @@ package at.gv.egovernment.moa.id.auth.builder; import java.io.IOException; import java.io.StringReader; import java.io.StringWriter; -import java.util.Map; import at.gv.egovernment.moa.id.auth.exception.BuildException; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.util.FormBuildUtils; +import at.gv.egovernment.moa.id.auth.frontend.utils.FormBuildUtils; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants; import at.gv.egovernment.moa.util.MiscUtil; /** @@ -165,31 +165,32 @@ public class GetIdentityLinkFormBuilder extends Builder { htmlForm = replaceTag(htmlForm, PUSHINFOBOX_TAG, pushInfobox, false, ALL); //new:wird oben mitreplaced htmlForm = replaceTag(htmlForm, BKU_TAG, bkuURL); - //removed in MOA-ID 2.0 -// htmlForm = replaceTag(htmlForm, CERTINFO_XMLREQUEST_TAG, encodeParameter(certInfoXMLRequest), true, ALL); -// htmlForm = replaceTag(htmlForm, CERTINFO_DATAURL_TAG, certInfoDataURL, true, ALL); + + //set applet-background coller + if (oaParam != null && MiscUtil.isNotEmpty(oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BACKGROUNDCOLOR))) + htmlForm = replaceTag(htmlForm, COLOR_TAG, + oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_BACKGROUNDCOLOR), false, ALL); + else + htmlForm = replaceTag(htmlForm, COLOR_TAG, FormBuildUtils.getDefaultMap().get(FormBuildUtils.PARAM_MAIN_BACKGROUNDCOLOR), false, ALL); + + //set redirect target + if (oaParam != null && MiscUtil.isNotEmpty(oaParam.getConfigurationValue(oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETREDIRECTTARGET)))) + htmlForm = replaceTag(htmlForm, REDIRECTTARGETTAG, + oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETREDIRECTTARGET), false, ALL); + else + htmlForm = replaceTag(htmlForm, REDIRECTTARGETTAG, FormBuildUtils.getDefaultMap().get(FormBuildUtils.PARAM_REDIRECTTARGET), false, ALL); - Map map = null; - - if (oaParam != null) { - map = oaParam.getFormCustomizaten(); - htmlForm = replaceTag(htmlForm, COLOR_TAG, map.get(FormBuildUtils.MAIN_BACKGROUNDCOLOR), false, ALL); - htmlForm = replaceTag(htmlForm, REDIRECTTARGETTAG, map.get(FormBuildUtils.REDIRECTTARGET), false, ALL); - - } else { - htmlForm = replaceTag(htmlForm, COLOR_TAG, FormBuildUtils.getDefaultMap().get(FormBuildUtils.MAIN_BACKGROUNDCOLOR), false, ALL); - htmlForm = replaceTag(htmlForm, REDIRECTTARGETTAG, FormBuildUtils.getDefaultMap().get(FormBuildUtils.REDIRECTTARGET), false, ALL); - } - - if (map != null && MiscUtil.isNotEmpty(map.get(FormBuildUtils.APPLET_HEIGHT))) - htmlForm = replaceTag(htmlForm, APPLETHEIGHT_TAG, map.get(FormBuildUtils.APPLET_HEIGHT), false, ALL); + //set applet heigh + if (oaParam != null && MiscUtil.isNotEmpty(oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETHEIGHT))) + htmlForm = replaceTag(htmlForm, APPLETHEIGHT_TAG, oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETHEIGHT), false, ALL); else if (MiscUtil.isNotEmpty(appletheigth)) htmlForm = replaceTag(htmlForm, APPLETHEIGHT_TAG, appletheigth, false, ALL); else htmlForm = replaceTag(htmlForm, APPLETHEIGHT_TAG, "160", false, ALL); - if (map != null && MiscUtil.isNotEmpty(map.get(FormBuildUtils.APPLET_WIDTH))) - htmlForm = replaceTag(htmlForm, APPLETWIDTH_TAG, map.get(FormBuildUtils.APPLET_WIDTH), false, ALL); + //set applet width + if (oaParam != null && MiscUtil.isNotEmpty(oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETWIDTH))) + htmlForm = replaceTag(htmlForm, APPLETWIDTH_TAG, oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETWIDTH), false, ALL); else if (MiscUtil.isNotEmpty(appletwidth)) htmlForm = replaceTag(htmlForm, APPLETWIDTH_TAG, appletwidth, false, ALL); else diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/DefaultCitizenCardAuthModuleImpl.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/DefaultCitizenCardAuthModuleImpl.java index cbdef7093..4f9936c94 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/DefaultCitizenCardAuthModuleImpl.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/DefaultCitizenCardAuthModuleImpl.java @@ -3,8 +3,8 @@ package at.gv.egovernment.moa.id.auth.modules.internal; import org.apache.commons.lang3.StringUtils; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.modules.AuthModule; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; import at.gv.egovernment.moa.id.process.api.ExecutionContext; /** diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java index aff6b1ca6..000a47438 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CertificateReadRequestTask.java @@ -1,6 +1,6 @@ package at.gv.egovernment.moa.id.auth.modules.internal.tasks; -import static at.gv.egovernment.moa.id.auth.MOAIDAuthConstants.REQ_VERIFY_CERTIFICATE; +import static at.gv.egovernment.moa.id.commons.MOAIDAuthConstants.REQ_VERIFY_CERTIFICATE; import java.io.IOException; @@ -14,9 +14,9 @@ import at.gv.egovernment.moa.id.auth.AuthenticationServer; import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder; import at.gv.egovernment.moa.id.auth.builder.InfoboxReadRequestBuilderCertificate; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.CitizenCardServletUtils; @@ -32,7 +32,7 @@ import at.gv.egovernment.moa.logging.Logger; * * Expects: *
    - *
  • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
  • + *
  • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
  • *
* Result: *
    diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java index cbaaa5ec7..e82aa8fbb 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java @@ -13,10 +13,10 @@ import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.advancedlogging.TransactionIDUtils; import at.gv.egovernment.moa.id.auth.AuthenticationServer; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.StringUtils; @@ -26,14 +26,14 @@ import at.gv.egovernment.moa.util.StringUtils; * In detail: *
      *
    • Renames the moa session id.
    • - *
    • Removes ExecutionContext property {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}.
    • + *
    • Removes ExecutionContext property {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}.
    • *
    • Creates the http form mentioned above.
    • *
    • Returns the http form via HttpServletResponse.
    • *
    * Expects: *
      - *
    • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID} or
    • - *
    • ExecutionContext property {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID} (in case of legacy authentication without CCE selection, where the moa session is not provided by request parameter).
    • + *
    • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID} or
    • + *
    • ExecutionContext property {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID} (in case of legacy authentication without CCE selection, where the moa session is not provided by request parameter).
    • *
    * Result: *
      diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetForeignIDTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetForeignIDTask.java index 204e39b8c..7cc9df30c 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetForeignIDTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetForeignIDTask.java @@ -1,7 +1,7 @@ package at.gv.egovernment.moa.id.auth.modules.internal.tasks; -import static at.gv.egovernment.moa.id.auth.MOAIDAuthConstants.PARAM_XMLRESPONSE; -import static at.gv.egovernment.moa.id.auth.MOAIDAuthConstants.REQ_VERIFY_AUTH_BLOCK; +import static at.gv.egovernment.moa.id.commons.MOAIDAuthConstants.PARAM_XMLRESPONSE; +import static at.gv.egovernment.moa.id.commons.MOAIDAuthConstants.REQ_VERIFY_AUTH_BLOCK; import java.io.ByteArrayInputStream; import java.io.IOException; @@ -22,7 +22,6 @@ import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.AuthenticationServer; import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse; import at.gv.egovernment.moa.id.auth.data.IdentityLink; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.ParseException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; @@ -31,6 +30,7 @@ import at.gv.egovernment.moa.id.auth.parser.CreateXMLSignatureResponseParser; import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser; import at.gv.egovernment.moa.id.client.SZRGWClientException; import at.gv.egovernment.moa.id.client.utils.SZRGWClientUtils; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; @@ -44,7 +44,7 @@ import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse; * In detail: *
        *
      • Renames the moa session id.
      • - *
      • Parses the CreateXMLSignatureResponse retrieved from POST parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}.
      • + *
      • Parses the CreateXMLSignatureResponse retrieved from POST parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}.
      • *
      • Extracts signature and signer certificate.
      • *
      • Send request to SZR Gateway in order to get an identity link.
      • *
      • Updates moa session (sets identity link, QAA level 4, authentication data and foreigner flag).
      • @@ -52,8 +52,8 @@ import at.gv.util.xsd.srzgw.CreateIdentityLinkResponse; *
      * Expects: *
        - *
      • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
      • - *
      • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE} containing a {@code CreateXMLSignatureResponse}.
      • + *
      • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
      • + *
      • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE} containing a {@code CreateXMLSignatureResponse}.
      • *
      * Result: *
        diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java index 0a1e3c8f5..c172c3b9c 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/GetMISSessionIDTask.java @@ -1,6 +1,6 @@ package at.gv.egovernment.moa.id.auth.modules.internal.tasks; -import static at.gv.egovernment.moa.id.auth.MOAIDAuthConstants.GET_MIS_SESSIONID; +import static at.gv.egovernment.moa.id.commons.MOAIDAuthConstants.GET_MIS_SESSIONID; import java.security.GeneralSecurityException; import java.util.List; @@ -18,10 +18,10 @@ import org.xml.sax.SAXException; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.AuthenticationServer; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; -import at.gv.egovernment.moa.id.config.ConnectionParameter; +import at.gv.egovernment.moa.id.commons.api.ConnectionParameterInterface; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.data.MISMandate; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.SSLUtils; @@ -42,7 +42,7 @@ import iaik.pki.PKIException; *
      * Expects: *
        - *
      • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
      • + *
      • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
      • *
      * Result: *
        @@ -72,7 +72,7 @@ public class GetMISSessionIDTask extends AbstractAuthServletTask { String misSessionID = moasession.getMISSessionID(); //get mandates from MIS - ConnectionParameter connectionParameters = authConfig + ConnectionParameterInterface connectionParameters = authConfig .getOnlineMandatesConnectionParameter(); SSLSocketFactory sslFactory = SSLUtils.getSSLSocketFactory( authConfig, diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/InitializeBKUAuthenticationTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/InitializeBKUAuthenticationTask.java index b1b87f68d..d3d736a9c 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/InitializeBKUAuthenticationTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/InitializeBKUAuthenticationTask.java @@ -31,15 +31,15 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.parser.StartAuthentificationParameterParser; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.FileUtils; diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java index b9a8fecf6..ed49201b8 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareAuthBlockSignatureTask.java @@ -8,9 +8,9 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.auth.AuthenticationServer; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.CitizenCardServletUtils; import at.gv.egovernment.moa.logging.Logger; @@ -25,7 +25,7 @@ import at.gv.egovernment.moa.logging.Logger; *
      * Expects: *
        - *
      • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
      • + *
      • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
      • *
      * Result: *
        diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareGetMISMandateTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareGetMISMandateTask.java index f976c0b49..afbb87f10 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareGetMISMandateTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/PrepareGetMISMandateTask.java @@ -22,7 +22,7 @@ */ package at.gv.egovernment.moa.id.auth.modules.internal.tasks; -import static at.gv.egovernment.moa.id.auth.MOAIDAuthConstants.GET_MIS_SESSIONID; +import static at.gv.egovernment.moa.id.commons.MOAIDAuthConstants.GET_MIS_SESSIONID; import java.util.List; @@ -39,12 +39,12 @@ import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.BuildException; import at.gv.egovernment.moa.id.auth.exception.MISSimpleClientException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.commons.api.ConnectionParameterInterface; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; -import at.gv.egovernment.moa.id.config.ConnectionParameter; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.SSLUtils; import at.gv.egovernment.moa.id.util.client.mis.simple.MISSessionId; @@ -72,7 +72,7 @@ public class PrepareGetMISMandateTask extends AbstractAuthServletTask { //perform default task initialization defaultTaskInitialization(request, executionContext); - ConnectionParameter connectionParameters = authConfig.getOnlineMandatesConnectionParameter(); + ConnectionParameterInterface connectionParameters = authConfig.getOnlineMandatesConnectionParameter(); SSLSocketFactory sslFactory = SSLUtils.getSSLSocketFactory(authConfig, connectionParameters); // get identitity link as byte[] diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java index b52778577..516e9501b 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyAuthenticationBlockTask.java @@ -1,6 +1,6 @@ package at.gv.egovernment.moa.id.auth.modules.internal.tasks; -import static at.gv.egovernment.moa.id.auth.MOAIDAuthConstants.PARAM_XMLRESPONSE; +import static at.gv.egovernment.moa.id.commons.MOAIDAuthConstants.PARAM_XMLRESPONSE; import java.io.IOException; import java.util.Map; @@ -15,10 +15,10 @@ import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.AuthenticationServer; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.ParamValidatorUtils; import at.gv.egovernment.moa.logging.Logger; @@ -28,15 +28,15 @@ import at.gv.egovernment.moa.logging.Logger; * In detail: *
          *
        • Renames the moa session id.
        • - *
        • Takes the {@code CreateXMLSignatureResponse} from POST parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}.
        • + *
        • Takes the {@code CreateXMLSignatureResponse} from POST parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}.
        • *
        • Verifies the {@code CreateXMLSignatureResponse}.
        • *
        • Updates moa session.
        • *
        • Redirects back to {@code /dispatcher} in order to finalize the authentication.
        • *
        * Expects: *
          - *
        • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
        • - *
        • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE} containing a {@code CreateXMLSignatureResponse}.
        • + *
        • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
        • + *
        • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE} containing a {@code CreateXMLSignatureResponse}.
        • *
        * Result: *
          diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java index cd444f7c8..df158a7ec 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyCertificateTask.java @@ -1,6 +1,6 @@ package at.gv.egovernment.moa.id.auth.modules.internal.tasks; -import static at.gv.egovernment.moa.id.auth.MOAIDAuthConstants.REQ_GET_FOREIGN_ID; +import static at.gv.egovernment.moa.id.commons.MOAIDAuthConstants.REQ_GET_FOREIGN_ID; import java.io.IOException; import java.util.Map; @@ -17,9 +17,9 @@ import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.AuthenticationServer; import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.CitizenCardServletUtils; @@ -28,11 +28,11 @@ import at.gv.egovernment.moa.spss.util.CertificateUtils; import iaik.x509.X509Certificate; /** - * Parses the certificate from {@code InfoBoxReadResponse} (via POST parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}), creates the auth block to be signed and returns a {@code CreateXMLSignatureRequest} for auth block signature.

          + * Parses the certificate from {@code InfoBoxReadResponse} (via POST parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}), creates the auth block to be signed and returns a {@code CreateXMLSignatureRequest} for auth block signature.

          * In detail: *

            *
          • Renames the moa session id.
          • - *
          • Retrieves the certificate via {@code InfoBoxReadResponse} from POST parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}.
          • + *
          • Retrieves the certificate via {@code InfoBoxReadResponse} from POST parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}.
          • *
          • Verifies the certificate.
          • *
          • Creates the auth block to be signed using information from the certificate (Organwalter, foreign citizen.
          • *
          • Puts it in a {@code CreateXMLSignatureRequest}.
          • @@ -41,8 +41,8 @@ import iaik.x509.X509Certificate; *
          * Expects: *
            - *
          • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
          • - *
          • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_SESSIONID} containing a {@code InfoBoxReadResponse}.
          • + *
          • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
          • + *
          • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_SESSIONID} containing a {@code InfoBoxReadResponse}.
          • *
          * Result: *
            diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java index 23e92c0c0..0deda4d43 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/VerifyIdentityLinkTask.java @@ -12,10 +12,10 @@ import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.AuthenticationServer; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.ParseException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.logging.Logger; @@ -24,15 +24,15 @@ import at.gv.egovernment.moa.logging.Logger; * In detail: *
              *
            • Renames the moa session id.
            • - *
            • Parses the identity link retrieved as {@code InfoBoxReadResponse} from POST parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}.
            • + *
            • Parses the identity link retrieved as {@code InfoBoxReadResponse} from POST parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE}.
            • *
            • Verifies the identity link.
            • *
            • Updates moa session.
            • *
            • Puts boolean flag {@code identityLinkAvailable} into {@code ExecutionContext}.
            • *
            * Expects: *
              - *
            • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
            • - *
            • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.auth.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE} containing a {@code InfoBoxReadResponse}.
            • + *
            • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_SESSIONID PARAM_SESSIONID}
            • + *
            • HttpServletRequest parameter {@linkplain at.gv.egovernment.moa.id.commons.MOAIDAuthConstants#PARAM_XMLRESPONSE PARAM_XMLRESPONSE} containing a {@code InfoBoxReadResponse}.
            • *
            * Result: *
              diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java index 5e0a69fd4..4b0e7b869 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/CreateXMLSignatureResponseValidator.java @@ -56,7 +56,6 @@ import javax.xml.bind.DatatypeConverter; import org.jaxen.SimpleNamespaceContext; import org.w3c.dom.Element; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.builder.AuthenticationBlockAssertionBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.data.CreateXMLSignatureResponse; @@ -64,11 +63,12 @@ import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute; import at.gv.egovernment.moa.id.auth.data.IdentityLink; import at.gv.egovernment.moa.id.auth.data.SAMLAttribute; import at.gv.egovernment.moa.id.auth.exception.ValidateException; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +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.config.TargetToSectorNameMapper; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Constants; import at.gv.egovernment.moa.util.MiscUtil; diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java index ac528c89d..df101f5b7 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/VerifyXMLSignatureResponseValidator.java @@ -61,14 +61,14 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.data.IdentityLink; import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse; import at.gv.egovernment.moa.id.auth.exception.ValidateException; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +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; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.util.MOAIDMessageProvider; import at.gv.egovernment.moa.logging.Logger; /** diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepUtils.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepUtils.java index 1850ff671..55562176d 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepUtils.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/validator/parep/ParepUtils.java @@ -69,7 +69,7 @@ import at.gv.egovernment.moa.id.auth.exception.ParseException; import at.gv.egovernment.moa.id.auth.exception.ValidateException; import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWClientException; import at.gv.egovernment.moa.id.auth.validator.parep.client.szrgw.SZRGWConstants; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.BoolUtils; import at.gv.egovernment.moa.util.Constants; diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/util/CitizenCardServletUtils.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/util/CitizenCardServletUtils.java index 36bab9355..2a8d26566 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/util/CitizenCardServletUtils.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/util/CitizenCardServletUtils.java @@ -55,11 +55,11 @@ import java.net.URLEncoder; import javax.servlet.http.HttpServletResponse; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.logging.Logger; /** diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/MOAIDCertificateManagerConfigurationImpl.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/MOAIDCertificateManagerConfigurationImpl.java index 9b634ff4d..1759a7281 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/MOAIDCertificateManagerConfigurationImpl.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/MOAIDCertificateManagerConfigurationImpl.java @@ -54,7 +54,7 @@ public class MOAIDCertificateManagerConfigurationImpl extends try { initalizeConfiguration(); - } catch (at.gv.egovernment.moa.id.config.ConfigurationException e) { + } catch (at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException e) { Logger.error("eIDAS SAML-engine initialization FAILED", e); } @@ -89,7 +89,7 @@ public class MOAIDCertificateManagerConfigurationImpl extends try { initalizeConfiguration(); - } catch (at.gv.egovernment.moa.id.config.ConfigurationException e) { + } catch (at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException e) { Logger.error("eIDAS SAML-engine initialization FAILED", e); } @@ -103,10 +103,10 @@ public class MOAIDCertificateManagerConfigurationImpl extends /** * Initialize eIDAS SAML-engine from MOA-ID configuration - * @throws at.gv.egovernment.moa.id.config.ConfigurationException + * @throws at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException * */ - private void initalizeConfiguration() throws at.gv.egovernment.moa.id.config.ConfigurationException { + private void initalizeConfiguration() throws at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException { //initialize configuration MOAeIDASSAMLEngineConfigurationImpl tmp = new MOAeIDASSAMLEngineConfigurationImpl(); tmp.initialize(); diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/MOAeIDASSAMLEngineConfigurationImpl.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/MOAeIDASSAMLEngineConfigurationImpl.java index 584910ea5..5d1874157 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/MOAeIDASSAMLEngineConfigurationImpl.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/MOAeIDASSAMLEngineConfigurationImpl.java @@ -37,7 +37,7 @@ import java.util.Properties; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.EIDASEngineConfigurationException; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.FileUtils; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java index bdd8c8e72..1ba344fd1 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/config/ModifiedEncryptionSW.java @@ -1,7 +1,7 @@ package at.gv.egovernment.moa.id.auth.modules.eidas.config; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.logging.Logger; import eu.eidas.auth.engine.core.impl.EncryptionSW; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java index 55504dcb0..d0454688a 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java @@ -26,9 +26,9 @@ import org.opensaml.saml2.metadata.provider.ObservableMetadataProvider; import org.opensaml.xml.XMLObject; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.commons.ex.MOAHttpProtocolSocketFactoryException; import at.gv.egovernment.moa.id.commons.utils.MOAHttpProtocolSocketFactory; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.id.config.auth.IGarbageCollectorProcessing; import at.gv.egovernment.moa.id.config.auth.MOAGarbageCollector; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/EIDASEngineConfigurationException.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/EIDASEngineConfigurationException.java index 98bc559d2..20f18b772 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/EIDASEngineConfigurationException.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/EIDASEngineConfigurationException.java @@ -22,7 +22,7 @@ */ package at.gv.egovernment.moa.id.auth.modules.eidas.exceptions; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; /** * @author tlenz diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CreateIdentityLinkTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CreateIdentityLinkTask.java index 515ce2913..7a696cd2f 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CreateIdentityLinkTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CreateIdentityLinkTask.java @@ -39,12 +39,12 @@ import org.xml.sax.SAXException; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionStorageConstants; import at.gv.egovernment.moa.id.auth.data.IdentityLink; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASAttributeException; import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.IdentityLinkReSigner; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java index 2156720e8..6de446e01 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java @@ -36,19 +36,19 @@ import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.springframework.stereotype.Component; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.frontend.velocity.VelocityProvider; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.EIDASEngineException; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.config.stork.CPEPS; -import at.gv.egovernment.moa.id.config.stork.StorkAttribute; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.data.CPEPS; +import at.gv.egovernment.moa.id.commons.api.data.StorkAttribute; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; -import at.gv.egovernment.moa.id.util.VelocityProvider; import at.gv.egovernment.moa.logging.Logger; import eu.eidas.auth.commons.EIDASAuthnRequest; import eu.eidas.auth.commons.EIDASUtil; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java index 9858d6004..082fdbbbf 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java @@ -6,13 +6,13 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionStorageConstants; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.EIDASEngineException; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.MOAPersonalAttributeList; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java index 1e3b0f507..83fadb04e 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java @@ -32,13 +32,12 @@ import org.springframework.web.bind.annotation.RequestMethod; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.MOAPersonalAttributeList; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils; -import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.moduls.RequestImpl; import at.gv.egovernment.moa.id.protocols.AbstractAuthProtocolModulController; import at.gv.egovernment.moa.logging.Logger; @@ -167,7 +166,7 @@ public class EIDASProtocol extends AbstractAuthProtocolModulController { pendingReq.setOAURL(samlReq.getIssuer()); // - memorize OA config - OAAuthParameter oaConfig = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(pendingReq.getOAURL()); + IOAAuthParameters oaConfig = authConfig.getOnlineApplicationParameter(pendingReq.getOAURL()); if (oaConfig == null) throw new AuthenticationException("stork.12", new Object[]{pendingReq.getOAURL()}); pendingReq.setOnlineApplicationConfiguration(oaConfig); diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java index 4e34902e2..55f4f44d4 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java @@ -23,14 +23,14 @@ import org.slf4j.Logger; import org.springframework.http.MediaType; import org.springframework.stereotype.Service; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.EIDASEngineException; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.SLOInformationInterface; import at.gv.egovernment.moa.id.moduls.IAction; -import at.gv.egovernment.moa.id.moduls.IRequest; import eu.eidas.auth.engine.EIDASSAMLEngine; import eu.eidas.auth.engine.metadata.MetadataConfigParams; import eu.eidas.auth.engine.metadata.MetadataGenerator; diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java index 5f3f89aee..4ab587159 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java @@ -37,17 +37,17 @@ import org.springframework.http.MediaType; import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.frontend.velocity.VelocityProvider; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDASChainingMetadataProvider; import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDASMetadataProviderDecorator; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.MOAPersonalAttributeList; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.SLOInformationInterface; import at.gv.egovernment.moa.id.moduls.IAction; -import at.gv.egovernment.moa.id.moduls.IRequest; -import at.gv.egovernment.moa.id.util.VelocityProvider; import at.gv.egovernment.moa.logging.Logger; import eu.eidas.auth.commons.EIDASAuthnResponse; import eu.eidas.auth.commons.EIDASStatusCode; diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesMetadataConfiguration.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesMetadataConfiguration.java index a64fc8bf7..22cb22c6d 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesMetadataConfiguration.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesMetadataConfiguration.java @@ -35,7 +35,7 @@ import org.opensaml.xml.security.credential.Credential; import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; import at.gv.egovernment.moa.id.auth.modules.elgamandates.utils.ELGAMandatesCredentialProvider; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.data.Pair; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.PVPAttributeBuilder; import at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration; diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java index 3fa43d0a3..29bc5ee12 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java @@ -36,7 +36,7 @@ import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConsta import at.gv.egovernment.moa.id.auth.modules.elgamandates.config.ELGAMandatesMetadataConfiguration; import at.gv.egovernment.moa.id.auth.modules.elgamandates.utils.ELGAMandatesCredentialProvider; import at.gv.egovernment.moa.id.auth.servlet.AbstractController; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.PVPMetadataBuilder; import at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration; import at.gv.egovernment.moa.id.util.HTTPUtils; diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/exceptions/ELGAMetadataException.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/exceptions/ELGAMetadataException.java index 6b7c13804..d27353809 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/exceptions/ELGAMetadataException.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/exceptions/ELGAMetadataException.java @@ -22,7 +22,7 @@ */ package at.gv.egovernment.moa.id.auth.modules.elgamandates.exceptions; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; /** * @author tlenz diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ELGAInitializeBKUAuthenticationTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ELGAInitializeBKUAuthenticationTask.java index 03711aa40..fb9628909 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ELGAInitializeBKUAuthenticationTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ELGAInitializeBKUAuthenticationTask.java @@ -29,11 +29,11 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Component; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; import at.gv.egovernment.moa.id.auth.modules.internal.tasks.InitializeBKUAuthenticationTask; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.commons.utils.KeyValueUtils; import at.gv.egovernment.moa.id.process.api.ExecutionContext; diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java index d25921167..26fd5fe5b 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java @@ -36,7 +36,6 @@ import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.builder.BPKBuilder; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; @@ -44,7 +43,8 @@ import at.gv.egovernment.moa.id.auth.modules.elgamandates.config.ELGAMandatesReq import at.gv.egovernment.moa.id.auth.modules.elgamandates.exceptions.ELGAMetadataException; import at.gv.egovernment.moa.id.auth.modules.elgamandates.utils.ELGAMandateServiceMetadataProvider; import at.gv.egovernment.moa.id.auth.modules.elgamandates.utils.ELGAMandatesCredentialProvider; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPTargetConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.PVPAuthnRequestBuilder; diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateServiceMetadataProvider.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateServiceMetadataProvider.java index 49f131983..1c564b20d 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateServiceMetadataProvider.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateServiceMetadataProvider.java @@ -37,7 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.metadata.SimpleMOAMetadataProvider; import at.gv.egovernment.moa.id.protocols.pvp2x.verification.metadata.MOASPMetadataSignatureFilter; import at.gv.egovernment.moa.id.protocols.pvp2x.verification.metadata.SchemaValidationFilter; diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandatesCredentialProvider.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandatesCredentialProvider.java index c6434b901..f5bcdb70b 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandatesCredentialProvider.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandatesCredentialProvider.java @@ -26,7 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.signer.AbstractCredentialProvider; import at.gv.egovernment.moa.util.FileUtils; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java index e2ac97535..9060f35c5 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/OAuth20Configuration.java @@ -24,7 +24,7 @@ package at.gv.egovernment.moa.id.protocols.oauth20; import java.util.Properties; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.util.FileUtils; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java index 21fe4e5fa..9b19e0a4d 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OAuth20AttributeBuilder.java @@ -31,7 +31,7 @@ import com.google.gson.JsonObject; import com.google.gson.JsonPrimitive; import at.gv.egovernment.moa.id.auth.stork.STORKConstants; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.Pair; import at.gv.egovernment.moa.id.protocols.builder.attributes.BPKAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdAudiencesAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdAudiencesAttribute.java index e81132ca7..a43c8fce9 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdAudiencesAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdAudiencesAttribute.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdAuthenticationTimeAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdAuthenticationTimeAttribute.java index c4260db82..c6775b692 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdAuthenticationTimeAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdAuthenticationTimeAttribute.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdExpirationTimeAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdExpirationTimeAttribute.java index 6008eede1..5f32e32a2 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdExpirationTimeAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdExpirationTimeAttribute.java @@ -24,7 +24,7 @@ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; import java.util.Date; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdIssueInstantAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdIssueInstantAttribute.java index ad7fe68b9..04f38faf6 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdIssueInstantAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdIssueInstantAttribute.java @@ -24,7 +24,7 @@ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; import java.util.Date; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdIssuerAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdIssuerAttribute.java index 5c4fe02df..ff19a618a 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdIssuerAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdIssuerAttribute.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdNonceAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdNonceAttribute.java index d08a3b4f0..eda276df2 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdNonceAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdNonceAttribute.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeGenerator; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdSubjectIdentifierAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdSubjectIdentifierAttribute.java index 10af9cc32..7de90e98e 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdSubjectIdentifierAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/OpenIdSubjectIdentifierAttribute.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileDateOfBirthAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileDateOfBirthAttribute.java index 4262d6bb3..3ebadba52 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileDateOfBirthAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileDateOfBirthAttribute.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileFamilyNameAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileFamilyNameAttribute.java index da4f76e2d..89209b062 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileFamilyNameAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileFamilyNameAttribute.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileGivenNameAttribute.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileGivenNameAttribute.java index 04a6ec60b..895037b2e 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileGivenNameAttribute.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/attributes/ProfileGivenNameAttribute.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.attributes; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/exceptions/OAuth20Exception.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/exceptions/OAuth20Exception.java index 307615fbd..d7fecd1b5 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/exceptions/OAuth20Exception.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/exceptions/OAuth20Exception.java @@ -22,7 +22,7 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.exceptions; -import at.gv.egovernment.moa.id.util.MOAIDMessageProvider; +import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; public class OAuth20Exception extends RuntimeException { diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthAction.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthAction.java index 518a694b0..803ae388f 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthAction.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthAction.java @@ -35,14 +35,14 @@ import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.Pair; import at.gv.egovernment.moa.id.data.SLOInformationImpl; import at.gv.egovernment.moa.id.data.SLOInformationInterface; import at.gv.egovernment.moa.id.moduls.IAction; -import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Constants; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20SessionObject; import at.gv.egovernment.moa.id.protocols.oauth20.attributes.OAuth20AttributeBuilder; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java index 055d14ef3..98fcdc8dc 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20AuthRequest.java @@ -32,10 +32,10 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants; -import at.gv.egovernment.moa.id.config.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Constants; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Util; @@ -187,7 +187,7 @@ public class OAuth20AuthRequest extends OAuth20BaseRequest { // check if client id and redirect uri are ok try { // OAOAUTH20 cannot be null at this point. check was done in base request - OAAuthParameter oAuthConfig = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(this.getOAURL()); + IOAAuthParameters oAuthConfig = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(this.getOAURL()); if (!this.getClientID().equals(oAuthConfig.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_OPENID_CLIENTID)) diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java index 4eae5ac3b..88669bd90 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java @@ -31,10 +31,10 @@ import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringEscapeUtils; import org.apache.commons.lang.StringUtils; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants; -import at.gv.egovernment.moa.id.config.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.moduls.RequestImpl; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Constants; import at.gv.egovernment.moa.id.protocols.oauth20.exceptions.OAuth20Exception; @@ -71,7 +71,7 @@ abstract class OAuth20BaseRequest extends RequestImpl { throw new OAuth20WrongParameterException(OAuth20Constants.PARAM_CLIENT_ID); } this.setOAURL(oaURL); - OAAuthParameter oaParam = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(oaURL); + IOAAuthParameters oaParam = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(oaURL); if (oaParam == null) { throw new OAuth20WrongParameterException(OAuth20Constants.PARAM_CLIENT_ID); diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java index b29d33a8d..2f8c43e23 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java @@ -19,9 +19,9 @@ import com.google.gson.JsonObject; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.exception.InvalidProtocolRequestException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.ProtocolNotActiveException; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.moduls.RequestImpl; import at.gv.egovernment.moa.id.protocols.AbstractAuthProtocolModulController; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Constants; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java index bb0126a7b..9d78418cd 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenAction.java @@ -33,12 +33,12 @@ import com.google.gson.JsonObject; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.SLOInformationInterface; import at.gv.egovernment.moa.id.moduls.IAction; -import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20SessionObject; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Util; import at.gv.egovernment.moa.id.protocols.oauth20.exceptions.OAuth20ServerErrorException; diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java index 75fbb4120..f35de9c58 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20TokenRequest.java @@ -30,10 +30,10 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.commons.config.MOAIDConfigurationConstants; -import at.gv.egovernment.moa.id.config.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.protocols.oauth20.OAuth20Constants; import at.gv.egovernment.moa.id.protocols.oauth20.exceptions.OAuth20AccessDeniedException; import at.gv.egovernment.moa.id.protocols.oauth20.exceptions.OAuth20Exception; @@ -140,7 +140,7 @@ class OAuth20TokenRequest extends OAuth20BaseRequest { // check if client id and secret are ok try { // OAOAUTH20 cannot be null at this point. check was done in base request - OAAuthParameter oaParam = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(this.getOAURL()); + IOAAuthParameters oaParam = AuthConfigurationProviderFactory.getInstance().getOnlineApplicationParameter(this.getOAURL()); if (!this.getClientID().equals(oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_PROTOCOLS_OPENID_CLIENTID))) { throw new OAuth20AccessDeniedException(); diff --git a/id/server/modules/moa-id-module-ssoTransfer/pom.xml b/id/server/modules/moa-id-module-ssoTransfer/pom.xml index 8207fc502..b15d7dc85 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/pom.xml +++ b/id/server/modules/moa-id-module-ssoTransfer/pom.xml @@ -46,6 +46,11 @@ 1.52 + + MOA.id.server + moa-id-frontend-resources + + \ No newline at end of file diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferAuthenticationData.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferAuthenticationData.java index 103a03063..f9cb4c636 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferAuthenticationData.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferAuthenticationData.java @@ -28,11 +28,11 @@ import java.util.List; import org.w3c.dom.Element; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.data.IdentityLink; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.data.AuthenticationRole; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.MISMandate; diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferOnlineApplication.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferOnlineApplication.java index 4ba2e1a01..af180ff10 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferOnlineApplication.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferOnlineApplication.java @@ -27,11 +27,11 @@ import java.util.Collection; import java.util.List; import java.util.Map; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.config.auth.data.SAML1ConfigurationParameters; -import at.gv.egovernment.moa.id.config.stork.CPEPS; -import at.gv.egovernment.moa.id.config.stork.StorkAttribute; -import at.gv.egovernment.moa.id.config.stork.StorkAttributeProviderPlugin; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.data.CPEPS; +import at.gv.egovernment.moa.id.commons.api.data.SAML1ConfigurationParameters; +import at.gv.egovernment.moa.id.commons.api.data.StorkAttribute; +import at.gv.egovernment.moa.id.commons.api.data.StorkAttributeProviderPlugin; /** * @author tlenz @@ -261,15 +261,6 @@ public class SSOTransferOnlineApplication implements IOAAuthParameters { return false; } - /* (non-Javadoc) - * @see at.gv.egovernment.moa.id.config.auth.IOAAuthParameters#getFormCustomizaten() - */ - @Override - public Map getFormCustomizaten() { - // TODO Auto-generated method stub - return null; - } - /* (non-Javadoc) * @see at.gv.egovernment.moa.id.config.auth.IOAAuthParameters#getQaaLevel() */ diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java index 48ef5b526..2bb31f700 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java @@ -56,7 +56,6 @@ import javax.security.cert.X509Certificate; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.velocity.VelocityContext; import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.asn1.x509.BasicConstraints; import org.bouncycastle.asn1.x509.Extension; @@ -80,17 +79,18 @@ import com.google.gson.JsonParser; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.ParseException; -import at.gv.egovernment.moa.id.auth.exception.SessionDataStorageException; +import at.gv.egovernment.moa.id.auth.frontend.builder.DefaultGUIFormBuilderConfiguration; +import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.SSOTransferConstants; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.Pair; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.SSOTransferContainer; -import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.GUIUtils; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.SSOContainerUtils; import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; +import at.gv.egovernment.moa.id.commons.api.exceptions.SessionDataStorageException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.id.moduls.SSOManager; import at.gv.egovernment.moa.id.protocols.pvp2x.signer.CredentialsNotAvailableException; @@ -124,6 +124,7 @@ public class SSOTransferServlet{ @Autowired ITransactionStorage transactionStorage; @Autowired IDPCredentialProvider idpCredentials; @Autowired AuthConfiguration authConfig; + @Autowired IGUIFormBuilder guiBuilder; public SSOTransferServlet() { super(); @@ -145,8 +146,6 @@ public class SSOTransferServlet{ method = {RequestMethod.GET}) public void testTransferSSOSessionGUIWithoutAuthentication(HttpServletRequest req, HttpServletResponse resp) throws IOException { try { - VelocityContext context = new VelocityContext(); - //create first step of SSO Transfer GUI String authURL = HTTPUtils.extractAuthURLFromRequest(req); if (!AuthConfigurationProviderFactory.getInstance().getPublicURLPrefix().contains(authURL)) { @@ -155,8 +154,13 @@ public class SSOTransferServlet{ } + DefaultGUIFormBuilderConfiguration config = new DefaultGUIFormBuilderConfiguration( + authURL, + DefaultGUIFormBuilderConfiguration.VIEW_SSO_SESSION_TRANSFER, + null); + internalCreateQRCodeForTransfer(resp, authURL, - "123456", "/TestTransmitSSOSession", context); + "123456", "/TestTransmitSSOSession", config); } catch (MOAIDException | MOADatabaseException e) { e.printStackTrace(); @@ -388,28 +392,32 @@ public class SSOTransferServlet{ //search SSO session String ssoid = ssomanager.getSSOSessionID(req); - VelocityContext context = new VelocityContext(); - try { + String authURL = HTTPUtils.extractAuthURLFromRequest(req); + if (!AuthConfigurationProviderFactory.getInstance().getPublicURLPrefix(). + contains(authURL)) { + Logger.warn("Requested URL is not allowed.");; + resp.sendError(500, "Requested URL is not allowed."); + + } + + DefaultGUIFormBuilderConfiguration config = new DefaultGUIFormBuilderConfiguration( + authURL, + DefaultGUIFormBuilderConfiguration.VIEW_SSO_SESSION_TRANSFER, + null); + if (ssomanager.isValidSSOSession(ssoid, null)) { //Object createQRObj = req.getParameter(SSOTransferConstants.REQ_PARAM_GENERATE_QR); //create first step of SSO Transfer GUI - String authURL = HTTPUtils.extractAuthURLFromRequest(req); - if (!AuthConfigurationProviderFactory.getInstance().getPublicURLPrefix(). - contains(authURL)) { - Logger.warn("Requested URL is not allowed.");; - resp.sendError(500, "Requested URL is not allowed."); - - } - + String moaSessionID = authenticationSessionStorage.getMOASessionSSOID(ssoid); if (MiscUtil.isNotEmpty(moaSessionID)) { AuthenticationSession authSession = authenticationSessionStorage.getSession(moaSessionID); if(authSession != null) { internalCreateQRCodeForTransfer(resp, authURL, authSession.getSessionID(), - SSOTransferConstants.SERVLET_SSOTRANSFER_TO_SMARTPHONE, context); + SSOTransferConstants.SERVLET_SSOTRANSFER_TO_SMARTPHONE, config); return; } @@ -417,9 +425,10 @@ public class SSOTransferServlet{ } - context.put("errorMsg", + config.putCustomParameter("errorMsg", "No active Single Sign-On session found! SSO Session transfer is not possible."); - GUIUtils.printSSOTransferGUI(context, resp); + + guiBuilder.build(resp, config, "SSO-Transfer-Module"); } catch (MOAIDException | MOADatabaseException e) { e.printStackTrace(); @@ -505,7 +514,7 @@ public class SSOTransferServlet{ } private void internalCreateQRCodeForTransfer(HttpServletResponse resp, String authURL, - String moaSessionID, String servletEndPoint, VelocityContext context) throws Exception { + String moaSessionID, String servletEndPoint, DefaultGUIFormBuilderConfiguration config) throws Exception { SSOTransferContainer container = new SSOTransferContainer(); String token = Random.nextRandom(); @@ -558,12 +567,12 @@ public class SSOTransferServlet{ ByteArrayOutputStream qrStream = QRCode.from(qrResult.toString()).to(ImageType.GIF).withSize(350, 350).stream(); String base64EncodedImage = Base64Utils.encode(qrStream.toByteArray()); - context.put("QRImage", base64EncodedImage); + config.putCustomParameter("QRImage", base64EncodedImage); - context.put("successMsg", "Scan the QR-Code with your SSO-Transfer App to start the transfer operation."); + config.putCustomParameter("successMsg", "Scan the QR-Code with your SSO-Transfer App to start the transfer operation."); - GUIUtils.printSSOTransferGUI(context, resp); - + + guiBuilder.build(resp, config, "SSO-Session Transfer-Module"); } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferSignalServlet.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferSignalServlet.java index 0b3bd892a..cd18afb71 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferSignalServlet.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferSignalServlet.java @@ -33,9 +33,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import at.gv.egovernment.moa.id.advancedlogging.TransactionIDUtils; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.servlet.AbstractProcessEngineSignalController; -import at.gv.egovernment.moa.id.moduls.IRequest; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.logging.Logger; /** diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/InitializeRestoreSSOSessionTask.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/InitializeRestoreSSOSessionTask.java index e84c60ec5..e3c8efb50 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/InitializeRestoreSSOSessionTask.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/InitializeRestoreSSOSessionTask.java @@ -25,14 +25,14 @@ package at.gv.egovernment.moa.id.auth.modules.ssotransfer.task; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.velocity.VelocityContext; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; +import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.GUIUtils; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.HTTPUtils; @@ -45,6 +45,8 @@ import at.gv.egovernment.moa.logging.Logger; @Component("InitializeRestoreSSOSessionTask") public class InitializeRestoreSSOSessionTask extends AbstractAuthServletTask { + @Autowired IGUIFormBuilder guiBuilder; + /* (non-Javadoc) * @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv.egovernment.moa.id.process.api.ExecutionContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) */ @@ -63,11 +65,10 @@ public class InitializeRestoreSSOSessionTask extends AbstractAuthServletTask { } - VelocityContext context = GUIUtils.buildSSOTransferGUI(authURL, pendingReq.getRequestID()); - GUIUtils.printSSOTransferGUI(context, response); + GUIUtils.buildSSOTransferGUI(guiBuilder, response, authURL, pendingReq.getRequestID()); - } catch (WrongParametersException | AuthenticationException e) { + } catch (MOAIDException e) { throw new TaskExecutionException(pendingReq, e.getMessage(), e); } catch (Exception e) { diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java index d52e03c09..526f45be3 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java @@ -38,12 +38,13 @@ import org.springframework.stereotype.Component; import com.google.gson.JsonObject; import com.google.gson.JsonParser; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.SSOTransferConstants; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.GUIUtils; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.SSOContainerUtils; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.id.process.api.ExecutionContext; @@ -60,6 +61,7 @@ import at.gv.egovernment.moa.util.MiscUtil; public class RestoreSSOSessionTask extends AbstractAuthServletTask { @Autowired SSOContainerUtils ssoTransferUtils; + @Autowired IGUIFormBuilder guiBuilder; /* (non-Javadoc) * @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv.egovernment.moa.id.process.api.ExecutionContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @@ -180,8 +182,8 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { } - context = GUIUtils.buildSSOTransferGUI(authURL, pendingReq.getRequestID()); - GUIUtils.printSSOTransferGUI(context, response); + GUIUtils.buildSSOTransferGUI(guiBuilder, response, + authURL, pendingReq.getRequestID()); } catch (IOException | MOAIDException e) { throw new TaskExecutionException(pendingReq, e.getMessage(), e); diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java index ee7a397aa..b1446c4d2 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java @@ -22,29 +22,19 @@ */ package at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils; -import java.io.BufferedReader; import java.io.ByteArrayOutputStream; -import java.io.File; -import java.io.FileInputStream; import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.StringWriter; -import java.net.URI; import javax.servlet.http.HttpServletResponse; -import org.apache.velocity.VelocityContext; -import org.apache.velocity.app.VelocityEngine; - import com.google.gson.JsonObject; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.frontend.builder.DefaultGUIFormBuilderConfiguration; +import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; +import at.gv.egovernment.moa.id.auth.frontend.exception.GUIBuildException; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.SSOTransferConstants; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.util.VelocityProvider; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Base64Utils; import net.glxn.qrgen.QRCode; @@ -54,95 +44,43 @@ import net.glxn.qrgen.image.ImageType; * @author tlenz * */ -public class GUIUtils { - private static final String HTMLTEMPLATESDIR = "htmlTemplates/"; - private static final String GUI_HTML_TEMPLATE = "sso_transfer_template.html"; - +public class GUIUtils { public static final int REFESH_TIMEOUT = 5 * 1000; //5 sec - public static VelocityContext buildSSOTransferGUI(String authURL, String pendingReqID) throws ConfigurationException, IOException { - String containerURL = authURL - + SSOTransferConstants.SERVLET_SSOTRANSFER_FROM_SMARTPHONE - + "?" + MOAIDAuthConstants.PARAM_TARGET_PENDINGREQUESTID + "=" + pendingReqID; + public static void buildSSOTransferGUI( + IGUIFormBuilder guiBuilder, HttpServletResponse httpResp, + String authURL, String pendingReqID) throws ConfigurationException, IOException { + try { + String containerURL = authURL + + SSOTransferConstants.SERVLET_SSOTRANSFER_FROM_SMARTPHONE + + "?" + MOAIDAuthConstants.PARAM_TARGET_PENDINGREQUESTID + "=" + pendingReqID; - JsonObject qrResult = new JsonObject(); - qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_TYPE, - SSOTransferConstants.SSOCONTAINER_VALUE_TYPE_TRANSER); - qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_URL, containerURL); + JsonObject qrResult = new JsonObject(); + qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_TYPE, + SSOTransferConstants.SSOCONTAINER_VALUE_TYPE_TRANSER); + qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_URL, containerURL); - ByteArrayOutputStream qrStream = - QRCode.from(qrResult.toString()).to(ImageType.GIF).withSize(300, 300).stream(); - String base64EncodedImage = Base64Utils.encode(qrStream.toByteArray()); - VelocityContext context = new VelocityContext(); - context.put("QRImage", base64EncodedImage); - - context.put("successMsg", "Select the SSO Session in your SSO-Transfer App and scan the QR-Code to start the process."); - - context.put("timeoutURL", containerURL); - context.put("timeout", REFESH_TIMEOUT); - - return context; - - } - - public static void printSSOTransferGUI(VelocityContext context, HttpServletResponse httpResp) throws MOAIDException { - try { - Logger.trace("Initialize VelocityEngine..."); - - InputStream is = null; - String pathLocation = null; - try { - String rootconfigdir = AuthConfigurationProviderFactory.getInstance().getRootConfigFileDir(); - pathLocation = rootconfigdir + HTMLTEMPLATESDIR + GUI_HTML_TEMPLATE; - File file = new File(new URI(pathLocation)); - is = new FileInputStream(file); - evaluateTemplate(context, httpResp, is); - - } catch (Exception e) { - Logger.warn("SLO Template is not found in configuration directory (" + - pathLocation + "). Load template from project library ... "); - - try { - pathLocation = GUI_HTML_TEMPLATE; - is = Thread.currentThread() - .getContextClassLoader() - .getResourceAsStream(pathLocation); - evaluateTemplate(context, httpResp, is); + ByteArrayOutputStream qrStream = + QRCode.from(qrResult.toString()).to(ImageType.GIF).withSize(300, 300).stream(); + String base64EncodedImage = Base64Utils.encode(qrStream.toByteArray()); - } catch (Exception e1) { - Logger.error("Single LogOut form can not created.", e); - throw new MOAIDException("Create Single LogOut information FAILED.", null, e); - } - - } finally { - if (is != null) - is.close(); + DefaultGUIFormBuilderConfiguration config = new DefaultGUIFormBuilderConfiguration( + authURL, + DefaultGUIFormBuilderConfiguration.VIEW_SSO_SESSION_TRANSFER, + null); + + config.putCustomParameter("QRImage", base64EncodedImage); + config.putCustomParameter("successMsg", "Select the SSO Session in your SSO-Transfer App and scan the QR-Code to start the process."); + config.putCustomParameter("timeoutURL", containerURL); + config.putCustomParameter("timeout", REFESH_TIMEOUT); - } + guiBuilder.build(httpResp, config, "SSO-Transfer-Module"); - } catch (Exception e) { - Logger.error("Single LogOut form can not created.", e); - throw new MOAIDException("Create Single LogOut information FAILED.", null, e); - } - } - - private static void evaluateTemplate(VelocityContext context, HttpServletResponse httpResp, InputStream is) throws Exception { - - VelocityEngine engine = VelocityProvider.getClassPathVelocityEngine(); - - BufferedReader reader = new BufferedReader(new InputStreamReader(is )); - - //set default elements to velocity context - context.put("contextpath", AuthConfigurationProviderFactory.getInstance().getPublicURLPrefix()); - - StringWriter writer = new StringWriter(); - //velocityEngine.evaluate(context, writer, "SLO_Template", reader); - engine.evaluate(context, writer, "SSO Transfer Template", reader); - - - httpResp.setContentType("text/html;charset=UTF-8"); - httpResp.getOutputStream().write(writer.toString().getBytes("UTF-8")); - - } - + } catch (GUIBuildException e) { + Logger.warn("Can not build GUI:'BKU-Selection'. Msg:" + e.getMessage(), e); + throw new ConfigurationException("builder.09", new Object[]{e.getMessage()}, e); + + } + + } } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java index b2ab8b119..5f2642cf8 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java @@ -81,19 +81,19 @@ import org.w3c.dom.NodeList; import com.google.gson.JsonObject; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.ParseException; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.SSOTransferConstants; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.SSOTransferAuthenticationData; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.SSOTransferOnlineApplication; import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +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.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.MISMandate; -import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.PVPAttributeBuilder; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.assertion.PVP2AssertionBuilder; diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/FederatedAuthenticationModuleImpl.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/FederatedAuthenticationModuleImpl.java index 6abc60c46..49275c6eb 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/FederatedAuthenticationModuleImpl.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/FederatedAuthenticationModuleImpl.java @@ -22,8 +22,8 @@ */ package at.gv.egovernment.moa.id.auth.modules.federatedauth; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.modules.AuthModule; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; import at.gv.egovernment.moa.id.process.api.ExecutionContext; /** diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthMetadataConfiguration.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthMetadataConfiguration.java index 0f2c85350..0cee2dde3 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthMetadataConfiguration.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthMetadataConfiguration.java @@ -34,7 +34,7 @@ import org.opensaml.xml.security.credential.Credential; import at.gv.egovernment.moa.id.auth.modules.federatedauth.FederatedAuthConstants; import at.gv.egovernment.moa.id.auth.modules.federatedauth.utils.FederatedAuthCredentialProvider; -import at.gv.egovernment.moa.id.config.ConfigurationException; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.config.PVPConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.signer.CredentialsNotAvailableException; diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/controller/FederatedAuthMetadataController.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/controller/FederatedAuthMetadataController.java index c06800079..98240a636 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/controller/FederatedAuthMetadataController.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/controller/FederatedAuthMetadataController.java @@ -36,7 +36,7 @@ import at.gv.egovernment.moa.id.auth.modules.federatedauth.FederatedAuthConstant import at.gv.egovernment.moa.id.auth.modules.federatedauth.config.FederatedAuthMetadataConfiguration; import at.gv.egovernment.moa.id.auth.modules.federatedauth.utils.FederatedAuthCredentialProvider; import at.gv.egovernment.moa.id.auth.servlet.AbstractController; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.PVPMetadataBuilder; import at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration; import at.gv.egovernment.moa.id.util.HTTPUtils; diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/CreateAuthnRequestTask.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/CreateAuthnRequestTask.java index 06664af45..d581e7e75 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/CreateAuthnRequestTask.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/CreateAuthnRequestTask.java @@ -35,15 +35,14 @@ import org.opensaml.xml.security.SecurityException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.federatedauth.FederatedAuthConstants; import at.gv.egovernment.moa.id.auth.modules.federatedauth.config.FederatedAuthnRequestBuilderConfiguration; import at.gv.egovernment.moa.id.auth.modules.federatedauth.utils.FederatedAuthCredentialProvider; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.moduls.RequestImpl; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; @@ -82,7 +81,7 @@ public class CreateAuthnRequestTask extends AbstractAuthServletTask { } //load IDP configuration from MOA-ID Configuration - OAAuthParameter idpConfig = authConfig.getOnlineApplicationParameter(idpEntityID); + IOAAuthParameters idpConfig = authConfig.getOnlineApplicationParameter(idpEntityID); //validate IDP if (!idpConfig.isInderfederationIDP() || !idpConfig.isInboundSSOInterfederationAllowed()) { Logger.info("Requested interfederation IDP " + idpEntityID + " is not valid for interfederation."); @@ -139,7 +138,7 @@ public class CreateAuthnRequestTask extends AbstractAuthServletTask { * @param objects * @throws AuthnRequestBuildException */ - private void handleAuthnRequestBuildProblem(ExecutionContext executionContext, OAAuthParameter idpConfig, String msgCode, Object[] objects) throws AuthnRequestBuildException { + private void handleAuthnRequestBuildProblem(ExecutionContext executionContext, IOAAuthParameters idpConfig, String msgCode, Object[] objects) throws AuthnRequestBuildException { if (idpConfig.isPerformLocalAuthenticationOnInterfederationError()) { Logger.info("Switch to local authentication on this IDP ... "); diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java index 01163efd6..1c3134b77 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/tasks/ReceiveAuthnResponseTask.java @@ -41,20 +41,19 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.builder.AuthenticationDataBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionStorageConstants; import at.gv.egovernment.moa.id.auth.exception.BuildException; import at.gv.egovernment.moa.id.auth.exception.InvalidProtocolRequestException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; -import at.gv.egovernment.moa.id.auth.exception.SessionDataStorageException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.federatedauth.FederatedAuthConstants; import at.gv.egovernment.moa.id.auth.modules.federatedauth.utils.FederatedAuthCredentialProvider; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; +import at.gv.egovernment.moa.id.commons.api.exceptions.SessionDataStorageException; import at.gv.egovernment.moa.id.moduls.RequestImpl; import at.gv.egovernment.moa.id.moduls.SSOManager; import at.gv.egovernment.moa.id.process.api.ExecutionContext; @@ -225,7 +224,7 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { } catch (AssertionValidationExeption | AuthnResponseValidationException e) { Logger.info("PVP response validation FAILED. Msg:" + e.getMessage()); if (msg != null) { - OAAuthParameter idpConfig = authConfig.getOnlineApplicationParameter(msg.getEntityID()); + IOAAuthParameters idpConfig = authConfig.getOnlineApplicationParameter(msg.getEntityID()); //remove federated IDP from SSO session if exists ssoManager.removeInterfederatedSSOIDP(msg.getEntityID(), request); @@ -313,7 +312,7 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { * @throws TaskExecutionException * @throws Throwable */ - private void handleAuthnResponseValidationProblem(ExecutionContext executionContext, OAAuthParameter idpConfig, Throwable e) throws TaskExecutionException { + private void handleAuthnResponseValidationProblem(ExecutionContext executionContext, IOAAuthParameters idpConfig, Throwable e) throws TaskExecutionException { if (idpConfig != null && idpConfig.isPerformLocalAuthenticationOnInterfederationError()) { Logger.info("Switch to local authentication on this IDP ... "); diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/utils/FederatedAuthCredentialProvider.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/utils/FederatedAuthCredentialProvider.java index 1168250ad..aac253083 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/utils/FederatedAuthCredentialProvider.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/utils/FederatedAuthCredentialProvider.java @@ -26,7 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import at.gv.egovernment.moa.id.auth.modules.federatedauth.FederatedAuthConstants; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.signer.AbstractCredentialProvider; import at.gv.egovernment.moa.util.FileUtils; diff --git a/id/server/modules/moa-id-modules-saml1/pom.xml b/id/server/modules/moa-id-modules-saml1/pom.xml index f19802a01..323edee8d 100644 --- a/id/server/modules/moa-id-modules-saml1/pom.xml +++ b/id/server/modules/moa-id-modules-saml1/pom.xml @@ -44,6 +44,13 @@ test --> + + MOA.id.server + moa-id-commons + test + test-jar + + MOA.id.server.modules moa-id-modul-citizencard_authentication diff --git a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetArtifactAction.java b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetArtifactAction.java index b184aa4fe..c421bf8cc 100644 --- a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetArtifactAction.java +++ b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetArtifactAction.java @@ -30,17 +30,17 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionStorageConstants; import at.gv.egovernment.moa.id.auth.data.ExtendedSAMLAttribute; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.servlet.RedirectServlet; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.SLOInformationImpl; import at.gv.egovernment.moa.id.data.SLOInformationInterface; import at.gv.egovernment.moa.id.moduls.IAction; -import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.URLEncoder; import eu.eidas.auth.commons.IPersonalAttributeList; diff --git a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java index fc5837e51..b01ea666d 100644 --- a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java +++ b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java @@ -71,13 +71,13 @@ import org.xml.sax.SAXException; import at.gv.egovernment.moa.id.auth.builder.SAMLResponseBuilder; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; +import at.gv.egovernment.moa.id.auth.frontend.velocity.VelocityProvider; import at.gv.egovernment.moa.id.auth.servlet.AbstractController; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; +import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; import at.gv.egovernment.moa.id.util.ErrorResponseUtils; import at.gv.egovernment.moa.id.util.HTTPUtils; -import at.gv.egovernment.moa.id.util.MOAIDMessageProvider; import at.gv.egovernment.moa.id.util.Random; -import at.gv.egovernment.moa.id.util.VelocityProvider; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Constants; import at.gv.egovernment.moa.util.DOMUtils; diff --git a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java index 9d0dac0f8..0ec0d95a2 100644 --- a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java +++ b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1AuthenticationServer.java @@ -46,7 +46,6 @@ import org.xml.sax.SAXException; import at.gv.e_government.reference.namespace.mandates._20040701_.Mandate; import at.gv.e_government.reference.namespace.mandates._20040701_.Mandator; import at.gv.egovernment.moa.id.auth.AuthenticationServer; -import at.gv.egovernment.moa.id.auth.MOAIDAuthConstants; import at.gv.egovernment.moa.id.auth.builder.AuthenticationDataAssertionBuilder; import at.gv.egovernment.moa.id.auth.builder.BPKBuilder; import at.gv.egovernment.moa.id.auth.builder.PersonDataBuilder; @@ -61,13 +60,14 @@ import at.gv.egovernment.moa.id.auth.exception.ServiceException; import at.gv.egovernment.moa.id.auth.exception.ValidateException; import at.gv.egovernment.moa.id.auth.parser.SAMLArtifactParser; import at.gv.egovernment.moa.id.auth.validator.parep.ParepUtils; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.data.SAML1ConfigurationParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; -import at.gv.egovernment.moa.id.config.auth.data.SAML1ConfigurationParameters; import at.gv.egovernment.moa.id.data.AuthenticationData; import at.gv.egovernment.moa.id.data.IAuthData; -import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.storage.ITransactionStorage; import at.gv.egovernment.moa.id.util.Random; diff --git a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java index 8cc894040..37d66d29b 100644 --- a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java +++ b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1Protocol.java @@ -37,14 +37,14 @@ import org.springframework.web.bind.annotation.RequestMethod; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.exception.InvalidProtocolRequestException; -import at.gv.egovernment.moa.id.auth.exception.MOAIDException; import at.gv.egovernment.moa.id.auth.exception.ProtocolNotActiveException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.auth.servlet.RedirectServlet; +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.api.data.SAML1ConfigurationParameters; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; -import at.gv.egovernment.moa.id.config.auth.data.SAML1ConfigurationParameters; -import at.gv.egovernment.moa.id.moduls.IRequest; import at.gv.egovernment.moa.id.protocols.AbstractAuthProtocolModulController; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.util.ParamValidatorUtils; @@ -163,8 +163,7 @@ public class SAML1Protocol extends AbstractAuthProtocolModulController { //load Target only from OA config - OAAuthParameter oaParam = AuthConfigurationProviderFactory.getInstance() - .getOnlineApplicationParameter(oaURL); + IOAAuthParameters oaParam = authConfig.getOnlineApplicationParameter(oaURL); if (oaParam == null) throw new InvalidProtocolRequestException("auth.00", diff --git a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1RequestImpl.java b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1RequestImpl.java index d93aebcec..42fafc01e 100644 --- a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1RequestImpl.java +++ b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/SAML1RequestImpl.java @@ -30,7 +30,7 @@ import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Component; -import at.gv.egovernment.moa.id.config.auth.data.SAML1ConfigurationParameters; +import at.gv.egovernment.moa.id.commons.api.data.SAML1ConfigurationParameters; import at.gv.egovernment.moa.id.moduls.RequestImpl; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java index 4e5bed97c..70448ef09 100644 --- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java +++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/auth/servlet/MonitoringServlet.java @@ -36,8 +36,8 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.monitoring.TestManager; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java index 13fb59038..5e4183146 100644 --- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java +++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/DatabaseTestModule.java @@ -29,11 +29,11 @@ import java.util.List; import org.hibernate.Query; import org.hibernate.Session; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils; import at.gv.egovernment.moa.id.commons.db.StatisticLogDBUtils; import at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore; import at.gv.egovernment.moa.id.commons.db.dao.statistic.StatisticLog; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java index 824791797..7994e7a06 100644 --- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java +++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/IdentityLinkTestModule.java @@ -37,9 +37,8 @@ import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser; import at.gv.egovernment.moa.id.auth.parser.VerifyXMLSignatureResponseParser; import at.gv.egovernment.moa.id.auth.validator.IdentityLinkValidator; import at.gv.egovernment.moa.id.auth.validator.VerifyXMLSignatureResponseValidator; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; -import at.gv.egovernment.moa.id.config.auth.IOAAuthParameters; import at.gv.egovernment.moa.id.config.auth.data.DynamicOAAuthParameters; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; @@ -71,7 +70,7 @@ public class IdentityLinkTestModule implements TestModuleInterface { .getMoaSpIdentityLinkTrustProfileID(false)); // invokes the call - Element domVerifyXMLSignatureResponse = new SignatureVerificationInvoker() + Element domVerifyXMLSignatureResponse = SignatureVerificationInvoker.getInstance() .verifyXMLSignature(domVerifyXMLSignatureRequest); // parses the try { diff --git a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java index 3c2b143b3..b25eed520 100644 --- a/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java +++ b/id/server/modules/module-monitoring/src/main/java/at/gv/egovernment/moa/id/monitoring/TestManager.java @@ -27,8 +27,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import at.gv.egovernment.moa.id.config.ConfigurationException; -import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.FileUtils; diff --git a/id/server/pom.xml b/id/server/pom.xml index 2fbd3dd06..56d317cf5 100644 --- a/id/server/pom.xml +++ b/id/server/pom.xml @@ -18,11 +18,11 @@ + moa-id-spring-initializer + moa-id-frontend-resources idserverlib moa-id-commons - modules - moa-id-spring-initializer - moa-id-frontend-resources + modules auth-final auth-edu -- cgit v1.2.3 From b01fc5becad147315bbd8d168f5435ee126e638d Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 11:40:13 +0100 Subject: add independent mandate-service selection step to choose between MIS and ELGA mandate-service --- .../StartAuthentificationParameterParser.java | 22 +-- .../id/auth/servlet/GUILayoutBuilderServlet.java | 150 +++++++++++++++++++++ .../templates/mandate-service-selection.html | 52 +++++++ .../internal/DefaultCitizenCardAuthModuleImpl.java | 8 +- .../tasks/InitializeBKUAuthenticationTask.java | 4 +- .../internal/DefaultAuthentication.process.xml | 2 +- .../elgamandates/ELGAMandatesAuthConstants.java | 2 + .../elgamandates/ELGAMandatesAuthModuleImpl.java | 25 +++- .../tasks/ELGAInitializeBKUAuthenticationTask.java | 144 -------------------- .../tasks/EvaluateMandateServiceTask.java | 126 +++++++++++++++++ .../tasks/SelectMandateServiceTask.java | 95 +++++++++++++ .../elgamandates/utils/ELGAMandateUtils.java | 59 ++++++++ .../DefaultAuth_with_ELGA_mandates.process.xml | 19 ++- .../moaid_elga_mandate_client_auth.beans.xml | 10 +- 14 files changed, 541 insertions(+), 177 deletions(-) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html delete mode 100644 id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ELGAInitializeBKUAuthenticationTask.java create mode 100644 id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/EvaluateMandateServiceTask.java create mode 100644 id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/SelectMandateServiceTask.java create mode 100644 id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateUtils.java (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java index f91dc6d3e..69c155c1e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java @@ -78,20 +78,20 @@ public class StartAuthentificationParameterParser extends MOAIDAuthConstants{ //check UseMandate flag - String useMISMandateString = null; - boolean useMISMandateBoolean = false; + String useMandateString = null; + boolean useMandateBoolean = false; if ((useMandate != null) && (useMandate.compareTo("") != 0)) { - useMISMandateString = useMandate; + useMandateString = useMandate; } else { - useMISMandateString = "false"; + useMandateString = "false"; } - if (useMISMandateString.compareToIgnoreCase("true") == 0) - useMISMandateBoolean = true; + if (useMandateString.compareToIgnoreCase("true") == 0) + useMandateBoolean = true; else - useMISMandateBoolean = false; + useMandateBoolean = false; - moasession.setUseMandate(useMISMandateString); + moasession.setUseMandate(useMandateString); //load OnlineApplication configuration @@ -155,7 +155,7 @@ public class StartAuthentificationParameterParser extends MOAIDAuthConstants{ } else { Logger.debug("Service-Provider is of type 'PrivateService' with DomainIdentifier:" + oaParam.getIdentityLinkDomainIdentifier()); - if (useMISMandateBoolean) { + if (useMandateBoolean) { Logger.error("Online-Mandate Mode for business application not supported."); throw new AuthenticationException("auth.17", null); } @@ -213,8 +213,8 @@ public class StartAuthentificationParameterParser extends MOAIDAuthConstants{ protocolReq.setNeedSingleSignOnFunctionality(false); } - if (protocolReq.needSingleSignOnFunctionality() && useMISMandateBoolean) { - Logger.info("Usage of MIS-MandateService does not allow Single Sign-On. --> SSO is disabled for this request."); + if (protocolReq.needSingleSignOnFunctionality() && useMandateBoolean) { + Logger.info("Usage of Mandate-Service does not allow Single Sign-On. --> SSO is disabled for this request."); protocolReq.setNeedSingleSignOnFunctionality(false); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java new file mode 100644 index 000000000..09b344f9d --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java @@ -0,0 +1,150 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.servlet; + +import java.io.IOException; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringEscapeUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; +import at.gv.egovernment.moa.id.auth.frontend.builder.ServiceProviderSpecificGUIFormBuilderConfiguration; +import at.gv.egovernment.moa.id.auth.servlet.AbstractController; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.moduls.IRequestStorage; +import at.gv.egovernment.moa.id.util.HTTPUtils; +import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; + +/** + * @author tlenz + * + */ +@Controller +public class GUILayoutBuilderServlet extends AbstractController { + + public static final String ENDPOINT_CSS = "/css/buildCSS"; + public static final String ENDPOINT_JS = "/js/buildJS"; + + @Autowired AuthConfiguration authConfig; + @Autowired IRequestStorage requestStoreage; + @Autowired IGUIFormBuilder formBuilder; + + public GUILayoutBuilderServlet() { + super(); + Logger.debug("Registering servlet " + getClass().getName() + + " with mappings '" + ENDPOINT_CSS + + "' and '" + ENDPOINT_JS + "'."); + + } + + @RequestMapping(value = "/css/buildCSS", method = {RequestMethod.GET}) + public void buildCSS(HttpServletRequest req, HttpServletResponse resp) throws IOException { + try { + IRequest pendingReq = extractPendingRequest(req); + + //initialize GUI builder configuration + ServiceProviderSpecificGUIFormBuilderConfiguration config = null; + if (pendingReq != null) + config = new ServiceProviderSpecificGUIFormBuilderConfiguration( + pendingReq, + ServiceProviderSpecificGUIFormBuilderConfiguration.VIEW_TEMPLATE_CSS, + null); + + else + config = new ServiceProviderSpecificGUIFormBuilderConfiguration( + HTTPUtils.extractAuthURLFromRequest(req), + ServiceProviderSpecificGUIFormBuilderConfiguration.VIEW_TEMPLATE_CSS, + null); + + //build GUI component + formBuilder.build(resp, config, "text/css;charset=UTF-8", "CSS-Form"); + + } catch (Exception e) { + Logger.warn("GUI ressource:'CSS' generation FAILED."); + resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Created resource failed"); + } + + } + + @RequestMapping(value = "/js/buildJS", method = {RequestMethod.GET}) + public void buildJavaScript(HttpServletRequest req, HttpServletResponse resp) throws IOException { + try { + IRequest pendingReq = extractPendingRequest(req); + + //initialize GUI builder configuration + ServiceProviderSpecificGUIFormBuilderConfiguration config = null; + if (pendingReq != null) + config = new ServiceProviderSpecificGUIFormBuilderConfiguration( + pendingReq, + ServiceProviderSpecificGUIFormBuilderConfiguration.VIEW_TEMPLATE_JS, + null); + + else + config = new ServiceProviderSpecificGUIFormBuilderConfiguration( + HTTPUtils.extractAuthURLFromRequest(req), + ServiceProviderSpecificGUIFormBuilderConfiguration.VIEW_TEMPLATE_JS, + null); + + //build GUI component + formBuilder.build(resp, config, "text/javascript;charset=UTF-8", "JavaScript"); + + } catch (Exception e) { + Logger.warn("GUI ressource:'JavaScript' generation FAILED."); + resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Created resource failed"); + } + + } + + private IRequest extractPendingRequest(HttpServletRequest req) { + try { + String pendingReqID = StringEscapeUtils.escapeHtml( + req.getParameter(MOAIDAuthConstants.PARAM_TARGET_PENDINGREQUESTID)); + + if (MiscUtil.isNotEmpty(pendingReqID)) { + IRequest pendingReq = requestStorage.getPendingRequest(pendingReqID); + if (pendingReq != null) { + Logger.trace("GUI-Layout builder: Pending-request:" + + pendingReqID + " found -> Build specific template"); + return pendingReq; + + } + } + + Logger.trace("GUI-Layout builder: No pending-request found -> Use default templates"); + + } catch (Exception e) { + Logger.warn("GUI-Layout builder-servlet has an error during request-preprocessing.", e); + } + + return null; + } +} diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html new file mode 100644 index 000000000..a9f0c4238 --- /dev/null +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html @@ -0,0 +1,52 @@ + + + + + + + + Anmeldung an Online-Applikation + + + + +
              + +
              + + + +
              +
              +
              +

              + Anmeldeinformationen: +

              +
              + +
              +

              Anmeldung an: $OAName

              + + +
              +
              + + + +
              +
              +
              +
              + + + +
              +
              + +
              +
              +
              +
              +
              + + diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/DefaultCitizenCardAuthModuleImpl.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/DefaultCitizenCardAuthModuleImpl.java index 4f9936c94..b0efb100a 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/DefaultCitizenCardAuthModuleImpl.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/DefaultCitizenCardAuthModuleImpl.java @@ -17,12 +17,6 @@ public class DefaultCitizenCardAuthModuleImpl implements AuthModule { return 0; } - public String getProcessName() { - return "DefaultAuthentication"; - - - } - @Override public String selectProcess(ExecutionContext context) { //select process if BKU is selected and it is no STORK authentication @@ -35,7 +29,7 @@ public class DefaultCitizenCardAuthModuleImpl implements AuthModule { if (StringUtils.isBlank((String) context.get("ccc")) && StringUtils.isNotBlank((String) context.get(MOAIDAuthConstants.PARAM_BKU)) && !performBKUSelection) - return getProcessName(); + return "DefaultAuthentication"; else return null; diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/InitializeBKUAuthenticationTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/InitializeBKUAuthenticationTask.java index d3d736a9c..c1fae1f1e 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/InitializeBKUAuthenticationTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/InitializeBKUAuthenticationTask.java @@ -177,9 +177,9 @@ public class InitializeBKUAuthenticationTask extends AbstractAuthServletTask { } } + //set useMandate flag to executionContext executionContext.put(MOAIDAuthConstants.PARAM_USEMANDATE, moasession.isMandateUsed()); - executionContext.put(MOAIDAuthConstants.PARAM_USEMISMANDATE, moasession.isMandateUsed()); - + } } diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/resources/at/gv/egovernment/moa/id/auth/modules/internal/DefaultAuthentication.process.xml b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/resources/at/gv/egovernment/moa/id/auth/modules/internal/DefaultAuthentication.process.xml index afa3fe2ad..74792ed72 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/resources/at/gv/egovernment/moa/id/auth/modules/internal/DefaultAuthentication.process.xml +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/resources/at/gv/egovernment/moa/id/auth/modules/internal/DefaultAuthentication.process.xml @@ -38,7 +38,7 @@ - + diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthConstants.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthConstants.java index b50d1cf4e..60dd95338 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthConstants.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthConstants.java @@ -44,6 +44,8 @@ public class ELGAMandatesAuthConstants { public static final String ENDPOINT_REDIRECT = "/sp/elga_mandate/redirect"; public static final String ENDPOINT_METADATA = "/sp/elga_mandate/metadata"; + public static final String TEMPLATE_MANDATE_SERVICE_SELECTION = "/mandate-service-selection.html"; + //configuration properties public static final String CONFIG_PROPS_PREFIX = "modules.elga_mandate."; diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthModuleImpl.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthModuleImpl.java index 7f7af704c..753d3336c 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthModuleImpl.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthModuleImpl.java @@ -23,7 +23,12 @@ package at.gv.egovernment.moa.id.auth.modules.elgamandates; */ +import org.springframework.beans.factory.annotation.Autowired; + import at.gv.egovernment.moa.id.auth.modules.internal.DefaultCitizenCardAuthModuleImpl; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.process.api.ExecutionContext; +import at.gv.egovernment.moa.util.MiscUtil; /** * This authentication module extens the default citizen @@ -33,6 +38,8 @@ import at.gv.egovernment.moa.id.auth.modules.internal.DefaultCitizenCardAuthModu */ public class ELGAMandatesAuthModuleImpl extends DefaultCitizenCardAuthModuleImpl { + @Autowired private AuthConfiguration authConfig; + private int priority = 0; /* (non-Javadoc) @@ -42,13 +49,23 @@ public class ELGAMandatesAuthModuleImpl extends DefaultCitizenCardAuthModuleImpl public int getPriority() { return priority; } - + @Override - public String getProcessName() { - return "DefaultAuthenticationWithELGAMandates"; + public String selectProcess(ExecutionContext context) { + String selectedProcessID = super.selectProcess(context); + + //check if BKU authentication is selected and ELGA-MandateService is configurated + if (MiscUtil.isNotEmpty(selectedProcessID)) { + if (MiscUtil.isNotEmpty(authConfig.getBasicMOAIDConfiguration( + ELGAMandatesAuthConstants.CONFIG_PROPS_METADATAURL))) + return "DefaultAuthenticationWithELGAMandates"; + + } + + return selectedProcessID; } - + /* (non-Javadoc) * @see at.gv.egovernment.moa.id.auth.modules.AuthModule#getProcessDefinitions() */ diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ELGAInitializeBKUAuthenticationTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ELGAInitializeBKUAuthenticationTask.java deleted file mode 100644 index fb9628909..000000000 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ELGAInitializeBKUAuthenticationTask.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ -package at.gv.egovernment.moa.id.auth.modules.elgamandates.tasks; - -import java.util.List; - -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.springframework.stereotype.Component; - -import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; -import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; -import at.gv.egovernment.moa.id.auth.modules.internal.tasks.InitializeBKUAuthenticationTask; -import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; -import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; -import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; -import at.gv.egovernment.moa.id.commons.utils.KeyValueUtils; -import at.gv.egovernment.moa.id.process.api.ExecutionContext; -import at.gv.egovernment.moa.logging.Logger; - -/** - * @author tlenz - * - */ -@Component("ELGAInitializeBKUAuthenticationTask") -public class ELGAInitializeBKUAuthenticationTask extends InitializeBKUAuthenticationTask { - - @Override - public void execute(ExecutionContext executionContext, - HttpServletRequest request, HttpServletResponse response) - throws TaskExecutionException { - - try { - //perform Default-BKU authentication initialization - internalInitializeWithoutPersist(executionContext, request, response); - - //perform ELGA Mandate-Service specific parts - Logger.debug("Perfom ELGA-Mandate specific parts of initialisation."); - Boolean misMandateUsed = (Boolean) executionContext.get(MOAIDAuthConstants.PARAM_USEMISMANDATE); - - boolean elgaMandateUsed = false; - Object elgaMandateUsedObj = executionContext.get(MOAIDAuthConstants.PARAM_USEELGAMANDATE); - if (elgaMandateUsedObj == null || - !(elgaMandateUsedObj instanceof String || elgaMandateUsedObj instanceof Boolean)) { - Logger.error("Use ELGA-MandateService flag has a wrong type."); - throw new MOAIDException("auth.12", new Object[]{"Start-BKU Authentication","useELGAMandate"}); - - } else { - if (elgaMandateUsedObj instanceof String) - elgaMandateUsed = Boolean.parseBoolean((String) elgaMandateUsedObj); - else - elgaMandateUsed = (boolean) elgaMandateUsedObj; - - } - - //check if both mandate Services are requested - if ( (misMandateUsed != null && misMandateUsed) && - elgaMandateUsed ) { - Logger.error("Can not use MIS-MandateService and ELGA-MandateService twince"); - throw new MOAIDException("validator.73", null); - - } - - - if (elgaMandateUsed) { - //check mandateProfiles against ELGA-MandateService configuration - if (!checkServiceProviderAgainstELGAModulConfigration()) { - Logger.info("Service-Provider: " + pendingReq.getOnlineApplicationConfiguration().getPublicURLPrefix() - + " does not fulfill requirements to use ELGA-MandateService."); - throw new MOAIDException("service.10", new Object[]{ - ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING, - "No valid mandate-profile defined"}); - - } - - //remove MIS-Mandate flag and set useMandate flag to MOASession - Logger.debug("Authentication process select ELGA-MandateService."); - executionContext.remove(MOAIDAuthConstants.PARAM_USEMISMANDATE); - moasession.setUseMandates(elgaMandateUsed); - } - - //disable SSO if it is requested - if (pendingReq.needSingleSignOnFunctionality() && moasession.isMandateUsed()) { - Logger.info("ELGA-MandateService does not allow Single Sign-On. SSO get disabled for this request."); - pendingReq.setNeedSingleSignOnFunctionality(false); - - - } - - //store MOASession and pendingRequest - requestStoreage.storePendingRequest(pendingReq); - authenticatedSessionStorage.storeSession(moasession); - - } catch (MOADatabaseException | MOAIDException e) { - Logger.info("Initialize BKUAuthentication with ELGA Mandates FAILED. Reason:" + e.getMessage()); - throw new TaskExecutionException(pendingReq, e.getMessage(), e); - - } - } - - /** - * Check Service-Provider mandate-profiles against allowed mandate-profiles for ELGA MandateService. - * - * @return true, if ELGA mandateservice is allowed, otherwise false - */ - private boolean checkServiceProviderAgainstELGAModulConfigration() { - String allowedMandateTypesCSV = - authConfig.getBasicMOAIDConfiguration(ELGAMandatesAuthConstants.CONFIG_PROPS_ALLOWED_MANDATE_TYPES); - List allowedMandateTypes = KeyValueUtils.getListOfCSVValues(allowedMandateTypesCSV); - List spMandateProfiles = pendingReq.getOnlineApplicationConfiguration().getMandateProfiles(); - - boolean isELGAMandateServiceAllowed = false; - if (spMandateProfiles != null) { - for (String el : allowedMandateTypes) { - if (spMandateProfiles.contains(el)) - isELGAMandateServiceAllowed = true; - - } - } - - return isELGAMandateServiceAllowed; - } -} diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/EvaluateMandateServiceTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/EvaluateMandateServiceTask.java new file mode 100644 index 000000000..f05446771 --- /dev/null +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/EvaluateMandateServiceTask.java @@ -0,0 +1,126 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.elgamandates.tasks; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringEscapeUtils; +import org.springframework.stereotype.Component; + +import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; +import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; +import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; +import at.gv.egovernment.moa.id.auth.modules.elgamandates.utils.ELGAMandateUtils; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; +import at.gv.egovernment.moa.id.process.api.ExecutionContext; +import at.gv.egovernment.moa.id.util.ParamValidatorUtils; +import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; + +/** + * @author tlenz + * + */ +@Component("EvaluateMandateServiceTask") +public class EvaluateMandateServiceTask extends AbstractAuthServletTask { + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask#execute(at.gv.egovernment.moa.id.process.api.ExecutionContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) + */ + @Override + public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) + throws TaskExecutionException { + try { + boolean useMIS = getUserConfermationFromRequest(request, MOAIDAuthConstants.PARAM_USEMISMANDATE); + boolean useELGA = getUserConfermationFromRequest(request, MOAIDAuthConstants.PARAM_USEELGAMANDATE); + + //check if both mandate Services are requested + if ( useMIS && useELGA ) { + Logger.error("Can not use MIS-MandateService and ELGA-MandateService twince"); + throw new MOAIDException("validator.73", null); + + } + + //select next process step + if (useELGA) { + //validate service-provider again + if (!ELGAMandateUtils.checkServiceProviderAgainstELGAModulConfigration(authConfig, pendingReq)) { + Logger.info("Service-Provider: " + pendingReq.getOnlineApplicationConfiguration().getPublicURLPrefix() + + " does not fulfill requirements to use ELGA-MandateService."); + throw new MOAIDException("service.10", new Object[]{ + ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING, + "No valid mandate-profile defined"}); + + } + + executionContext.put(MOAIDAuthConstants.PARAM_USEELGAMANDATE, useELGA); + Logger.debug("ELGA Mandate-Service is selected. Initialize service communication ... "); + + } else if(useMIS) { + executionContext.put(MOAIDAuthConstants.PARAM_USEMISMANDATE, useMIS); + Logger.debug("MIS Mandate-Service is selected. Initialize service communication ... "); + + + } else { + //mark pending-request as aborted + Logger.info("No Mandate-Service is selected. Abort authentication process ... "); + pendingReq.setAbortedByUser(true); + pendingReq.setAuthenticated(false); + + //store pending-request + requestStoreage.storePendingRequest(pendingReq); + + //redirect to protocol finalization + performRedirectToProtocolFinialization(pendingReq, response); + + } + + } catch (MOAIDException e) { + Logger.info("Evaluation of Mandate-Service selection FAILED. Reason:" + e.getMessage()); + throw new TaskExecutionException(pendingReq, e.getMessage(), e); + + } catch (Exception e) { + Logger.info("Mandate-Service selection evaluation: General Exception. Msg:" + e.getMessage()); + throw new TaskExecutionException(pendingReq, "ELGA mandate-service: General Exception.", e); + + } + + } + + private boolean getUserConfermationFromRequest(HttpServletRequest httpReq, String paramName) throws WrongParametersException { + String paramString = httpReq.getParameter(paramName); + paramString = StringEscapeUtils.escapeHtml(paramString); + if (!ParamValidatorUtils.isValidUseMandate(paramString)) + throw new WrongParametersException("Mandate-Service selection-evaluation", paramName, null); + + if (MiscUtil.isNotEmpty(paramString)) + return Boolean.parseBoolean(paramString); + + else + return false; + + } +} diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/SelectMandateServiceTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/SelectMandateServiceTask.java new file mode 100644 index 000000000..8d6ac1762 --- /dev/null +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/SelectMandateServiceTask.java @@ -0,0 +1,95 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.elgamandates.tasks; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIBuilderConfiguration; +import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; +import at.gv.egovernment.moa.id.auth.frontend.builder.ServiceProviderSpecificGUIFormBuilderConfiguration; +import at.gv.egovernment.moa.id.auth.frontend.exception.GUIBuildException; +import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; +import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; +import at.gv.egovernment.moa.id.auth.modules.elgamandates.utils.ELGAMandateUtils; +import at.gv.egovernment.moa.id.auth.servlet.GeneralProcessEngineSignalController; +import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; +import at.gv.egovernment.moa.id.process.api.ExecutionContext; +import at.gv.egovernment.moa.logging.Logger; + +/** + * @author tlenz + * + */ +@Component("SelectMandateServiceTask") +public class SelectMandateServiceTask extends AbstractAuthServletTask { + + @Autowired IGUIFormBuilder guiBuilder; + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask#execute(at.gv.egovernment.moa.id.process.api.ExecutionContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) + */ + @Override + public void execute(ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) + throws TaskExecutionException { + try { + //check if Service-Provider allows ELGA-mandates + if (ELGAMandateUtils.checkServiceProviderAgainstELGAModulConfigration(authConfig, pendingReq)) { + Logger.trace("Build GUI for mandate-service selection ..."); + + IGUIBuilderConfiguration config = new ServiceProviderSpecificGUIFormBuilderConfiguration( + pendingReq, + ELGAMandatesAuthConstants.TEMPLATE_MANDATE_SERVICE_SELECTION, + GeneralProcessEngineSignalController.ENDPOINT_GENERIC); + + guiBuilder.build(response, config, "Mandate-Service selection"); + + Logger.debug("GUI for mandate-service selection is generated. Wait for user interaction ... "); + + } else { + //service-provider does not allow ELGA-mandates --> switch to MIS mandate-service + Logger.debug("Service-Provider does not allow ELGA Mandate-Service. --> Select MIS Mandate-Service as Default."); + executionContext.put(MOAIDAuthConstants.PARAM_USEMISMANDATE, true); + + } + + } catch (GUIBuildException e) { + Logger.warn("Can not build GUI:'Mandate-Service selection'. Msg:" + e.getMessage()); + throw new TaskExecutionException(pendingReq, + "Can not build GUI. Msg:" + e.getMessage(), + new MOAIDException("builder.09", new Object[]{e.getMessage()}, e)); + + } catch (Exception e) { + Logger.info("Mandate-Service selection: General Exception. Msg:" + e.getMessage()); + throw new TaskExecutionException(pendingReq, "ELGA mandate-service: General Exception.", e); + + } + + } + +} diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateUtils.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateUtils.java new file mode 100644 index 000000000..03f8fa195 --- /dev/null +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateUtils.java @@ -0,0 +1,59 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.elgamandates.utils; + +import java.util.List; + +import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.IRequest; +import at.gv.egovernment.moa.id.commons.utils.KeyValueUtils; + +/** + * @author tlenz + * + */ +public class ELGAMandateUtils { + /** + * Check Service-Provider mandate-profiles against allowed mandate-profiles for ELGA MandateService. + * + * @return true, if ELGA mandateservice is allowed, otherwise false + */ + public static boolean checkServiceProviderAgainstELGAModulConfigration(AuthConfiguration authConfig, IRequest pendingReq) { + String allowedMandateTypesCSV = + authConfig.getBasicMOAIDConfiguration(ELGAMandatesAuthConstants.CONFIG_PROPS_ALLOWED_MANDATE_TYPES); + List allowedMandateTypes = KeyValueUtils.getListOfCSVValues(allowedMandateTypesCSV); + List spMandateProfiles = pendingReq.getOnlineApplicationConfiguration().getMandateProfiles(); + + boolean isELGAMandateServiceAllowed = false; + if (spMandateProfiles != null) { + for (String el : allowedMandateTypes) { + if (spMandateProfiles.contains(el)) + isELGAMandateServiceAllowed = true; + + } + } + + return isELGAMandateServiceAllowed; + } +} diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/at/gv/egovernment/moa/id/auth/modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml b/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/at/gv/egovernment/moa/id/auth/modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml index 8cd08d226..23edac7ca 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/at/gv/egovernment/moa/id/auth/modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/at/gv/egovernment/moa/id/auth/modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml @@ -5,7 +5,7 @@ - National authentication with Austrian Citizen Card and mobile signature with our without mandate. - Legacy authentication for foreign citizens using MOCCA supported signature cards. --> - + @@ -18,6 +18,8 @@ + + @@ -25,9 +27,9 @@ - + - + @@ -43,10 +45,17 @@ - - + + + + + + + + + diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/moaid_elga_mandate_client_auth.beans.xml b/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/moaid_elga_mandate_client_auth.beans.xml index c1abe78df..cbc4e65c1 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/moaid_elga_mandate_client_auth.beans.xml +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/moaid_elga_mandate_client_auth.beans.xml @@ -26,11 +26,15 @@ - - + + + -- cgit v1.2.3 From 599237932cc7415bd3410456d289d90c28a38405 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 12:02:02 +0100 Subject: fix path problem in GUI form-builder --- .../auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java | 5 ++++- .../egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'id/server') diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java index 71a4837d4..52c1f0f97 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java @@ -50,7 +50,10 @@ public abstract class AbstractGUIFormBuilderConfiguration implements IGUIBuilder * */ public AbstractGUIFormBuilderConfiguration(String authURL, String viewName, String formSubmitEndpoint) { - this.viewName = viewName; + if (viewName.startsWith("/")) + this.viewName = viewName.substring(1); + else + this.viewName = viewName; if (authURL.endsWith("/")) this.authURL = authURL.substring(0, authURL.length() - 1); diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java index 862c7edcf..94fa4d977 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java @@ -55,8 +55,8 @@ import at.gv.egovernment.moa.util.MiscUtil; public class GUIFormBuilderImpl implements IGUIFormBuilder { private static final String DEFAULT_CONTENT_TYPE = "text/html;charset=UTF-8"; - private static final String CONFIG_HTMLTEMPLATES_DIR = "htmlTemplates"; - private static final String CLASSPATH_HTMLTEMPLATES_DIR = "templates"; + private static final String CONFIG_HTMLTEMPLATES_DIR = "htmlTemplates/"; + private static final String CLASSPATH_HTMLTEMPLATES_DIR = "templates/"; @Autowired private AuthConfiguration authConfig; private VelocityEngine engine; -- cgit v1.2.3 From 0000acfdc7ca31b9ba2d2956c0ce36c4146c3033 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 12:02:19 +0100 Subject: fix typo --- .../java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java | 2 +- .../builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java index f39421a21..d9386d404 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java @@ -110,7 +110,7 @@ public class RedirectServlet { null); config.putCustomParameter(URL, url); config.putCustomParameter(TARGET, redirectTarget); - guiBuilder.build(resp, config, "RedirectForm"); + guiBuilder.build(resp, config, "RedirectForm.html"); } else if (MiscUtil.isNotEmpty(interIDP)) { //store IDP identifier and redirect to generate AuthRequst service diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java index 73a0e7691..a77b2f7e0 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java @@ -47,8 +47,8 @@ public class ServiceProviderSpecificGUIFormBuilderConfiguration extends Abstract public static final String VIEW_TEMPLATE_JS = "/javascript_tempalte.js"; public static final String PARAM_BKU_ONLINE = "bkuOnline"; - public static final String PARAM_BKU_HANDY = "bkuLocal"; - public static final String PARAM_BKU_LOCAL = "bkuHandy"; + public static final String PARAM_BKU_HANDY = "bkuHandy"; + public static final String PARAM_BKU_LOCAL = "bkuLocal"; public static final String PARAM_OANAME = "OAName"; public static final String PARAM_COUNTRYLIST = "countryList"; -- cgit v1.2.3 From a5c361d60ab4103026cdaac1818ecec52611be5d Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 12:19:07 +0100 Subject: change Base64 decoder implementation --- .../moa/id/auth/parser/InfoboxReadResponseParser.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java index 28ce69e95..31c91cd40 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java @@ -46,9 +46,8 @@ package at.gv.egovernment.moa.id.auth.parser; -import iaik.x509.X509Certificate; - import java.io.ByteArrayInputStream; +import java.io.IOException; import java.io.InputStream; import java.security.cert.CertificateException; @@ -57,7 +56,6 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.TransformerException; -import org.apache.axis.encoding.Base64; import org.apache.xpath.XPathAPI; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -66,9 +64,11 @@ import at.gv.egovernment.moa.id.auth.data.IdentityLink; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.exception.BKUException; import at.gv.egovernment.moa.id.auth.exception.ParseException; +import at.gv.egovernment.moa.util.Base64Utils; import at.gv.egovernment.moa.util.Constants; import at.gv.egovernment.moa.util.DOMUtils; import at.gv.egovernment.moa.util.XPathUtils; +import iaik.x509.X509Certificate; /** * Parses an <InfoboxReadResponse>. @@ -256,16 +256,14 @@ public class InfoboxReadResponseParser { String base64Content = DOMUtils.getText(base64ContentElement); - // Decode Base64 value to X509Certificate - byte[] content = Base64.decode(base64Content); + // Decode Base64 value to X509Certificate + byte[] content = Base64Utils.decode(base64Content, false); return new X509Certificate(content); - } catch (ParserConfigurationException e) { - throw new ParseException("parser.01", new Object[] { "Could not parse X509Certificate from InfoboxReadRequest."}, e); - } catch (TransformerException e) { - throw new ParseException("parser.01", new Object[] { "Could not parse X509Certificate from InfoboxReadRequest."}, e); - } catch (CertificateException e) { + } catch (ParserConfigurationException | TransformerException | + CertificateException | IOException e) { throw new ParseException("parser.01", new Object[] { "Could not parse X509Certificate from InfoboxReadRequest."}, e); + } } -- cgit v1.2.3 From 9b1c1a0ec916bd7dd19b536f98276f25c8848153 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 12:21:04 +0100 Subject: switch to SAML2 'well-known-location' method as preferred solution to initalize ELGA mandate-service metadata-provider --- .../elgamandates/ELGAMandatesAuthModuleImpl.java | 2 +- .../elgamandates/tasks/RequestELGAMandateTask.java | 10 ++++ .../utils/ELGAMandateServiceMetadataProvider.java | 59 ++++++++++++++-------- 3 files changed, 48 insertions(+), 23 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthModuleImpl.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthModuleImpl.java index 753d3336c..c2efe5bfc 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthModuleImpl.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthModuleImpl.java @@ -57,7 +57,7 @@ public class ELGAMandatesAuthModuleImpl extends DefaultCitizenCardAuthModuleImpl //check if BKU authentication is selected and ELGA-MandateService is configurated if (MiscUtil.isNotEmpty(selectedProcessID)) { if (MiscUtil.isNotEmpty(authConfig.getBasicMOAIDConfiguration( - ELGAMandatesAuthConstants.CONFIG_PROPS_METADATAURL))) + ELGAMandatesAuthConstants.CONFIG_PROPS_ENTITYID))) return "DefaultAuthenticationWithELGAMandates"; } diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java index 26fd5fe5b..5d98eb46e 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java @@ -82,6 +82,16 @@ public class RequestELGAMandateTask extends AbstractAuthServletTask { } + //load metadata with metadataURL, as backup + String metadataURL = authConfig.getBasicMOAIDConfiguration(ELGAMandatesAuthConstants.CONFIG_PROPS_METADATAURL); + if (MiscUtil.isNotEmpty(metadataURL)) { + Logger.warn("Use not recommended metadata-provider initialization!" + + " SAML2 'Well-Known-Location' is the preferred methode."); + Logger.info("Initialize ELGA Mandate-Service metadata-provider with URL:" + metadataURL); + metadataService.initialize(metadataURL); + + } + //load IDP SAML2 entitydescriptor EntityDescriptor entityDesc = metadataService.getEntityDescriptor(elgaMandateServiceEntityID); diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateServiceMetadataProvider.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateServiceMetadataProvider.java index 1c564b20d..c9485104b 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateServiceMetadataProvider.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/utils/ELGAMandateServiceMetadataProvider.java @@ -57,6 +57,19 @@ public class ELGAMandateServiceMetadataProvider extends SimpleMOAMetadataProvide private HTTPMetadataProvider metadataProvider = null; + + public void initialize(String metadataURL) throws MetadataProviderException { + if (metadataProvider == null) { + internalInitialize(metadataURL); + + } else { + Logger.info("ELGA Mandate-Service metadata-provider is already initialized."); + + } + + } + + /* (non-Javadoc) * @see org.opensaml.saml2.metadata.provider.MetadataProvider#requireValidMetadata() */ @@ -138,7 +151,7 @@ public class ELGAMandateServiceMetadataProvider extends SimpleMOAMetadataProvide @Override public EntityDescriptor getEntityDescriptor(String entityID) throws MetadataProviderException { if (metadataProvider == null) - initialize(entityID); + internalInitialize(entityID); try { EntityDescriptor entityDesc = metadataProvider.getEntityDescriptor(entityID); @@ -162,7 +175,7 @@ public class ELGAMandateServiceMetadataProvider extends SimpleMOAMetadataProvide @Override public List getRole(String entityID, QName roleName) throws MetadataProviderException { if (metadataProvider == null) - initialize(entityID); + internalInitialize(entityID); return metadataProvider.getRole(entityID, roleName); } @@ -174,35 +187,37 @@ public class ELGAMandateServiceMetadataProvider extends SimpleMOAMetadataProvide public RoleDescriptor getRole(String entityID, QName roleName, String supportedProtocol) throws MetadataProviderException { if (metadataProvider == null) - initialize(entityID); + internalInitialize(entityID); return metadataProvider.getRole(entityID, roleName, supportedProtocol); } - private void initialize(String entityID) throws MetadataProviderException { - Logger.info("Initialize PVP MetadataProvider to connect ELGA Mandate-Service"); + private synchronized void internalInitialize(String metdataURL) throws MetadataProviderException { + if (metadataProvider == null) { + Logger.info("Initialize PVP MetadataProvider to connect ELGA Mandate-Service"); - String trustProfileID = authConfig.getBasicMOAIDConfiguration(ELGAMandatesAuthConstants.CONFIG_PROPS_METADATA_TRUSTPROFILE); - if (MiscUtil.isEmpty(trustProfileID)) { - Logger.error("Create ELGA Mandate-Service Client FAILED: No trustProfileID to verify PVP metadata." ); - throw new MetadataProviderException("No trustProfileID to verify PVP metadata."); - } + String trustProfileID = authConfig.getBasicMOAIDConfiguration(ELGAMandatesAuthConstants.CONFIG_PROPS_METADATA_TRUSTPROFILE); + if (MiscUtil.isEmpty(trustProfileID)) { + Logger.error("Create ELGA Mandate-Service Client FAILED: No trustProfileID to verify PVP metadata." ); + throw new MetadataProviderException("No trustProfileID to verify PVP metadata."); + } - //create metadata validation filter chain - MetadataFilterChain filter = new MetadataFilterChain(); - filter.addFilter(new SchemaValidationFilter(true)); - filter.addFilter(new MOASPMetadataSignatureFilter(trustProfileID)); + //create metadata validation filter chain + MetadataFilterChain filter = new MetadataFilterChain(); + filter.addFilter(new SchemaValidationFilter(true)); + filter.addFilter(new MOASPMetadataSignatureFilter(trustProfileID)); - metadataProvider = createNewHTTPMetaDataProvider(entityID, - filter, - ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING); + metadataProvider = createNewHTTPMetaDataProvider(metdataURL, + filter, + ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING); - if (metadataProvider == null) { - Logger.error("Create ELGA Mandate-Service Client FAILED."); - throw new MetadataProviderException("Can not initialize ELGA Mandate-Service metadaa provider."); + if (metadataProvider == null) { + Logger.error("Create ELGA Mandate-Service Client FAILED."); + throw new MetadataProviderException("Can not initialize ELGA Mandate-Service metadaa provider."); - } + } - metadataProvider.setRequireValidMetadata(true); + metadataProvider.setRequireValidMetadata(true); + } } } -- cgit v1.2.3 From 92f96ecea60ab96ec5fe3875ef75fbadea28f735 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 12:23:26 +0100 Subject: fix error in process-definition --- .../modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/at/gv/egovernment/moa/id/auth/modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml b/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/at/gv/egovernment/moa/id/auth/modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml index 23edac7ca..4dee1160e 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/at/gv/egovernment/moa/id/auth/modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/at/gv/egovernment/moa/id/auth/modules/elgamandates/DefaultAuth_with_ELGA_mandates.process.xml @@ -5,7 +5,7 @@ - National authentication with Austrian Citizen Card and mobile signature with our without mandate. - Legacy authentication for foreign citizens using MOCCA supported signature cards. --> - -- cgit v1.2.3 From a047562d8b08f359620d321c83aafccb02896474 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 14:14:02 +0100 Subject: update template for mandate-service selection --- .../htmlTemplates/mandate-service-selection.html | 76 ++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 id/server/data/deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html new file mode 100644 index 000000000..b0be4a475 --- /dev/null +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html @@ -0,0 +1,76 @@ + + + + + + + + Anmeldung an Online-Applikation + + + + +
              + +
              + + + +
              + +
              +
              +

              + Anmeldeinformationen: +

              +
              + +
              +

              Anmeldung an: $OAName

              + + +
              +

              Für die Anmeldung 'in Vertretung' stehen Ihnen zwei Systeme zur Vollmachtenauswahl zur Verfügung. Bitte wählen Sie das gewünschte Service.

              +
              + +
              +
              +
              + + + +
              +
              +

              Eltern-Kind Vertretung

              +
              +
              +
              +
              + + + +
              +
              +

              Vollmachtenservice der Österreichischen Datenschutzbehörde (MMS Service)

              +
              +
              +
              +
              + + +
              +
              +

              Den Anmeldevorgang abbrechen

              +
              +
              +
              + +
              +
              + + +
              +
              +
              + + -- cgit v1.2.3 From 6701d8aaca715133cfa9d7764eb2f1ed163dfce9 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 14:14:24 +0100 Subject: update statuscodes and revisionslog codes --- .../conf/moa-id/htmlTemplates/css_template.css | 43 +++++++++++- .../conf/moa-id/htmlTemplates/loginFormFull.html | 4 +- id/server/doc/handbook/additional/additional.html | 25 +++++++ id/server/doc/handbook/protocol/protocol.html | 45 +++++++++++-- .../resources/properties/id_messages_de.properties | 1 - .../protocol_response_statuscodes_de.properties | 45 ++++++------- .../src/main/resources/templates/css_template.css | 43 +++++++++++- .../templates/mandate-service-selection.html | 76 ++++++++++++++-------- 8 files changed, 222 insertions(+), 60 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css b/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css index a8735be60..32b9dee12 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css @@ -59,7 +59,7 @@ /* clear:both; */ position:relative; margin: 0 auto; - width: 250px; + /*width: 250px;*/ text-align: center; } @@ -85,7 +85,8 @@ #leftcontent { width: 300px; - margin-top: 30px; + /*margin-top: 30px;*/ + margin: auto; } #bku_header { @@ -622,4 +623,42 @@ #alert_area { width: 500px; padding-left: 80px; + } + + #processInfoArea { + margin-bottom: 15px; + margin-top: 15px; + } + #processSelectionArea { + width: 550px; + margin-left: 25px; + margin-top: 35px; + } + .processSelectionButtonArea { + float: none; + margin-bottom: 20px; + height: 35px; + } + .processSelectionButton { + background: #ababab; + cursor: pointer; + height: 30px; + width: 200px; + float: right; + border-style: solid; + border-bottom-width: 2px; + border-right-width: 2px; + border-left-width: 1px; + border-top-width: 1px; + border-color: #000000; + } + .buttonDescription { + float: left; + margin-left: 10px; + padding-top: 4px; + text-align: left; + width: 330px; + } + #processContent { + margin-top: 25px; } \ No newline at end of file diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html index 02b86472b..983e8b544 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html @@ -63,9 +63,9 @@
- +

Home Country Selection

diff --git a/id/server/doc/handbook/additional/additional.html b/id/server/doc/handbook/additional/additional.html index fb9735990..cbf4a50c9 100644 --- a/id/server/doc/handbook/additional/additional.html +++ b/id/server/doc/handbook/additional/additional.html @@ -520,6 +520,31 @@

baseID

Stammzahl der vertretenen juristischen Person

+ +   +   +   + + + 6000 + ReferenceID des Vollmachtensystems + externes Vollmachten Service kontaktiert + + + 6001 +   + gültige Vollmacht vom externen Vollmachten Service verarbeitet + + + 6002 +   + Fehler vom externen Vollmachten Service verarbeitet + + + 6003 + IP Adresse + IP Adresse mit der das externe Vollmachten Service die Vollmacht ausgeliefert hat +

 

Einzelne Events werden um einen Transaktionsparameter ergänzt, welcher in der Spalte Wert beschrieben ist.
diff --git a/id/server/doc/handbook/protocol/protocol.html b/id/server/doc/handbook/protocol/protocol.html index a3a06bc6d..3b31dbfc0 100644 --- a/id/server/doc/handbook/protocol/protocol.html +++ b/id/server/doc/handbook/protocol/protocol.html @@ -559,6 +559,10 @@ Redirect Binding 1007 Vollmachtsmodus für ausländische Personen wird nicht unterstützt. + + 1008 + Es konnten nicht alle minimal erforderlichen Identifikations- oder Authentifikationsmerkmale ermittelt werden. +

1.3.1.2 Validierung (11xxx)
@@ -691,24 +695,51 @@ Redirect Binding
1.3.2.4 MOA SP/SS(43xxx)
- - + +
StatuscodeBeschreibungStatuscodeBeschreibung
4300 Fehler beim Aufruf von MOA SP/SS
-
1.3.2.5 Interfederation (44xxx)
+
1.3.2.5 Interfederation (44xx)
- - + + + + + + +
StatuscodeBeschreibungStatuscodeBeschreibung
4400 Fehler beim Generieren der Anmeldedaten
4401Die Verwendung des angeforderten federated IDP ist nicht erlaubt
+
1.3.2.6 Attributprovider (45xx)
+ + + + + + + + + + + + + + + + + + + + +
StatuscodeBeschreibung
4500Der Zugriff auf einen Attributprovider ist nicht erlaubt
4501Die Requestgenerierung für den Zugriff auf den Attributprovider schlug fehl
4502Die Response vom Attributeprovider ist ungültig oder nicht errlaubt
4503Die Response vom Attributeprovider beinhaltet einen Fehlercode

1.3.3 Statuscodes 6xxxx

Alles Statuscodes beginnend mit der Zahl sechs beschreiben protokollspezifische Fehler die nicht durch das jeweilige Authentifizierungsprotokoll abgebildet werden.

@@ -843,6 +874,10 @@ Redirect Binding 9103 Fehler bei der Verarbeitung eines Templates + + 9104 + Fehler bei der Auswahl oder Initialisierung des gewünschten Anmeldeprozesses + 9199 Allgemeiner interner Fehler diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index 86aa13fb8..c47ec2477 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -118,7 +118,6 @@ service.06=Allgemeiner Fehler beim Anfragen des Online-Vollmachten Service service.07=Der SZR-Gateway ist unter {0} nicht erreichbar. service.08=Die Eintragung der ausländischen Person am SZR-Gateway ist fehlgeschlagen. service.09=Der SZR-Gateway Client konnte nicht initialisiert werden. - service.10=Die Verwendung des Service {0} ist nicht m\u00f6glich. Ursache: {1} cleaner.00=AuthenticationSessionCleaner wurde gestartet diff --git a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties index 27070cc84..581037a29 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties @@ -28,10 +28,10 @@ auth.27=4401 auth.28=1100 auth.29=4401 auth.30=1110 -auth.31=TODO -auth.32=TODO -auth.33=TODO -auth.34=TODO +auth.31=4400 +auth.32=4401 +auth.33=4401 +auth.34=4401 init.00=9199 init.01=9199 @@ -85,7 +85,8 @@ builder.04=Die Personenbindung konnte nicht neu signiert werden und wird aus die builder.05=Beim resignieren der Personenbindung ist ein allgemeiner Fehler aufgetreten und wird aus diesem Grund nicht ausgeliefert. builder.06=4400 builder.07=9002 -builder.08=TODO +builder.08=1008 +builder.09=9103 service.00=4300 service.03=4300 @@ -96,23 +97,23 @@ service.07=4200 service.08=4201 service.09=9007 -service.10=TODO +service.10=4500 -process.01=TODO -process.02=TODO +process.01=9104 +process.02=9104 -sp.pvp2.00=TODO -sp.pvp2.01=TODO -sp.pvp2.02=TODO -sp.pvp2.03=TODO -sp.pvp2.04=TODO -sp.pvp2.05=TODO -sp.pvp2.06=TODO -sp.pvp2.07=TODO -sp.pvp2.08=TODO -sp.pvp2.09=TODO -sp.pvp2.10=TODO -sp.pvp2.11=TODO +sp.pvp2.00=4501 +sp.pvp2.01=4501 +sp.pvp2.02=4501 +sp.pvp2.03=4502 +sp.pvp2.04=4502 +sp.pvp2.05=4503 +sp.pvp2.06=4502 +sp.pvp2.07=4502 +sp.pvp2.08=4502 +sp.pvp2.09=4503 +sp.pvp2.10=4502 +sp.pvp2.11=4502 validator.00=1102 validator.01=1102 @@ -182,8 +183,8 @@ validator.69=1106 validator.70=1106 validator.71=1105 -validator.72=TODO -validator.73=TODO +validator.72=1105 +validator.73=4500 ssl.01=1107 diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css index a8735be60..32b9dee12 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css @@ -59,7 +59,7 @@ /* clear:both; */ position:relative; margin: 0 auto; - width: 250px; + /*width: 250px;*/ text-align: center; } @@ -85,7 +85,8 @@ #leftcontent { width: 300px; - margin-top: 30px; + /*margin-top: 30px;*/ + margin: auto; } #bku_header { @@ -622,4 +623,42 @@ #alert_area { width: 500px; padding-left: 80px; + } + + #processInfoArea { + margin-bottom: 15px; + margin-top: 15px; + } + #processSelectionArea { + width: 550px; + margin-left: 25px; + margin-top: 35px; + } + .processSelectionButtonArea { + float: none; + margin-bottom: 20px; + height: 35px; + } + .processSelectionButton { + background: #ababab; + cursor: pointer; + height: 30px; + width: 200px; + float: right; + border-style: solid; + border-bottom-width: 2px; + border-right-width: 2px; + border-left-width: 1px; + border-top-width: 1px; + border-color: #000000; + } + .buttonDescription { + float: left; + margin-left: 10px; + padding-top: 4px; + text-align: left; + width: 330px; + } + #processContent { + margin-top: 25px; } \ No newline at end of file diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html index a9f0c4238..b0be4a475 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html @@ -17,36 +17,60 @@
-
-
-

- Anmeldeinformationen: -

-
+ +
+
+

+ Anmeldeinformationen: +

+
-
-

Anmeldung an: $OAName

- - -
-
- - - -
-
-
+
+

Anmeldung an: $OAName

+ + +
+

Für die Anmeldung 'in Vertretung' stehen Ihnen zwei Systeme zur Vollmachtenauswahl zur Verfügung. Bitte wählen Sie das gewünschte Service.

+
+ +
+
+
+ + + +
+
+

Eltern-Kind Vertretung

+
+
+
+
+ + + +
+
+

Vollmachtenservice der Österreichischen Datenschutzbehörde (MMS Service)

+
+
+
- - - -
-
- -
+ + + +
+

Den Anmeldevorgang abbrechen

+
+
+
+ +
+
+ +
-
-- cgit v1.2.3 From 8f5e8a21a7087061d16aae2e592b7d196d8a08e3 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 15 Mar 2016 09:03:37 +0100 Subject: fix typos in GUIBuilder --- .../egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java | 5 ++--- .../ServiceProviderSpecificGUIFormBuilderConfiguration.java | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java index 09b344f9d..babc87866 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java @@ -35,7 +35,6 @@ import org.springframework.web.bind.annotation.RequestMethod; import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; import at.gv.egovernment.moa.id.auth.frontend.builder.ServiceProviderSpecificGUIFormBuilderConfiguration; -import at.gv.egovernment.moa.id.auth.servlet.AbstractController; import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.commons.api.IRequest; @@ -106,13 +105,13 @@ public class GUILayoutBuilderServlet extends AbstractController { config = new ServiceProviderSpecificGUIFormBuilderConfiguration( pendingReq, ServiceProviderSpecificGUIFormBuilderConfiguration.VIEW_TEMPLATE_JS, - null); + GeneralProcessEngineSignalController.ENDPOINT_BKUSELECTION_EVALUATION); else config = new ServiceProviderSpecificGUIFormBuilderConfiguration( HTTPUtils.extractAuthURLFromRequest(req), ServiceProviderSpecificGUIFormBuilderConfiguration.VIEW_TEMPLATE_JS, - null); + GeneralProcessEngineSignalController.ENDPOINT_BKUSELECTION_EVALUATION); //build GUI component formBuilder.build(resp, config, "text/javascript;charset=UTF-8", "JavaScript"); diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java index a77b2f7e0..0a5cdaf3e 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/ServiceProviderSpecificGUIFormBuilderConfiguration.java @@ -41,10 +41,10 @@ import at.gv.egovernment.moa.util.MiscUtil; */ public class ServiceProviderSpecificGUIFormBuilderConfiguration extends AbstractGUIFormBuilderConfiguration { - public static final String VIEW_BKUSELECTION = "/loginFormFull.html"; - public static final String VIEW_SENDASSERTION = "/sendAssertionFormFull.html"; - public static final String VIEW_TEMPLATE_CSS = "/css_template.css"; - public static final String VIEW_TEMPLATE_JS = "/javascript_tempalte.js"; + public static final String VIEW_BKUSELECTION = "loginFormFull.html"; + public static final String VIEW_SENDASSERTION = "sendAssertionFormFull.html"; + public static final String VIEW_TEMPLATE_CSS = "css_template.css"; + public static final String VIEW_TEMPLATE_JS = "javascript_tempalte.js"; public static final String PARAM_BKU_ONLINE = "bkuOnline"; public static final String PARAM_BKU_HANDY = "bkuHandy"; -- cgit v1.2.3 From 428cfea80ba50ce3835d70c0329add9354a70e2e Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 15 Mar 2016 09:04:05 +0100 Subject: add log message into PVP AssertionBuilder --- .../id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java index 3ca6a64e0..68301d000 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java @@ -282,7 +282,8 @@ public class PVP2AssertionBuilder implements PVPConstants { String bpk = null; Element mandate = authData.getMandate(); - if(mandate != null) { + if(mandate != null) { + Logger.debug("Read mandator bPK|baseID from full-mandate ... "); Mandate mandateObject = MandateBuilder.buildMandate(mandate); if(mandateObject == null) { throw new NoMandateDataAvailableException(); @@ -307,7 +308,7 @@ public class PVP2AssertionBuilder implements PVPConstants { bpk = id.getValue().getValue(); } else { - Logger.debug("Read mandatpr bPK|baseID from PVP attributes ... "); + Logger.debug("Read mandator bPK|baseID from PVP attributes ... "); bpk = authData.getGenericData(PVPConstants.MANDATE_NAT_PER_SOURCE_PIN_NAME, String.class); bpktype = authData.getGenericData(PVPConstants.MANDATE_NAT_PER_SOURCE_PIN_TYPE_NAME, String.class); -- cgit v1.2.3 From 6d441ed66758a148ca04096d2c42cd8b12446215 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 15 Mar 2016 09:25:08 +0100 Subject: fix some template issues --- .../data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js | 6 +++--- id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js index e4e05bace..eadb65b2b 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js @@ -43,7 +43,7 @@ function isIE() { var iFrameURL = "$contextPath$submitEndpoint" + "?"; iFrameURL += "&pendingid=" + "$pendingReqID"; - iFrameURL += "bkuURI=" + "$bkuOnline"; + iFrameURL += "&bkuURI=" + "$bkuOnline"; iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; generateIFrame(iFrameURL); @@ -59,7 +59,7 @@ function isIE() { var iFrameURL = "$contextPath$submitEndpoint" + "?"; iFrameURL += "&pendingid=" + "$pendingReqID"; - iFrameURL += "bkuURI=" + "$bkuHandy"; + iFrameURL += "&bkuURI=" + "$bkuHandy"; iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; generateIFrame(iFrameURL); @@ -81,7 +81,7 @@ function isIE() { iFrameURL += "&pendingid=" + "$pendingReqID"; #if($bkuOnline) - iFrameURL += "bkuURI=" + "$bkuOnline"; + iFrameURL += "&bkuURI=" + "$bkuOnline"; #end iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html index 983e8b544..02b86472b 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html @@ -63,9 +63,9 @@
-
+

Home Country Selection

-- cgit v1.2.3 From 85fd483e113d5a03088d5b8008cef21c83eacd8c Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 15 Mar 2016 09:25:35 +0100 Subject: update history, readme, and default configuration --- .../data/deploy/conf/moa-id/moa-id.properties | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/moa-id.properties b/id/server/data/deploy/conf/moa-id/moa-id.properties index 09568ce68..964fe0646 100644 --- a/id/server/data/deploy/conf/moa-id/moa-id.properties +++ b/id/server/data/deploy/conf/moa-id/moa-id.properties @@ -138,6 +138,35 @@ advancedlogging.hibernate.c3p0.max_statements=0 advancedlogging.hibernate.c3p0.min_size=3 +################ Additonal eID-modul configuration #################################### +## This additional eID moduls add special functionality to MOA-ID-Auth. +## The configuration of this modules is only needed if this modules are in use. +######## +### HBV Mandate-Service client module ### +modules.elga_mandate.nameID.target=urn:publicid:gv.at:cdid+GH +modules.elga_mandate.service.entityID= +modules.elga_mandate.service.metadata.trustprofileID= +modules.elga_mandate.service.mandateprofiles= +modules.elga_mandate.keystore.path=keys/moa_idp[password].p12 +modules.elga_mandate.keystore.password=password +modules.elga_mandate.metadata.sign.alias=pvp_metadata +modules.elga_mandate.metadata.sign.password=password +modules.elga_mandate.request.sign.alias=pvp_assertion +modules.elga_mandate.request.sign.password=password +modules.elga_mandate.response.encryption.alias=pvp_assertion +modules.elga_mandate.response.encryption.password=password + +### SSO Interfederation client module ### +modules.federatedAuth.keystore.path=keys/moa_idp[password].p12 +modules.federatedAuth.keystore.password=password +modules.federatedAuth.metadata.sign.alias=pvp_metadata +modules.federatedAuth.metadata.sign.password=password +modules.federatedAuth.request.sign.alias=pvp_assertion +modules.federatedAuth.request.sign.password=password +modules.federatedAuth.response.encryption.alias=pvp_assertion +modules.federatedAuth.response.encryption.password=password + + ################SZR Client configuration#################################### ## The SZR client is only required if MOA-ID-Auth should be ## use as STORK <-> PVP Gateway. @@ -163,4 +192,4 @@ service.egovutil.szr.ssl.truststore.file= service.egovutil.szr.ssl.truststore.password= service.egovutil.szr.ssl.truststore.type= service.egovutil.szr.ssl.trustall=false -service.egovutil.szr.ssl.laxhostnameverification=false \ No newline at end of file +service.egovutil.szr.ssl.laxhostnameverification=false \ No newline at end of file -- cgit v1.2.3 From e03689468de9aaa0bd2b3234b8e6842988a29684 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 15 Mar 2016 10:43:39 +0100 Subject: change PVP EntityID to metadata-URL (SAML2 'well-known-location' method) --- .../moa/id/protocols/pvp2x/AttributQueryAction.java | 8 ++++---- .../moa/id/protocols/pvp2x/AuthenticationAction.java | 12 ++++++++---- .../protocols/pvp2x/config/IDPPVPMetadataConfiguration.java | 9 ++++++++- .../id/auth/modules/ssotransfer/utils/SSOContainerUtils.java | 6 +++--- 4 files changed, 23 insertions(+), 12 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/AttributQueryAction.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/AttributQueryAction.java index f992737b6..2168316ab 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/AttributQueryAction.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/AttributQueryAction.java @@ -61,6 +61,7 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.binding.SoapBinding; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.AuthResponseBuilder; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.PVPAttributeBuilder; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.assertion.PVP2AssertionBuilder; +import at.gv.egovernment.moa.id.protocols.pvp2x.config.PVPConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.messages.MOARequest; import at.gv.egovernment.moa.id.protocols.pvp2x.metadata.MOAMetadataProvider; import at.gv.egovernment.moa.id.protocols.pvp2x.signer.IDPCredentialProvider; @@ -128,10 +129,9 @@ public class AttributQueryAction implements IAction { + " validTo:" + responseInfo.getSecond().toString()); //build PVP 2.1 assertion - - String issuerEntityID = pendingReq.getAuthURL(); - if (issuerEntityID.endsWith("/")) - issuerEntityID = issuerEntityID.substring(0, issuerEntityID.length()-1); + + String issuerEntityID = PVPConfiguration.getInstance().getIDPSSOMetadataService( + pendingReq.getAuthURL()); Assertion assertion = PVP2AssertionBuilder.buildAssertion(issuerEntityID, attrQuery, responseInfo.getFirst(), date, new DateTime(responseInfo.getSecond().getTime()), diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/AuthenticationAction.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/AuthenticationAction.java index 2d13609d8..8de44a2e8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/AuthenticationAction.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/AuthenticationAction.java @@ -49,6 +49,7 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.binding.PostBinding; import at.gv.egovernment.moa.id.protocols.pvp2x.binding.RedirectBinding; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.AuthResponseBuilder; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.assertion.PVP2AssertionBuilder; +import at.gv.egovernment.moa.id.protocols.pvp2x.config.PVPConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.BindingNotSupportedException; import at.gv.egovernment.moa.id.protocols.pvp2x.messages.MOARequest; import at.gv.egovernment.moa.id.protocols.pvp2x.metadata.MOAMetadataProvider; @@ -81,10 +82,13 @@ public class AuthenticationAction implements IAction { SLOInformationImpl sloInformation = new SLOInformationImpl(); //change to entity value from entity name to IDP EntityID (URL) - String issuerEntityID = pvpRequest.getAuthURL(); - if (issuerEntityID.endsWith("/")) - issuerEntityID = issuerEntityID.substring(0, issuerEntityID.length()-1); - +// String issuerEntityID = pvpRequest.getAuthURL(); +// if (issuerEntityID.endsWith("/")) +// issuerEntityID = issuerEntityID.substring(0, issuerEntityID.length()-1); + + String issuerEntityID = PVPConfiguration.getInstance().getIDPSSOMetadataService( + pvpRequest.getAuthURL()); + //build Assertion Assertion assertion = PVP2AssertionBuilder.buildAssertion(issuerEntityID, pvpRequest, authnRequest, authData, peerEntity, date, consumerService, sloInformation); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IDPPVPMetadataConfiguration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IDPPVPMetadataConfiguration.java index 91f43b10b..5bb1131a6 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IDPPVPMetadataConfiguration.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IDPPVPMetadataConfiguration.java @@ -97,7 +97,14 @@ public class IDPPVPMetadataConfiguration implements IPVPMetadataBuilderConfigura */ @Override public String getEntityID() { - return authURL; + try { + return PVPConfiguration.getInstance().getIDPSSOMetadataService(authURL); + + } catch (ConfigurationException e) { + Logger.error("Can not load Metadata entry: EntityID", e); + return null; + + } } /* (non-Javadoc) diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java index 5f2642cf8..9683d5cb7 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java @@ -97,6 +97,7 @@ import at.gv.egovernment.moa.id.data.MISMandate; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.PVPAttributeBuilder; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.assertion.PVP2AssertionBuilder; +import at.gv.egovernment.moa.id.protocols.pvp2x.config.PVPConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.AssertionAttributeExtractorExeption; import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.NoCredentialsException; import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.SAMLRequestNotSignedException; @@ -320,14 +321,13 @@ public class SSOContainerUtils { public String generateSignedAndEncryptedSSOContainer(String authURL, AuthenticationSession authSession, Date date) { try { - String entityID = authURL; + String entityID = PVPConfiguration.getInstance().getIDPSSOMetadataService(authURL); AuthnContextClassRef authnContextClassRef = SAML2Utils .createSAMLObject(AuthnContextClassRef.class); authnContextClassRef.setAuthnContextClassRef(authSession.getQAALevel()); NameID subjectNameID = SAML2Utils.createSAMLObject(NameID.class); - String random = Random.nextRandom(); - String nameID = subjectNameID.getValue(); + String random = Random.nextLongRandom(); try { MessageDigest md = MessageDigest.getInstance("SHA-1"); byte[] hash = md.digest((random).getBytes("ISO-8859-1")); -- cgit v1.2.3 From b9b9539464cf84c8c2e317ee94cc6f032fdd8cca Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 17 Mar 2016 07:56:26 +0100 Subject: add missing maven repo. for openSAML impl. jars --- id/server/moa-id-commons/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'id/server') diff --git a/id/server/moa-id-commons/pom.xml b/id/server/moa-id-commons/pom.xml index c722b265e..2fc72119e 100644 --- a/id/server/moa-id-commons/pom.xml +++ b/id/server/moa-id-commons/pom.xml @@ -23,6 +23,11 @@ local file:${basedir}/../../../repository + + shibboleth.internet2.edu + Internet2 + https://build.shibboleth.net/nexus/content/groups/public/ + hyberjaxb http://repository.highsource.org/maven2/releases/ -- cgit v1.2.3 From fd1f836eda8a6a7c4683dd6e0b1ba38e39a87148 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 17 Mar 2016 08:32:13 +0100 Subject: add missing eIDAS dependencies --- id/server/modules/moa-id-module-eIDAS/pom.xml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index b43efac9e..31e42b6c2 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -13,10 +13,32 @@ ${basedir}/../../../../repository eidas.1.0 - eidas.1.0 - + eidas.1.0 + + + default + + true + + + + local + local + file:${basedir}/../../../../repository + + + egiz-commons + https://demo.egiz.gv.at/int-repo/ + + true + + + + + + org.springframework -- cgit v1.2.3 From 988e345f81b0ac67037a756cfaaea87afa83b4a5 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 17 Mar 2016 09:22:16 +0100 Subject: problems with eIDAS dependencies --- id/server/modules/moa-id-module-eIDAS/pom.xml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 31e42b6c2..9e95301bd 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -13,7 +13,10 @@ ${basedir}/../../../../repository eidas.1.0 - eidas.1.0 + eidas.1.0 + eidas.1.0 + eidas.1.0 + @@ -69,6 +72,18 @@ + + + eu.eidas + eidas-configmodule + ${eidas-configmodule.version} + + + + eu.eidas + eidas-encryption + ${eidas-encryption.version} + -- cgit v1.2.3 From 27675f9fe8cfc38d2d1fb89d55865a6499761004 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 17 Mar 2016 17:12:55 +0100 Subject: removed stork2 modules for good --- id/server/pom.xml | 2 - id/server/stork2-commons/.gitignore | 2 - id/server/stork2-commons/Releases | 73 - id/server/stork2-commons/pom.xml | 220 -- .../peps/auth/commons/AttributeConstants.java | 70 - .../eu/stork/peps/auth/commons/AttributeName.java | 85 - .../stork/peps/auth/commons/AttributeProvider.java | 129 - .../peps/auth/commons/AttributeProvidersMap.java | 112 - .../stork/peps/auth/commons/AttributeSource.java | 197 - .../eu/stork/peps/auth/commons/AttributeUtil.java | 218 -- .../eu/stork/peps/auth/commons/CitizenConsent.java | 121 - .../java/eu/stork/peps/auth/commons/Country.java | 97 - .../eu/stork/peps/auth/commons/CountryCodes.java | 61 - .../java/eu/stork/peps/auth/commons/DateUtil.java | 160 - .../peps/auth/commons/IAttributeListProcessor.java | 203 -- .../peps/auth/commons/IAttributeProvidersMap.java | 88 - .../peps/auth/commons/IPersonalAttributeList.java | 198 - .../eu/stork/peps/auth/commons/IStorkLogger.java | 249 -- .../eu/stork/peps/auth/commons/IStorkSession.java | 84 - .../java/eu/stork/peps/auth/commons/Linker.java | 330 -- .../eu/stork/peps/auth/commons/PEPSErrors.java | 394 -- .../eu/stork/peps/auth/commons/PEPSParameters.java | 651 ---- .../java/eu/stork/peps/auth/commons/PEPSUtil.java | 392 -- .../eu/stork/peps/auth/commons/PEPSValues.java | 345 -- .../stork/peps/auth/commons/PersonalAttribute.java | 391 -- .../peps/auth/commons/PersonalAttributeList.java | 454 --- .../peps/auth/commons/STORKAttrQueryRequest.java | 452 --- .../peps/auth/commons/STORKAttrQueryResponse.java | 393 -- .../stork/peps/auth/commons/STORKAuthnRequest.java | 506 --- .../peps/auth/commons/STORKAuthnResponse.java | 405 --- .../peps/auth/commons/STORKLogoutRequest.java | 205 -- .../peps/auth/commons/STORKLogoutResponse.java | 281 -- .../stork/peps/auth/commons/STORKStatusCode.java | 67 - .../peps/auth/commons/STORKSubStatusCode.java | 67 - .../commons/exceptions/AbstractPEPSException.java | 177 - .../auth/commons/exceptions/CPEPSException.java | 146 - .../exceptions/InternalErrorPEPSException.java | 74 - .../exceptions/InvalidParameterPEPSException.java | 53 - .../exceptions/InvalidSessionPEPSException.java | 44 - .../commons/exceptions/SecurityPEPSException.java | 68 - .../commons/exceptions/StorkPEPSException.java | 51 - .../peps/auth/commons/exceptions/package-info.java | 7 - .../eu/stork/peps/auth/commons/package-info.java | 10 - .../eu/stork/peps/auth/specific/IAUService.java | 235 -- .../peps/auth/specific/ICheckAttributeValue.java | 37 - .../stork/peps/auth/specific/IDeriveAttribute.java | 39 - .../stork/peps/auth/specific/INormaliseValue.java | 35 - .../peps/auth/specific/ITranslatorService.java | 101 - .../eu/stork/peps/auth/specific/package-info.java | 8 - .../AdditionalInformationType.java | 90 - .../language/diplomasupplement/AddressType.java | 254 -- .../diplomasupplement/AttachedFileDataType.java | 112 - .../diplomasupplement/AttachedFileURLType.java | 114 - .../diplomasupplement/AttachedImageDataType.java | 112 - .../diplomasupplement/AttachedImageURLType.java | 114 - .../language/diplomasupplement/AttachedType.java | 170 - .../diplomasupplement/AttachmentsType.java | 74 - .../CertificationOfTheSupplementType.java | 115 - .../diplomasupplement/ContactInformationType.java | 158 - .../language/diplomasupplement/CountryType.java | 1420 -------- .../CourseStructureDiagramType.java | 90 - .../CourseUnitLanguageOfInstructionType.java | 90 - .../CourseUnitLanguagesOfInstructionType.java | 74 - .../CourseUnitStudentPerformanceType.java | 90 - .../language/diplomasupplement/CourseUnitType.java | 1003 ------ .../diplomasupplement/CourseUnitTypeType.java | 68 - .../CourseUnitWorkPlacementType.java | 140 - .../CourseUnitWorkPlacementsType.java | 74 - ...edInOtherInstitutionInMobilityProgramsType.java | 72 - .../diplomasupplement/CoursesGroupType.java | 171 - .../diplomasupplement/CoursesGroupsType.java | 146 - .../diplomasupplement/CoursesUnitsType.java | 74 - .../diplomasupplement/DiplomaSupplementType.java | 367 -- .../diplomasupplement/ECTSGradingScaleType.java | 90 - .../diplomasupplement/EHEAFrameworkType.java | 76 - .../diplomasupplement/ExtensionContentType.java | 102 - .../language/diplomasupplement/FamilyNameType.java | 74 - .../xsd/language/diplomasupplement/GenderType.java | 68 - .../language/diplomasupplement/GivenNameType.java | 74 - ...dingSchemeAndGradeDistributionGuidanceType.java | 90 - .../language/diplomasupplement/ImageMimeType.java | 92 - ...IdentifyingTheHolderOfTheQualificationType.java | 378 -- ...InformationIdentifyingTheQualificationType.java | 187 - ...formationOnTheContentsAndResultsGainedType.java | 221 -- ...rmationOnTheFunctionOfTheQualificationType.java | 148 - ...nformationOnTheLevelOfTheQualificationType.java | 355 -- .../diplomasupplement/InstitutionType.java | 407 --- .../language/diplomasupplement/LanguageType.java | 836 ----- .../LanguagesOfInstructionAndExaminationType.java | 158 - .../language/diplomasupplement/LocalGradeType.java | 223 -- .../xsd/language/diplomasupplement/MimeType.java | 108 - .../MobilityProgrammeCourseUnitType.java | 251 -- .../MobilityProgrammeCoursesUnitsType.java | 74 - .../diplomasupplement/MobilityProgrammeType.java | 319 -- .../diplomasupplement/ModeOfDeliveryType.java | 68 - .../diplomasupplement/ModeOfStudyType.java | 92 - .../MultilingualDiplomaSupplementType.java | 105 - .../NameAndStatusOfAwardingInstitutionType.java | 132 - ...tatusOfInstitutionAdministeringStudiesType.java | 132 - .../language/diplomasupplement/ObjectFactory.java | 647 ---- .../diplomasupplement/OfficialCertifyingType.java | 139 - .../diplomasupplement/OfficialStampType.java | 91 - .../diplomasupplement/OfficialsCertifyingType.java | 74 - .../diplomasupplement/ProgrammeDetailsType.java | 90 - .../ProgrammeRequirementsType.java | 90 - .../diplomasupplement/QualificationType.java | 139 - .../diplomasupplement/RichTextTagType.java | 182 - .../diplomasupplement/SourceGradeType.java | 76 - .../diplomasupplement/TitleConferredType.java | 66 - .../language/diplomasupplement/package-info.java | 10 - .../names/tc/stork/_1_0/assertion/AcTitleType.java | 83 - .../stork/_1_0/assertion/AttributeStatusType.java | 60 - .../stork/_1_0/assertion/CanonicalAddressType.java | 231 -- .../stork/_1_0/assertion/CurrentStudiesType.java | 179 - .../_1_0/assertion/DiplomaSupplementType.java | 185 - .../tc/stork/_1_0/assertion/Habilitation.java | 83 - .../tc/stork/_1_0/assertion/HabilitationType.java | 83 - .../stork/_1_0/assertion/HasAccountInBankType.java | 83 - .../tc/stork/_1_0/assertion/HasDegreeType.java | 156 - .../stork/_1_0/assertion/IsAcademicStaffType.java | 130 - .../tc/stork/_1_0/assertion/IsAdminStaffType.java | 83 - .../_1_0/assertion/IsCourseCoordinatorType.java | 83 - .../IsHealthCareProfessionalDeprecatedType.java | 131 - .../assertion/IsHealthCareProfessionalType.java | 154 - .../tc/stork/_1_0/assertion/IsStudentType.java | 129 - .../tc/stork/_1_0/assertion/IsTeacherOfType.java | 131 - .../stork/_1_0/assertion/MandateContentType.java | 276 -- .../names/tc/stork/_1_0/assertion/MandateType.java | 146 - .../tc/stork/_1_0/assertion/ObjectFactory.java | 488 --- .../stork/_1_0/assertion/OriginalMandateType.java | 84 - .../_1_0/assertion/RepresentationPersonType.java | 253 -- .../_1_0/assertion/RequestedAttributeType.java | 193 - .../stork/_1_0/assertion/TimeRestrictionType.java | 92 - .../assertion/TransactionLimitRestrictionType.java | 89 - .../tc/stork/_1_0/assertion/package-info.java | 10 - .../generaldiploma/AdditionalInformationType.java | 88 - .../_2_0/academic/generaldiploma/AddressType.java | 168 - .../generaldiploma/AttachedFileDataType.java | 110 - .../generaldiploma/AttachedFileURLType.java | 112 - .../generaldiploma/AttachedImageDataType.java | 110 - .../generaldiploma/AttachedImageURLType.java | 112 - .../_2_0/academic/generaldiploma/AttachedType.java | 168 - .../academic/generaldiploma/AttachmentsType.java | 72 - .../CertificationOfTheSupplementType.java | 113 - .../generaldiploma/ContactInformationType.java | 156 - .../generaldiploma/CountryTextCodeType.java | 86 - .../_2_0/academic/generaldiploma/CountryType.java | 240 -- .../generaldiploma/CourseStructureDiagramType.java | 88 - .../CourseUnitLanguageOfInstructionType.java | 86 - .../CourseUnitLanguagesOfInstructionType.java | 72 - .../CourseUnitStudentPerformanceType.java | 88 - .../academic/generaldiploma/CourseUnitType.java | 1045 ------ .../generaldiploma/CourseUnitTypeType.java | 58 - .../CourseUnitWorkPlacementType.java | 138 - .../CourseUnitWorkPlacementsType.java | 72 - ...edInOtherInstitutionInMobilityProgramsType.java | 72 - .../academic/generaldiploma/CoursesGroupType.java | 169 - .../academic/generaldiploma/CoursesGroupsType.java | 144 - .../academic/generaldiploma/CoursesUnitsType.java | 72 - .../generaldiploma/ECTSGradingScaleType.java | 50 - .../academic/generaldiploma/EHEAFrameworkType.java | 60 - .../generaldiploma/ExtensionContentType.java | 100 - .../academic/generaldiploma/FamilyNameType.java | 72 - .../_2_0/academic/generaldiploma/GenderType.java | 58 - .../generaldiploma/GeneralDiplomaType.java | 365 -- .../academic/generaldiploma/GivenNameType.java | 72 - ...dingSchemeAndGradeDistributionGuidanceType.java | 88 - .../academic/generaldiploma/ImageMimeType.java | 64 - ...IdentifyingTheHolderOfTheQualificationType.java | 292 -- ...InformationIdentifyingTheQualificationType.java | 185 - ...formationOnTheContentsAndResultsGainedType.java | 219 -- ...rmationOnTheFunctionOfTheQualificationType.java | 146 - ...nformationOnTheLevelOfTheQualificationType.java | 353 -- .../academic/generaldiploma/InstitutionType.java | 321 -- .../_2_0/academic/generaldiploma/LanguageType.java | 250 -- .../LanguagesOfInstructionAndExaminationType.java | 210 -- .../academic/generaldiploma/LocalGradeType.java | 219 -- .../_2_0/academic/generaldiploma/MimeType.java | 68 - .../MobilityProgrammeCourseUnitType.java | 247 -- .../MobilityProgrammeCoursesUnitsType.java | 72 - .../generaldiploma/MobilityProgrammeType.java | 233 -- .../generaldiploma/ModeOfDeliveryType.java | 60 - .../academic/generaldiploma/ModeOfStudyType.java | 64 - .../MultilingualGeneralDiplomaType.java | 103 - .../NameAndStatusOfAwardingInstitutionType.java | 134 - ...tatusOfInstitutionAdministeringStudiesType.java | 134 - .../academic/generaldiploma/ObjectFactory.java | 623 ---- .../generaldiploma/OfficialCertifyingType.java | 141 - .../academic/generaldiploma/OfficialStampType.java | 93 - .../generaldiploma/OfficialsCertifyingType.java | 72 - .../generaldiploma/ProgrammeDetailsType.java | 88 - .../generaldiploma/ProgrammeRequirementsType.java | 88 - .../academic/generaldiploma/QualificationType.java | 137 - .../academic/generaldiploma/RichTextTagType.java | 178 - .../academic/generaldiploma/SourceGradeType.java | 60 - .../generaldiploma/TitleConferredType.java | 64 - .../_2_0/academic/generaldiploma/package-info.java | 10 - .../_09/xmldsig/CanonicalizationMethodType.java | 101 - .../org/w3/_2000/_09/xmldsig/DSAKeyValueType.java | 198 - .../org/w3/_2000/_09/xmldsig/DigestMethodType.java | 102 - .../org/w3/_2000/_09/xmldsig/KeyInfoType.java | 126 - .../org/w3/_2000/_09/xmldsig/KeyValueType.java | 83 - .../org/w3/_2000/_09/xmldsig/ManifestType.java | 104 - .../org/w3/_2000/_09/xmldsig/ObjectFactory.java | 550 --- .../org/w3/_2000/_09/xmldsig/ObjectType.java | 156 - .../org/w3/_2000/_09/xmldsig/PGPDataType.java | 93 - .../org/w3/_2000/_09/xmldsig/RSAKeyValueType.java | 84 - .../org/w3/_2000/_09/xmldsig/ReferenceType.java | 192 - .../w3/_2000/_09/xmldsig/RetrievalMethodType.java | 116 - .../org/w3/_2000/_09/xmldsig/SPKIDataType.java | 77 - .../w3/_2000/_09/xmldsig/SignatureMethodType.java | 106 - .../_2000/_09/xmldsig/SignaturePropertiesType.java | 104 - .../_2000/_09/xmldsig/SignaturePropertyType.java | 132 - .../org/w3/_2000/_09/xmldsig/SignatureType.java | 176 - .../w3/_2000/_09/xmldsig/SignatureValueType.java | 91 - .../org/w3/_2000/_09/xmldsig/SignedInfoType.java | 152 - .../org/w3/_2000/_09/xmldsig/TransformType.java | 106 - .../org/w3/_2000/_09/xmldsig/TransformsType.java | 72 - .../org/w3/_2000/_09/xmldsig/X509DataType.java | 89 - .../w3/_2000/_09/xmldsig/X509IssuerSerialType.java | 89 - .../org/w3/_2000/_09/xmldsig/package-info.java | 10 - .../stork2-commons/src/main/resources/log4j.xml | 19 - .../resources/schema/StorkcomplexAttributes.xsd | 385 -- ...demic-language-diplomasupplement-schema-1_1.xsd | 3778 -------------------- .../src/main/resources/schema/diploma.xsd | 1687 --------- .../main/resources/schema/xmldsig-core-schema.xsd | 309 -- .../peps/tests/AttributeProvidersMapTestCase.java | 135 - .../stork/peps/tests/AttributeSourceTestCase.java | 90 - .../eu/stork/peps/tests/AttributeUtilTestCase.java | 537 --- .../peps/tests/ComplexAttributesMarshalling.java | 246 -- .../java/eu/stork/peps/tests/DateUtilTestCase.java | 294 -- .../java/eu/stork/peps/tests/PEPSUtilTestCase.java | 553 --- .../peps/tests/PersonalAttributeListTestCase.java | 777 ---- .../peps/tests/PersonalAttributeTestCase.java | 191 - .../java/eu/stork/peps/tests/package-info.java | 4 - .../stork2-commons/src/test/resources/log4j.xml | 19 - id/server/stork2-saml-engine/.gitignore | 1 - id/server/stork2-saml-engine/pom.xml | 204 -- .../src/main/java/META-INF/MANIFEST.MF | 3 - .../java/eu/stork/peps/auth/engine/SAMLEngine.java | 407 --- .../eu/stork/peps/auth/engine/SAMLEngineUtils.java | 768 ---- .../eu/stork/peps/auth/engine/STORKSAMLEngine.java | 3339 ----------------- .../stork/peps/auth/engine/X509PrincipalUtil.java | 63 - .../auth/engine/core/AuthenticationAttributes.java | 55 - .../peps/auth/engine/core/CitizenCountryCode.java | 55 - .../auth/engine/core/CustomAttributeQuery.java | 49 - .../engine/core/CustomRequestAbstractType.java | 181 - .../peps/auth/engine/core/EIDCrossBorderShare.java | 56 - .../peps/auth/engine/core/EIDCrossSectorShare.java | 56 - .../peps/auth/engine/core/EIDSectorShare.java | 56 - .../stork/peps/auth/engine/core/QAAAttribute.java | 62 - .../peps/auth/engine/core/RequestedAttribute.java | 141 - .../peps/auth/engine/core/RequestedAttributes.java | 49 - .../eu/stork/peps/auth/engine/core/SAMLCore.java | 102 - .../peps/auth/engine/core/SAMLEngineSignI.java | 93 - .../stork/peps/auth/engine/core/SPApplication.java | 55 - .../eu/stork/peps/auth/engine/core/SPCountry.java | 55 - .../java/eu/stork/peps/auth/engine/core/SPID.java | 55 - .../stork/peps/auth/engine/core/SPInformation.java | 55 - .../stork/peps/auth/engine/core/SPInstitution.java | 55 - .../eu/stork/peps/auth/engine/core/SPSector.java | 55 - .../stork/peps/auth/engine/core/STORKSAMLCore.java | 528 --- .../engine/core/VIDPAuthenticationAttributes.java | 71 - .../core/impl/AuthenticationAttributesBuilder.java | 54 - .../core/impl/AuthenticationAttributesImpl.java | 105 - .../impl/AuthenticationAttributesMarshaller.java | 27 - .../impl/AuthenticationAttributesUnmarshaller.java | 55 - .../core/impl/CitizenCountryCodeBuilder.java | 52 - .../engine/core/impl/CitizenCountryCodeImpl.java | 80 - .../core/impl/CitizenCountryCodeMarshaller.java | 47 - .../core/impl/CitizenCountryCodeUnmarshaller.java | 42 - .../core/impl/CustomAttributeQueryBuilder.java | 25 - .../engine/core/impl/CustomAttributeQueryImpl.java | 67 - .../core/impl/CustomAttributeQueryMarshaller.java | 49 - .../impl/CustomAttributeQueryUnmarshaller.java | 111 - .../core/impl/EIDCrossBorderShareBuilder.java | 52 - .../engine/core/impl/EIDCrossBorderShareImpl.java | 80 - .../core/impl/EIDCrossBorderShareMarshaller.java | 47 - .../core/impl/EIDCrossBorderShareUnmarshaller.java | 42 - .../core/impl/EIDCrossSectorShareBuilder.java | 52 - .../engine/core/impl/EIDCrossSectorShareImpl.java | 81 - .../core/impl/EIDCrossSectorShareMarshaller.java | 47 - .../core/impl/EIDCrossSectorShareUnmarshaller.java | 48 - .../engine/core/impl/EIDSectorShareBuilder.java | 52 - .../auth/engine/core/impl/EIDSectorShareImpl.java | 87 - .../engine/core/impl/EIDSectorShareMarshaller.java | 48 - .../core/impl/EIDSectorShareUnmarshaller.java | 47 - .../auth/engine/core/impl/QAAAttributeBuilder.java | 52 - .../auth/engine/core/impl/QAAAttributeImpl.java | 80 - .../engine/core/impl/QAAAttributeMarshaller.java | 47 - .../engine/core/impl/QAAAttributeUnmarshaller.java | 42 - .../core/impl/RequestedAttributeBuilder.java | 53 - .../engine/core/impl/RequestedAttributeImpl.java | 216 -- .../core/impl/RequestedAttributeMarshaller.java | 79 - .../core/impl/RequestedAttributeUnmarshaller.java | 92 - .../core/impl/RequestedAttributesBuilder.java | 53 - .../engine/core/impl/RequestedAttributesImpl.java | 94 - .../core/impl/RequestedAttributesMarshaller.java | 33 - .../core/impl/RequestedAttributesUnmarshaller.java | 53 - .../engine/core/impl/SPApplicationBuilder.java | 52 - .../auth/engine/core/impl/SPApplicationImpl.java | 80 - .../engine/core/impl/SPApplicationMarshaller.java | 47 - .../core/impl/SPApplicationUnmarshaller.java | 42 - .../auth/engine/core/impl/SPCountryBuilder.java | 52 - .../peps/auth/engine/core/impl/SPCountryImpl.java | 80 - .../auth/engine/core/impl/SPCountryMarshaller.java | 47 - .../engine/core/impl/SPCountryUnmarshaller.java | 42 - .../peps/auth/engine/core/impl/SPIDBuilder.java | 52 - .../stork/peps/auth/engine/core/impl/SPIDImpl.java | 80 - .../peps/auth/engine/core/impl/SPIDMarshaller.java | 47 - .../auth/engine/core/impl/SPIDUnmarshaller.java | 42 - .../engine/core/impl/SPInformationBuilder.java | 40 - .../auth/engine/core/impl/SPInformationImpl.java | 104 - .../engine/core/impl/SPInformationMarshaller.java | 33 - .../core/impl/SPInformationUnmarshaller.java | 53 - .../engine/core/impl/SPInstitutionBuilder.java | 52 - .../auth/engine/core/impl/SPInstitutionImpl.java | 80 - .../engine/core/impl/SPInstitutionMarshaller.java | 47 - .../core/impl/SPInstitutionUnmarshaller.java | 42 - .../auth/engine/core/impl/SPSectorBuilder.java | 52 - .../peps/auth/engine/core/impl/SPSectorImpl.java | 83 - .../auth/engine/core/impl/SPSectorMarshaller.java | 47 - .../engine/core/impl/SPSectorUnmarshaller.java | 42 - .../stork/peps/auth/engine/core/impl/SignHW.java | 395 -- .../auth/engine/core/impl/SignModuleFactory.java | 64 - .../stork/peps/auth/engine/core/impl/SignP12.java | 493 --- .../stork/peps/auth/engine/core/impl/SignSW.java | 488 --- .../impl/VIDPAuthenticationAttributesBuilder.java | 40 - .../impl/VIDPAuthenticationAttributesImpl.java | 128 - .../VIDPAuthenticationAttributesMarshaller.java | 33 - .../VIDPAuthenticationAttributesUnmarshaller.java | 56 - .../peps/auth/engine/core/impl/package-info.java | 19 - .../stork/peps/auth/engine/core/package-info.java | 19 - .../validator/CustomAttributeQueryValidator.java | 80 - .../core/validator/ExtensionsSchemaValidator.java | 59 - .../MultipleAssertionResponseValidator.java | 93 - .../validator/QAAAttributeSchemaValidator.java | 69 - .../auth/engine/core/validator/package-info.java | 19 - .../eu/stork/peps/auth/engine/package-info.java | 19 - .../peps/configuration/ConfigurationCreator.java | 134 - .../peps/configuration/ConfigurationEngine.java | 71 - .../peps/configuration/ConfigurationReader.java | 217 -- .../peps/configuration/ConfigurationSingleton.java | 74 - .../stork/peps/configuration/InstanceEngine.java | 72 - .../eu/stork/peps/configuration/package-info.java | 20 - .../stork/peps/exceptions/SAMLEngineException.java | 60 - .../peps/exceptions/STORKSAMLEngineException.java | 140 - .../STORKSAMLEngineRuntimeException.java | 59 - .../eu/stork/peps/exceptions/package-info.java | 19 - .../eu/stork/peps/test/simple/SSETestUtils.java | 173 - .../eu/stork/peps/test/simple/SimpleBaseTest.java | 63 - .../test/simple/StorkAttrQueryRequestTest.java | 852 ----- .../test/simple/StorkAttrQueryResponseTest.java | 988 ----- .../peps/test/simple/StorkAuthRequestTest.java | 947 ----- .../peps/test/simple/StorkLogoutRequestTest.java | 88 - .../peps/test/simple/StorkLogoutResponseTest.java | 141 - .../peps/test/simple/StorkNewResponseTest.java | 510 --- .../stork/peps/test/simple/StorkResponseTest.java | 873 ----- .../eu/stork/peps/test/simple/package-info.java | 20 - .../src/test/resources/SamlEngine.xml | 85 - .../src/test/resources/SignModule_Conf0.xml | 21 - .../src/test/resources/SignModule_Conf1.xml | 12 - .../src/test/resources/SignModule_Conf2.xml | 12 - .../src/test/resources/SignModule_Conf3.xml | 12 - .../src/test/resources/SignModule_P11.xml | 12 - .../src/test/resources/StorkSamlEngine_Conf0.xml | 112 - .../src/test/resources/StorkSamlEngine_Conf1.xml | 111 - .../src/test/resources/StorkSamlEngine_Conf2.xml | 101 - .../src/test/resources/StorkSamlEngine_Conf3.xml | 97 - .../eu/stork/STORKSAMLEngine/AttrQueryRequest.xml | 68 - .../stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml | 54 - .../STORKSAMLEngine/AttrQueryRequestTagDelete.xml | 66 - .../eu/stork/STORKSAMLEngine/AttrQueryResponse.xml | 124 - .../data/eu/stork/STORKSAMLEngine/AuthnRequest.xml | 72 - .../STORKSAMLEngine/AuthnRequestTagDelete.xml | 47 - .../AuthnRequestTagDeleteEncoded.xml | 47 - .../src/test/resources/logback-test.xml | 21 - .../src/test/resources/p11Conf.cfg | 18 - 378 files changed, 64608 deletions(-) delete mode 100644 id/server/stork2-commons/.gitignore delete mode 100644 id/server/stork2-commons/Releases delete mode 100644 id/server/stork2-commons/pom.xml delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeConstants.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeName.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvider.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvidersMap.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeSource.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeUtil.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CitizenConsent.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Country.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CountryCodes.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/DateUtil.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeProvidersMap.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IPersonalAttributeList.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkLogger.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkSession.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSUtil.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSValues.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttribute.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryRequest.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnRequest.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutRequest.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutResponse.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKStatusCode.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKSubStatusCode.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/package-info.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IAUService.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ICheckAttributeValue.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IDeriveAttribute.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/INormaliseValue.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ITranslatorService.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/package-info.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AdditionalInformationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AddressType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedFileDataType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedFileURLType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedImageDataType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedImageURLType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachmentsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CertificationOfTheSupplementType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ContactInformationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CountryType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseStructureDiagramType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitLanguageOfInstructionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitLanguagesOfInstructionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitStudentPerformanceType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitTypeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitWorkPlacementType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitWorkPlacementsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesAttendedInOtherInstitutionInMobilityProgramsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesGroupType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesGroupsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesUnitsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/DiplomaSupplementType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ECTSGradingScaleType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/EHEAFrameworkType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ExtensionContentType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/FamilyNameType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GenderType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GivenNameType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GradingSchemeAndGradeDistributionGuidanceType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ImageMimeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationIdentifyingTheHolderOfTheQualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationIdentifyingTheQualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheContentsAndResultsGainedType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheFunctionOfTheQualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheLevelOfTheQualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InstitutionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LanguageType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LanguagesOfInstructionAndExaminationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LocalGradeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MimeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeCourseUnitType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeCoursesUnitsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ModeOfDeliveryType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ModeOfStudyType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MultilingualDiplomaSupplementType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/NameAndStatusOfAwardingInstitutionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/NameAndStatusOfInstitutionAdministeringStudiesType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ObjectFactory.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialCertifyingType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialStampType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialsCertifyingType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ProgrammeDetailsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ProgrammeRequirementsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/QualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/RichTextTagType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/SourceGradeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/TitleConferredType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/package-info.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/AcTitleType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/AttributeStatusType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/CanonicalAddressType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/CurrentStudiesType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/DiplomaSupplementType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/Habilitation.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HabilitationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HasAccountInBankType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HasDegreeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsAcademicStaffType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsAdminStaffType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsCourseCoordinatorType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHealthCareProfessionalDeprecatedType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHealthCareProfessionalType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsStudentType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsTeacherOfType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/MandateContentType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/MandateType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/ObjectFactory.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/OriginalMandateType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/RepresentationPersonType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/RequestedAttributeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/TimeRestrictionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/TransactionLimitRestrictionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/package-info.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AdditionalInformationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AddressType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedFileDataType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedFileURLType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedImageDataType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedImageURLType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachmentsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CertificationOfTheSupplementType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ContactInformationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CountryTextCodeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CountryType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseStructureDiagramType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitLanguageOfInstructionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitLanguagesOfInstructionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitStudentPerformanceType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitTypeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitWorkPlacementType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitWorkPlacementsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesAttendedInOtherInstitutionInMobilityProgramsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesGroupType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesGroupsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesUnitsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ECTSGradingScaleType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/EHEAFrameworkType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ExtensionContentType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/FamilyNameType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GenderType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GeneralDiplomaType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GivenNameType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GradingSchemeAndGradeDistributionGuidanceType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ImageMimeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationIdentifyingTheHolderOfTheQualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationIdentifyingTheQualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheContentsAndResultsGainedType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheFunctionOfTheQualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheLevelOfTheQualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InstitutionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LanguageType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LanguagesOfInstructionAndExaminationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LocalGradeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MimeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeCourseUnitType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeCoursesUnitsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ModeOfDeliveryType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ModeOfStudyType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MultilingualGeneralDiplomaType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/NameAndStatusOfAwardingInstitutionType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/NameAndStatusOfInstitutionAdministeringStudiesType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ObjectFactory.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialCertifyingType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialStampType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialsCertifyingType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ProgrammeDetailsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ProgrammeRequirementsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/QualificationType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/RichTextTagType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/SourceGradeType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/TitleConferredType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/package-info.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/CanonicalizationMethodType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/DSAKeyValueType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/DigestMethodType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/KeyInfoType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/KeyValueType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ManifestType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ObjectFactory.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ObjectType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/PGPDataType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/RSAKeyValueType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ReferenceType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/RetrievalMethodType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SPKIDataType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureMethodType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignaturePropertiesType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignaturePropertyType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureValueType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignedInfoType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/TransformType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/TransformsType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/X509DataType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/X509IssuerSerialType.java delete mode 100644 id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/package-info.java delete mode 100644 id/server/stork2-commons/src/main/resources/log4j.xml delete mode 100644 id/server/stork2-commons/src/main/resources/schema/StorkcomplexAttributes.xsd delete mode 100644 id/server/stork2-commons/src/main/resources/schema/crue-academic-language-diplomasupplement-schema-1_1.xsd delete mode 100644 id/server/stork2-commons/src/main/resources/schema/diploma.xsd delete mode 100644 id/server/stork2-commons/src/main/resources/schema/xmldsig-core-schema.xsd delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeUtilTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/ComplexAttributesMarshalling.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/DateUtilTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PEPSUtilTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeListTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeTestCase.java delete mode 100644 id/server/stork2-commons/src/test/java/eu/stork/peps/tests/package-info.java delete mode 100644 id/server/stork2-commons/src/test/resources/log4j.xml delete mode 100644 id/server/stork2-saml-engine/.gitignore delete mode 100644 id/server/stork2-saml-engine/pom.xml delete mode 100644 id/server/stork2-saml-engine/src/main/java/META-INF/MANIFEST.MF delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngine.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngineUtils.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/STORKSAMLEngine.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/X509PrincipalUtil.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/AuthenticationAttributes.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CitizenCountryCode.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CustomAttributeQuery.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CustomRequestAbstractType.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDCrossBorderShare.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDCrossSectorShare.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDSectorShare.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/QAAAttribute.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/RequestedAttribute.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/RequestedAttributes.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLCore.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLEngineSignI.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPApplication.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPCountry.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPID.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPInformation.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPInstitution.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPSector.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/STORKSAMLCore.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/VIDPAuthenticationAttributes.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignHW.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignModuleFactory.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesBuilder.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesImpl.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesMarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesUnmarshaller.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/package-info.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/package-info.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/CustomAttributeQueryValidator.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/ExtensionsSchemaValidator.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/MultipleAssertionResponseValidator.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/QAAAttributeSchemaValidator.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/package-info.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/package-info.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationEngine.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationReader.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationSingleton.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/InstanceEngine.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/package-info.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/SAMLEngineException.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/STORKSAMLEngineException.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/STORKSAMLEngineRuntimeException.java delete mode 100644 id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/package-info.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/SSETestUtils.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/SimpleBaseTest.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryResponseTest.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkLogoutRequestTest.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkLogoutResponseTest.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkNewResponseTest.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkResponseTest.java delete mode 100644 id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/package-info.java delete mode 100644 id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf1.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf2.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf3.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDeleteEncoded.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/logback-test.xml delete mode 100644 id/server/stork2-saml-engine/src/test/resources/p11Conf.cfg (limited to 'id/server') diff --git a/id/server/pom.xml b/id/server/pom.xml index a7e79ef78..99a9c6e4f 100644 --- a/id/server/pom.xml +++ b/id/server/pom.xml @@ -22,8 +22,6 @@ auth moa-id-commons - stork2-saml-engine - stork2-commons modules diff --git a/id/server/stork2-commons/.gitignore b/id/server/stork2-commons/.gitignore deleted file mode 100644 index a9036d427..000000000 --- a/id/server/stork2-commons/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/target -/stork-commons.log* diff --git a/id/server/stork2-commons/Releases b/id/server/stork2-commons/Releases deleted file mode 100644 index 6550affd0..000000000 --- a/id/server/stork2-commons/Releases +++ /dev/null @@ -1,73 +0,0 @@ -Created 06-04-2011 - -Branch : STORKCommons_0_5_UPDATE_06042011 -Date : 06-04-2011 -Changes: No changes. - -Branch : STORKCommons_0_5_UPDATE_07072011 -Date : 07-07-2011 -Changes: Inserted constants to HttpOnly HTTP Header. - -Branch : STORKCommons_0_6 -Date : 07-11-2011 -Changes: Improved error exception handling (few changes on the exception classes). - Improved Constansts (unused removed, others added). - Unit Tests include (almost all the code is cover). - Fix some minor bugs found on unit tests. - New Copyright License added. - PEPUtils refactored. - Improved error code message (three kind of messages: to citizen, admin and saml token). - -Branch : STORKCommons_0_6_1 -Date : 28-11-2011 -Changes: Removed unnecessary javadoc package file. - Updated pepsUtils.properties file (check attribute value had old error message) - -Branch : STORKCommons_0_9 -Date : 02-12-2011 -Changes: Updated Version to 0.9 - -Branch : STORKCommons_1_0 -Date : 02-12-2011 -Changes: Updated Version to 1.0 - -Branch : STORKCommons_1_1_0 -Date : 01-11-2013 -Changes: Updated Version to 1.1.0 - Dependencies updated - Business Logic Part I changes - SAML Engine Changes merged (from SamlEngine/1.1.0/Commons branch to be easier to merge this branch with trunk) - Fixed some errors on Test Case - -Branch : STORKCommons_1_1_1 -Date : 02-12-2013 -Changes: Updated Version to 1.1.1 - Added mandate error code - PMD quality code changes (some final identifier missing) - Added new methods to personal attribute list to get Mandatory/Optional and/or Simple/Complex attributes - Added new unit tests - -Branch : Commons_1_1_2 -Date : 13-12-2013 -Changes: Updated Version to 1.1.2 - Added request flow of PV (incomplete) - Added AP mandatory attribute to get data for business attributes - *) based on configuration file it adds the missing attributes (eIdentifier, givenName, surname and dateOfBirth) or change isRequired to true. - changes original isRequired state in response - Added new Interface (IAttributeListProcessor) to make some operations on attribute lists - -Branch : Commons_1_1_3 -Date : 21-12-2013 -Changes: Updated Version to 1.1.3 - Power Validation is complete now - Business Logic I and II integration (Request Complete!) - -Branch : Commons_1_1_4 -Date : 08-01-2014 -Changes: Updated Version to 1.1.4 - Added new method to Personal attribute List to check if there is at least one attribute with no value. - -Branch : Commons_1_4_0 -Date : 28-02-2014 -Changes: Updated Version to 1.4.0 - Removed AUB \ No newline at end of file diff --git a/id/server/stork2-commons/pom.xml b/id/server/stork2-commons/pom.xml deleted file mode 100644 index 20b5c7619..000000000 --- a/id/server/stork2-commons/pom.xml +++ /dev/null @@ -1,220 +0,0 @@ - - - MOA.id - moa-id - 3.x - - 4.0.0 - eu.stork - Commons - jar - Stork Commons - - UTF-8 - 1.5.1 - - ${stork.version} - - The STORKCommons library provides beans, Java Interfaces and utility classes to integrate PEPS and SAML Engine. - - - - - shibboleth.internet2.edu - Internet2 - https://build.shibboleth.net/nexus/content/groups/public/ - - - - - - - - joda-time - joda-time - 2.3 - - - - - log4j - log4j - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - mail - javax.mail - - - - - - - org.bouncycastle - bcprov-jdk16 - - - - org.opensaml - opensaml - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-simple - - - org.slf4j - jcl-over-slf4j - - - org.slf4j - log4j-over-slf4j - - - org.slf4j - jul-to-slf4j - - - - - - - - javax.servlet - servlet-api - provided - - - - commons-lang - commons-lang - 2.6 - jar - compile - - - junit - junit - test - - - - - commons - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.1 - - 1.7 - 1.7 - - - - org.apache.maven.plugins - maven-surefire-plugin - - reversealphabetical - true - - reversealphabetical - **/PEPSUtilTest.java - **/PersonalAttributeTestCase.java - **/PersonalAttributeListTestCase.java - **/DateUtilTestCase.java - **/AttributeUtilTest.java - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - - - http://commons.apache.org/lang/api/ - http://java.sun.com/j2se/1.6.0/docs/api/ - http://www.bouncycastle.org/docs/docs1.6/ - http://docs.oracle.com/javase/6/docs/api/ - - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - verify - - jar-no-fork - - - - - - - - src/test/resources - - log4j.xml - - - - - - - embedded - - - - ${project.basedir}/src/main/resources - - - ${project.basedir}/src/main/config/embedded - - - - - - metrics - - - - org.codehaus.mojo - cobertura-maven-plugin - 2.5.1 - - - html - xml - - - - - - - - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeConstants.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeConstants.java deleted file mode 100644 index 4d13c2d92..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeConstants.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains all the STORK PEPS, Commons and Specific errors constant identifiers. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.2 $, $Date: 2010-11-17 05:15:28 $ - */ -public enum AttributeConstants { - - /** - * Represents the attribute's name index. - */ - ATTR_NAME_INDEX(0), - /** - * Represents the attribute's type index. - */ - ATTR_TYPE_INDEX(1), - /** - * Represents the attribute's value index. - */ - ATTR_VALUE_INDEX(2), - /** - * Represents the attribute's status index. - */ - ATTR_STATUS_INDEX(3), - /** - * Represents the number of allowed tuples. - */ - NUMBER_TUPLES(4); - - /** - * Represents the constant's value. - */ - private int attribute; - - /** - * Solo Constructor. - * - * @param attr - * The Attribute Constant value. - */ - AttributeConstants(final int attr) { - - this.attribute = attr; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public int intValue() { - - return attribute; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeName.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeName.java deleted file mode 100644 index 28115ae62..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeName.java +++ /dev/null @@ -1,85 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -/** - * This class is a bean used to store information relative to Attribute Names. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.00 $, $Date: 2013-11-26 $ - */ -public final class AttributeName implements Serializable { - - /** - * - */ - private static final long serialVersionUID = -3537736618869722308L; - - /** - * Attribute Id. - */ - private String attributeId; - - /** - * Attribute Name. - */ - private String attributeName; - - /** - * Attribute Name Constructor. - * - * @param aId - * Id of the Attribute Name. - * @param aName - * Name of the Attribute Name. - */ - public AttributeName(final String aId, final String aName) { - - this.attributeId = aId; - this.attributeName = aName; - } - - /** - * Getter for the attributeId value. - * - * @return The attributeId value. - */ - public String getAttributeId() { - - return attributeId; - } - - /** - * Setter for the attributeId value. - * - * @param aId - * Id of the Attribute Name. - */ - public void setAttributeId(final String aId) { - - this.attributeId = aId; - } - - /** - * Getter for the attributeName value. - * - * @return The attributeName value. - */ - public String getAttributeName() { - - return attributeName; - } - - /** - * Setter for the attributeName value. - * - * @param name - * Name of the Attribute Name. - */ - public void setAttributeName(final String name) { - - this.attributeName = name; - } - -} \ No newline at end of file diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvider.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvider.java deleted file mode 100644 index 08265e8f0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvider.java +++ /dev/null @@ -1,129 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; -import java.util.List; - -/** - * This class is a bean used to store the information relative to the Attribute Provider. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.01 $, $Date: 2014-01-13 $ - */ -public final class AttributeProvider implements Serializable { - /** - * Unique identifier. - */ - private static final long serialVersionUID = 7210186241917444559L; - - /** - * Provider Id. - */ - private String providerId; - - /** - * Provider Name. - */ - private String providerName; - - /** - * Allowed groups of attribute names. - */ - private List allowedGroups; - - /** - * Attribute Provider Constructor. - * - * @param pId - * Id of the Attribute Provider. - * @param pName - * Name of the Attribute Provider. - */ - public AttributeProvider(final String pId, final String pName, final List pAllowedGroups) { - - this.providerId = pId; - this.providerName = pName; - this.allowedGroups = pAllowedGroups; - } - - /** - * Getter for the providerId value. - * - * @return The providerId value. - */ - public String getProviderId() { - - return providerId; - } - - /** - * Setter for the providerId value. - * - * @param pId - * Id of the Attribute Provider. - */ - public void setProviderId(final String pId) { - - this.providerId = pId; - } - - /** - * Getter for the providerName value. - * - * @return The providerName value. - */ - public String getProviderName() { - - return providerName; - } - - /** - * Setter for the providerName value. - * - * @param name - * Name of the Attribute Provider. - */ - public void setProviderName(final String name) { - - this.providerName = name; - } - - /** - * Getter for the allowedGroups value. - * - * @return The allowedGroups value. - */ - public List getAllowedGroups() { - - return allowedGroups; - } - - /** - * Setter for the allowedGroups value. - * - * @param name - * AllowedGroups of the Attribute Provider. - */ - public void setAllowedGroups(final List pAllowedGroups) { - - this.allowedGroups = pAllowedGroups; - } - - /** - * Check if an attribute name is allowed for this Attribute Provider - * - * @param pAttrName - * the Attribute Name to check - * @return true if the name is allowed, false otherwise - */ - public boolean isAttributeNameAllowed(final String pAttrName) { - if (allowedGroups == null || pAttrName == null) - return false; - else if (allowedGroups.contains(PEPSParameters.ATTRIBUTE_GROUPS_ALL.toString())) - return true; - else if (allowedGroups.contains(PEPSParameters.ATTRIBUTE_GROUPS_NONE.toString())) - return false; - else - return allowedGroups.contains(pAttrName); - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvidersMap.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvidersMap.java deleted file mode 100644 index c59109092..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeProvidersMap.java +++ /dev/null @@ -1,112 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.util.Iterator; -import java.util.LinkedHashMap; - -import org.apache.log4j.Logger; - -/** - * Implementation of the AttributeProviderMap using a LinkedHashMap. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.01 $, $Date: 2013-09-20 $ - * - * @see LinkedHashMap - */ -public class AttributeProvidersMap extends LinkedHashMap implements IAttributeProvidersMap { - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(AttributeProvidersMap.class.getName()); - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 8949081185106296122L; - - /** - * {@inheritDoc} - */ - @Override - public IPersonalAttributeList get(final AttributeSource key) { - return this.get((Object) key); - } - - /** - * {@inheritDoc} - */ - @Override - public IPersonalAttributeList remove(final AttributeSource key) { - return this.remove((Object) key); - } - - /** - * {@inheritDoc} - */ - @Override - public boolean containsKey(final AttributeSource key) { - return this.containsKey((Object) key); - } - - /** - * {@inheritDoc} - */ - @Override - public Iterator keyIterator() { - return this.keySet().iterator(); - } - - public void trace() { - Iterator iterator; - Iterator iterator2; - AttributeSource source; - IPersonalAttributeList pal; - PersonalAttribute pa; - - iterator = this.keyIterator(); - LOG.trace("Start dumping of AttributeProvidersMap\n======================="); - while (iterator.hasNext()) { - source = iterator.next(); - - LOG.trace("Source details: type [" + source.getSourceType() + "], URL [" + source.getProviderURL() + "]"); - - if (source.getSourceType() == AttributeSource.SOURCE_LOCAL_APROVIDER) { - LOG.trace("-> Attribute Provider: ID [" + source.getProvider().getProviderId() + "], name [" + source.getProvider().getProviderName() + "]"); - } else { - LOG.trace("-> Country: ID [" + source.getCountry().getCountryId() + "], name [" + source.getCountry().getCountryName() + "]"); - } - - pal = this.get(source); - LOG.trace("++++++++=>"); - iterator2 = pal.iterator(); - while (iterator2.hasNext()) { - pa = iterator2.next(); - - LOG.trace("-> Citizen Attribute: name [" + pa.getName() + "], required [" + pa.isRequired() + "]"); - } - LOG.trace("<=++++++++"); - - LOG.trace("-----------------------"); - } - LOG.trace("END\n======================="); - } - - public void mergeWith(IAttributeProvidersMap aPMap) { - Iterator maKeys = aPMap.keyIterator(); - while (maKeys.hasNext()) { - AttributeSource key = maKeys.next(); - IPersonalAttributeList l2 = aPMap.get(key); - if (containsKey(key)) { - IPersonalAttributeList l1 = get(key); - for (PersonalAttribute pa : l2) { - if (!l1.containsKey(pa.getName())) { - l1.add(pa); - } - } - } else { - put(key, l2); - } - } - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeSource.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeSource.java deleted file mode 100644 index eb5e3ded4..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeSource.java +++ /dev/null @@ -1,197 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -import org.apache.log4j.Logger; - -/** - * This class is a bean used to store the information relative to the Attribute Source (either AttributeProvider or Country). - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.10 $, $Date: 2013-11-29 $ - */ -public final class AttributeSource implements Serializable { - /** - * Unique identifier. - */ - private static final long serialVersionUID = 432243595968469014L; - - public static final int SOURCE_LOCAL_APROVIDER = 1; - public static final int SOURCE_REMOTE_COUNTRY = 2; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(AttributeSource.class.getName()); - - /** - * Provider source. - */ - private int sourceType; - - /** - * Provider URL. - */ - private String providerURL; - - /** - * The local Attribute Provider. - */ - private AttributeProvider provider; - - /** - * The remote Country. - */ - private Country country; - - /** - * Attribute Source Constructor. - * - * @param provider - * The local Attribute Provider. - * @param pURL - * URL of the Attribute Provider. - */ - public AttributeSource(final AttributeProvider provider, final String pURL) { - this.setSourceType(SOURCE_LOCAL_APROVIDER); - - this.setProvider(provider); - this.setProviderURL(pURL); - } - - /** - * Attribute Source Constructor. - * - * @param country - * The remote Country. - * @param pURL - * URL of the Country. - */ - public AttributeSource(final Country country, final String pURL) { - this.setSourceType(SOURCE_REMOTE_COUNTRY); - - this.setCountry(country); - this.setProviderURL(pURL); - } - - /** - * @param sourceType - * the sourceType to set - */ - public void setSourceType(final int sourceType) { - this.sourceType = sourceType; - } - - /** - * @return the sourceType - */ - public int getSourceType() { - return sourceType; - } - - /** - * @param providerURL - * the providerURL to set - */ - public void setProviderURL(final String providerURL) { - this.providerURL = providerURL; - } - - /** - * @return the providerURL - */ - public String getProviderURL() { - return providerURL; - } - - /** - * @param provider - * the provider to set - */ - public void setProvider(final AttributeProvider provider) { - this.setSourceType(SOURCE_LOCAL_APROVIDER); - - this.provider = provider; - } - - /** - * @return the provider - */ - public AttributeProvider getProvider() { - return provider; - } - - /** - * @param country - * the country to set - */ - public void setCountry(final Country country) { - this.setSourceType(SOURCE_REMOTE_COUNTRY); - - this.country = country; - } - - /** - * @return the country - */ - public Country getCountry() { - return country; - } - - /** - * {@inheritDoc} - */ - public boolean equals(Object obj) { - boolean outcome = false; - - LOG.debug("Calling equals with Object."); - if (obj instanceof AttributeSource) { - LOG.debug("Calling equals with AttributeSource."); - outcome = this.innerEquals((AttributeSource) obj); - } - if (LOG.isDebugEnabled()) { - LOG.debug("Object equals outcome: " + outcome); - } - return outcome; - } - - /** - * Compare the given AttributeSource with the current object in order to determinine if they are equal. - * - * @param obj - * The AttributeSource to compare to - * - * @return true if the two objects are equal - */ - public boolean innerEquals(AttributeSource obj) { - boolean outcome = false; - - if (this.sourceType == obj.getSourceType()) { - if (this.sourceType == AttributeSource.SOURCE_LOCAL_APROVIDER) { - if (this.provider.getProviderId().equals(obj.getProvider().getProviderId())) - outcome = true; - } else if (this.sourceType == AttributeSource.SOURCE_REMOTE_COUNTRY) { - if (this.country.getCountryId().equals(obj.getCountry().getCountryId())) - outcome = true; - } - } - if (LOG.isDebugEnabled()) { - LOG.debug("AttributeSource equals outcome: " + outcome); - } - return outcome; - } - - /** - * {@inheritDoc} - */ - public int hashCode() { - int hash = 1; - hash = hash * 17 + this.sourceType; - if (this.sourceType == AttributeSource.SOURCE_LOCAL_APROVIDER) - hash = hash * 31 + this.provider.getProviderName().hashCode(); - else - hash = hash * 31 + this.country.getCountryName().hashCode(); - return hash; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeUtil.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeUtil.java deleted file mode 100644 index f49986aaf..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/AttributeUtil.java +++ /dev/null @@ -1,218 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.apache.commons.lang.StringUtils; - -/** - * This class holds static helper methods. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.5 $, $Date: 2010-12-15 23:19:59 $ - */ -public final class AttributeUtil { - - /** - * Private constructor. Prevents the class from being instantiated. - */ - private AttributeUtil() { - // empty constructor - } - - /** - * Safe escape any given string. - * - * @param value - * The HTTP Value to escaped. - * - * @return The value escaped value. - */ - public static String escape(final String value) { - - final String attrSep = PEPSValues.ATTRIBUTE_SEP.toString(); - final String attrTupleSep = PEPSValues.ATTRIBUTE_TUPLE_SEP.toString(); - final String attrValueSep = PEPSValues.ATTRIBUTE_VALUE_SEP.toString(); - - final String escAttrSep = "%" + (int) attrSep.charAt(0); - final String escAttrTupleSep = "%" + (int) attrTupleSep.charAt(0); - final String escAttrValueSep = "%" + (int) attrValueSep.charAt(0); - - return value.replace(attrSep, escAttrSep).replace(attrTupleSep, escAttrTupleSep).replace(attrValueSep, escAttrValueSep); - } - - /** - * Unescape any given string. - * - * @param value - * The HTTP Value to be unescaped. - * - * @return The value unescaped value. - */ - public static String unescape(final String value) { - final String attrSep = PEPSValues.ATTRIBUTE_SEP.toString(); - final String attrTupleSep = PEPSValues.ATTRIBUTE_TUPLE_SEP.toString(); - final String attrValueSep = PEPSValues.ATTRIBUTE_VALUE_SEP.toString(); - - final String escAttrSep = "%" + (int) attrSep.charAt(0); - final String escAttrTupleSep = "%" + (int) attrTupleSep.charAt(0); - final String escAttrValueSep = "%" + (int) attrValueSep.charAt(0); - - return value.replace(escAttrSep, attrSep).replace(escAttrTupleSep, attrTupleSep).replace(escAttrValueSep, attrValueSep); - } - - /** - * Appends the string representation of an object to a StringBuilder. - * - * @param strBuilder - * The StringBuilder to append to. - * @param val - * The string representation of an object. - */ - public static void appendIfNotNull(final StringBuilder strBuilder, final Object val) { - - if (val != null) { - strBuilder.append(val); - } - } - - /** - * Given a separator and a list of strings, joins the list, as a string, separated by the separator string. - * - * @param list - * The list of strings to join. - * @param separator - * The separator string. - * @return the list, as a string, separated by the separator string. - */ - public static String listToString(final List list, final String separator) { - - final StringBuilder strBuilder = new StringBuilder(); - for (final String s : list) { - if (!StringUtils.isEmpty(s)) { - strBuilder.append(AttributeUtil.escape(s) + separator); - } - } - return strBuilder.substring(0, strBuilder.length() - 1).toString(); - } - - /** - * Given a separator and a map of strings to strings, joins the map, as a string, separated by the separator string with the pair key/value concatenated with a '='. - * - * @param map - * The map of strings to join. - * @param separator - * The separator string. - * - * @return the map of strings, as a string, separated by the separator string with the pair key/value concatenated with a '='. - */ - public static String mapToString(final Map map, final String separator) { - - final StringBuilder strBuilder = new StringBuilder(); - final Iterator> valuesIt = map.entrySet().iterator(); - while (valuesIt.hasNext()) { - final Entry entry = valuesIt.next(); - strBuilder.append(entry.getKey()); - strBuilder.append('='); - strBuilder.append(AttributeUtil.escape(entry.getValue())); - strBuilder.append(separator); - } - return strBuilder.substring(0, strBuilder.length() - 1).toString(); - } - - /** - * Validates the attribute value format. - * - * @param value - * The attribute value to validate. - * - * @return true if value has a valid format. - */ - public static boolean isValidValue(final String value) { - boolean retVal = false; - if (value != null && value.charAt(0) == '[' && value.endsWith("]")) { - final String tmpAttrValue = value.substring(1, value.length() - 1); - final String[] vals = tmpAttrValue.split(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - if (tmpAttrValue.length() >= 0 || (vals.length > 0 && vals[0].length() > 0)) { - retVal = true; - } - } - return retVal; - } - - /** - * Validates the attribute type value. It's case insensitive. E.g. return true value to: a) "true", "TRUE", "True", ... b) "false", "FALSE", "False", ... - * - * @param type - * The attribute type value. - * - * @return true if type has a true or false (case insensitive) value. - */ - public static boolean isValidType(final String type) { - return StringUtils.isNotEmpty(type) && (PEPSValues.TRUE.toString().equalsIgnoreCase(type) || PEPSValues.FALSE.toString().equalsIgnoreCase(type)); - } - - /** - * Validates the Personal attribute tuple. E.g. name:type:[value]:status - * - * @param tuples - * The Personal attribute's tuple. - * - * @return true if the tuples' format is valid. - * - * @see PEPSUtil#validateParameter(String, String, String) - * @see String#equalsIgnoreCase(String) - */ - public static boolean hasValidTuples(final String[] tuples) { - boolean retVal = false; - - final int numberTuples = AttributeConstants.NUMBER_TUPLES.intValue(); - if (tuples != null && tuples.length == numberTuples) { - // validate attrName - final int attrNameIndex = AttributeConstants.ATTR_NAME_INDEX.intValue(); - final int attrTypeIndex = AttributeConstants.ATTR_TYPE_INDEX.intValue(); - final int attrValueIndex = AttributeConstants.ATTR_VALUE_INDEX.intValue(); - - retVal = StringUtils.isNotEmpty(tuples[attrNameIndex]) && StringUtils.isNotEmpty(tuples[attrTypeIndex]) && StringUtils.isNotEmpty(tuples[attrValueIndex]) - && AttributeUtil.isValidType(tuples[attrTypeIndex]) && AttributeUtil.isValidValue(tuples[attrValueIndex]); - } - return retVal; - } - - /** - * Check if all mandatory attributes have values. - * - * @param personalAttrList - * The Personal Attributes List. - * - * @return true if all mandatory attributes have values, false if at least one attribute doesn't have value. - */ - public static boolean checkMandatoryAttributes(final IPersonalAttributeList personalAttrList) { - - final Iterator itAttributes = personalAttrList.values().iterator(); - boolean retVal = true; - while (itAttributes.hasNext() && retVal) { - final PersonalAttribute attr = itAttributes.next(); - if (attr.isRequired() && !STORKStatusCode.STATUS_AVAILABLE.toString().equals(attr.getStatus())) { - retVal = false; - } - } - return retVal; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CitizenConsent.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CitizenConsent.java deleted file mode 100644 index a1b6c5a53..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CitizenConsent.java +++ /dev/null @@ -1,121 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.ArrayList; -import java.util.List; - -/** - * This class is a bean used to store the information relative to the Citizen Consent. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class CitizenConsent { - - /** - * Mandatory attributes list. - */ - private List mandatoryList; - - /** - * Optional attributes list. - */ - private List optionalList; - - /** - * Citizen Consent default Constructor. - */ - public CitizenConsent() { - this.mandatoryList = new ArrayList(); - this.optionalList = new ArrayList(); - } - - /** - * Getter for the mandatoryList value. - * - * @return The mandatoryList value. - */ - public List getMandatoryList() { - return this.mandatoryList; - } - - /** - * Setter for the mandatoryList value. - * - * @param mandatoryAttrList - * Mandatory parameters list. - */ - public void setMandatoryList(final List mandatoryAttrList) { - this.mandatoryList = mandatoryAttrList; - } - - /** - * Setter for some mandatoryAttribute. Adds the input parameter to the mandatoryList. - * - * @param mandatoryAttr - * Attribute to add to the mandatoryList. - */ - public void setMandatoryAttribute(final String mandatoryAttr) { - this.mandatoryList.add(mandatoryAttr); - } - - /** - * Getter for the optionalList value. - * - * @return The optionalList value. - */ - public List getOptionalList() { - return optionalList; - } - - /** - * Setter for the optionalList value. - * - * @param optAttrList - * Optional parameters list. - */ - public void setOptionalList(final List optAttrList) { - this.optionalList = optAttrList; - } - - /** - * Setter for some optionalAttr. Adds the input parameter to the optionalList. - * - * @param optionalAttr - * Attribute to add to the optionalList. - */ - public void setOptionalAttribute(final String optionalAttr) { - this.optionalList.add(optionalAttr); - } - - /** - * Returns a string in the following format. "Mandatory attributes: mandatoryAttr1;mandatoryAttr2;mandatoryAttrN Optional attributes: optionalAttr1;optionalAttr2;optionalAttrN" - * - * @return {@inheritDoc} - */ - public String toString() { - final StringBuilder strbldr = new StringBuilder(46); - strbldr.append("Mandatory attributes: "); - for (final String str : mandatoryList) { - strbldr.append(str).append(';'); - } - strbldr.append(" Optional attributes: "); - for (final String str : optionalList) { - strbldr.append(str).append(';'); - } - return strbldr.toString(); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Country.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Country.java deleted file mode 100644 index 7bef0c628..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Country.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -/** - * This class is a bean used to store the information relative to the Country. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.10 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class Country implements Serializable { - - /** - * - */ - private static final long serialVersionUID = 1135994036496370993L; - - /** - * Country Id. - */ - private String countryId; - - /** - * Country Name. - */ - private String countryName; - - /** - * Country Constructor. - * - * @param cId - * Id of the Country. - * @param cName - * Name of the Country. - */ - public Country(final String cId, final String cName) { - - this.countryId = cId; - this.countryName = cName; - } - - /** - * Getter for the countryId value. - * - * @return The countryId value. - */ - public String getCountryId() { - - return countryId; - } - - /** - * Setter for the countryId value. - * - * @param cId - * Id of the Country. - */ - public void setCountryId(final String cId) { - - this.countryId = cId; - } - - /** - * Getter for the countryName value. - * - * @return The countryName value. - */ - public String getCountryName() { - - return countryName; - } - - /** - * Setter for the countryName value. - * - * @param name - * Name of the Country. - */ - public void setCountryName(final String name) { - - this.countryName = name; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CountryCodes.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CountryCodes.java deleted file mode 100644 index 5cf7a9751..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/CountryCodes.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.Arrays; -import java.util.List; - -/** - * This class contains all the ISO 3166-1 Alpha 3 Country Codes. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.2 $, $Date: 2011-04-14 00:24:56 $ - */ -public final class CountryCodes { - - /** - * Private Constructor. - */ - private CountryCodes() { - - } - - /** - * ISO 3166-1 Alpha 3 Country Codes. - */ - private static List countrysAlpha3 = Arrays.asList("ABW", "AFG", "AGO", "AIA", "ALA", "ALB", "AND", "ANT", "ARE", "ARG", "ARM", "ASM", "ATA", "ATF", "ATG", "AUS", "AUT", "AZE", "BDI", - "BEL", "BEN", "BES", "BFA", "BGD", "BGR", "BHR", "BHS", "BIH", "BLM", "BLR", "BLZ", "BMU", "BOL", "BRA", "BRB", "BRN", "BTN", "BUR", "BVT", "BWA", "BYS", "CAF", "CAN", "CCK", "CHE", - "CHL", "CHN", "CIV", "CMR", "COD", "COG", "COK", "COL", "COM", "CPV", "CRI", "CSK", "CUB", "CUW", "CXR", "CYM", "CYP", "CZE", "DEU", "DJI", "DMA", "DNK", "DOM", "DZA", "ECU", "EGY", - "ERI", "ESH", "ESP", "EST", "ETH", "FIN", "FJI", "FLK", "FRA", "FRO", "FSM", "GAB", "GBR", "GEO", "GGY", "GHA", "GIB", "GIN", "GLP", "GMB", "GNB", "GNQ", "GRC", "GRD", "GRL", "GTM", - "GUF", "GUM", "GUY", "HKG", "HMD", "HND", "HRV", "HTI", "HUN", "IDN", "IMN", "IND", "IOT", "IRL", "IRN", "IRQ", "ISL", "ISR", "ITA", "JAM", "JEY", "JOR", "JPN", "KAZ", "KEN", "KGZ", - "KHM", "KIR", "KNA", "KOR", "KWT", "LAO", "LBN", "LBR", "LBY", "LCA", "LIE", "LKA", "LSO", "LTU", "LUX", "LVA", "MAC", "MAF", "MAR", "MCO", "MDA", "MDG", "MDV", "MEX", "MHL", "MKD", - "MLI", "MLT", "MMR", "MNE", "MNG", "MNP", "MOZ", "MRT", "MSR", "MTQ", "MUS", "MWI", "MYS", "MYT", "NAM", "NCL", "NER", "NFK", "NGA", "NIC", "NIU", "NLD", "NOR", "NPL", "NRU", "NZL", - "OMN", "PAK", "PAN", "PCN", "PER", "PHL", "PLW", "PNG", "POL", "PRI", "PRK", "PRT", "PRY", "PSE", "PYF", "QAT", "REU", "ROM", "ROU", "RUS", "RWA", "SAU", "SCG", "SDN", "SEN", "SGP", - "SGS", "SHN", "SJM", "SLB", "SLE", "SLV", "SMR", "SOM", "SPM", "SRB", "STP", "SUR", "SVK", "SVN", "SXW", "SWE", "SWZ", "SYC", "SYR", "TCA", "TCD", "TGO", "THA", "TJK", "TKL", "TKM", - "TLS", "TMP", "TON", "TTO", "TUN", "TUR", "TUV", "TWN", "TZA", "UGA", "UKR", "UMI", "URY", "USA", "UZB", "VAT", "VCT", "VEN", "VGB", "VIR", "VNM", "VUT", "WLF", "WSM", "YEM", "YUG", - "ZAF", "ZAR", "ZMB", "ZWE"); - - /** - * Searches the CountryCode (3166-1 alpha3 format) an return true if it exists. - * - * @param countryCode - * The Country code to search. - * - * @return true if the CountryCode exists, false otherwise. - */ - public static boolean hasCountryCodeAlpha3(final String countryCode) { - - return CountryCodes.countrysAlpha3.contains(countryCode); - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/DateUtil.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/DateUtil.java deleted file mode 100644 index 0c59e117f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/DateUtil.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.sql.Timestamp; -import java.util.GregorianCalendar; - -import org.apache.log4j.Logger; -import org.joda.time.DateTime; -import org.joda.time.Years; -import org.joda.time.format.DateTimeFormat; -import org.joda.time.format.DateTimeFormatter; - -import eu.stork.peps.auth.commons.exceptions.SecurityPEPSException; - -/** - * This class holds static helper methods for Date Operations. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.4 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class DateUtil { - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(DateUtil.class.getName()); - - /** - * yyyy Date format size. - */ - private static final int YEAR_DATE_SIZE = 4; - - /** - * yyyyMM Date format size. - */ - private static final int MONTH_DATE_SIZE = 6; - - /** - * Private constructor. Prevents the class from being instantiated. - */ - private DateUtil() { - // empty constructor - } - - /** - * Fulfils dateValue with a valid date. The following roles are applied: a) If the dateValue only contains the year then fulfils with last year's day. e.g. this method returns 19951231 to the 1995 - * dateValue. b) If the dateValue contains the year and the month then fulfils with last month's day. e.g. this method returns 19950630 to the 199505 dateValue. - * - * @param dateValue - * The date to be fulfilled. - * - * @return The dateValue fulfilled. - */ - private static String fulfilDate(final String dateValue) { - - final StringBuffer strBuf = new StringBuffer(); - strBuf.append(dateValue); - // if the IdP just provides the year then we must fullfil the date. - if (dateValue.length() == YEAR_DATE_SIZE) { - strBuf.append(PEPSValues.LAST_MONTH.toString()); - } - // if the IdP provides the year and the month then we must fullfil the - // date. - if (dateValue.length() == MONTH_DATE_SIZE || strBuf.length() == MONTH_DATE_SIZE) { - // IdP doesn't provide the day, so we will use DateTime to - // calculate it. - final String noDayCons = PEPSValues.NO_DAY_DATE_FORMAT.toString(); - final DateTimeFormatter fmt = DateTimeFormat.forPattern(noDayCons); - final DateTime dateTime = fmt.parseDateTime(strBuf.toString()); - // Append the last month's day. - strBuf.append(dateTime.dayOfMonth().withMaximumValue().getDayOfMonth()); - } - - return strBuf.toString(); - } - - /** - * Validates the dateValue format: a) if has a valid size; b) if has a numeric value; Note: dateValue must have the format yyyyMMdd. - * - * @param dateValueTmp - * The date to be validated. - * @param pattern - * The accepted date format. - * - * @return true if the date has a valid format. - */ - public static boolean isValidFormatDate(final String dateValueTmp, final String pattern) { - - boolean retVal = true; - try { - final String dateValue = DateUtil.fulfilDate(dateValueTmp); - - final DateTimeFormatter fmt = DateTimeFormat.forPattern(pattern); - fmt.parseDateTime(dateValue); - } catch (final Exception e) { - // We catch Exception because we only have to return false - // value! - retVal = false; - } - return retVal; - } - - /** - * Calculates the age for a given date string. - * - * @param dateVal - * The date to be validated. - * @param now - * The current date. - * @param pattern - * The date pattern. - * - * @return The age value. - */ - public static int calculateAge(final String dateVal, final DateTime now, final String pattern) { - - if (DateUtil.isValidFormatDate(dateVal, pattern)) { - try { - final String dateValueTemp = DateUtil.fulfilDate(dateVal); - final DateTimeFormatter fmt = DateTimeFormat.forPattern(pattern); - final DateTime dateTime = fmt.parseDateTime(dateValueTemp); - // Calculating age - final Years age = Years.yearsBetween(dateTime, now); - - return age.getYears(); - } catch (final IllegalArgumentException e) { - LOG.warn("Invalid date format (" + pattern + ") or an invalid dateValue."); - throw new SecurityPEPSException(PEPSUtil.getConfig(PEPSErrors.INVALID_ATTRIBUTE_VALUE.errorCode()), PEPSUtil.getConfig(PEPSErrors.INVALID_ATTRIBUTE_VALUE.errorMessage()), e); - } - } else { - LOG.warn("Couldn't calculate Age, invalid date!"); - throw new SecurityPEPSException(PEPSUtil.getConfig(PEPSErrors.INVALID_ATTRIBUTE_VALUE.errorCode()), PEPSUtil.getConfig(PEPSErrors.INVALID_ATTRIBUTE_VALUE.errorMessage())); - } - - } - - /** - * Generates the current timestamp. - * - * @return timestamp The current timestamp - */ - public static Timestamp currentTimeStamp() { - final GregorianCalendar cal = new GregorianCalendar(); - final long millis = cal.getTimeInMillis(); - return new Timestamp(millis); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java deleted file mode 100644 index bdcf58fec..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeListProcessor.java +++ /dev/null @@ -1,203 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.util.List; -import java.util.Map; - -/** - * Interface for {@link AttributeListProcessor}. - * - * @author ricardo.ferreira@multicert.com - * - * @version $Revision: $, $Date: $ - * - * @see IPersonalAttributeList - */ -public interface IAttributeListProcessor { - - /** - * Checks if attribute list only contains allowed attributes. - * - * @param attrList - * the requested attribute list - * @param attributes - * the allowed attributes - * - * @return true is all the attributes are allowed. - * - * @see IPersonalAttributeList - */ - boolean hasAllowedAttributes(final IPersonalAttributeList attrList, final List attributes); - - /** - * Lookup for business attribute. - * - * @param attrList - * the requested attribute list - * @param normalAttributes - * the normal attributes - * - * @return true is at least one business attribute was requested. - * - * @see IPersonalAttributeList - */ - boolean hasBusinessAttributes(final IPersonalAttributeList attrList, final List normalAttributes); - - /** - * Lookup for business attribute in normal attribute list (loaded by implementation). - * - * @param attrList - * the requested attribute list - * - * @return true is at least one business attribute was requested. - * - * @see IPersonalAttributeList - */ - boolean hasBusinessAttributes(final IPersonalAttributeList attrList); - - /** - * Adds eIdentifier, name, surname, and DateOfBirth attributes to get business attributes from some AP. - * - * @param attrList - * the requested attribute list - * @param attributes - * the list of attributes to add (eIdentifier, name, surname, and DateOfBirth). - * - * @return the requested attribute list and the new attributes added (eIdentifier, name, surname, and DateOfBirth). - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList addAPMandatoryAttributes(final IPersonalAttributeList attrList, final List attributes); - - /** - * Adds eIdentifier, name, surname, and DateOfBirth attributes, loaded by implementation, to get business attributes from some AP. - * - * @param attrList - * the requested attribute list - * - * @return the requested attribute list and the new attributes added (eIdentifier, name, surname, and DateOfBirth). - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList addAPMandatoryAttributes(final IPersonalAttributeList attrList); - - /** - * Removes from attribute list the given list of attributes. - * - * @param attrList - * the requested attribute list - * @param attributes - * the list of attributes to remove. - * - * @return the requested attribute list and the attributes removed. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList removeAPMandatoryAttributes(final IPersonalAttributeList attrList, final List attributes); - - /** - * Removes from attribute list the given list of attributes and change attributes status if attribute was optional in the request. - * - * @param attrList - * the requested attribute list - * @param attributes - * the map of attributes (attribute name, mandatory/optional) to remove. - * - * @return the requested attribute list and the attributes removed - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList removeAPMandatoryAttributes(IPersonalAttributeList attrList, Map attributes); - - /** - * Removes from attribute list the Stork list of attributes. - * - * @param attrList - * the requested attribute list - * - * @return the attribute list without rejected attributes. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList removeAPRejectedAttributes(IPersonalAttributeList attrList); - - /** - * Checks if mandate attribute exist in the requested Attribute List. Power attribute name to lookup is loaded by implementation. - * - * @param attrList - * the requested attribute list. - * - * @return true if mandate attribute exists or false otherwise. - * - * @see IPersonalAttributeList - */ - boolean hasPowerAttribute(final IPersonalAttributeList attrList); - - /** - * Checks if attribute name was requested and has value. - * - * @param attrList - * the requested attribute list. - * @param attrName - * the attribute name to lookup for . - * - * @return true if attribute was requested and has value or false otherwise. - * - * @see IPersonalAttributeList - */ - boolean hasAttributeValue(final IPersonalAttributeList attrList, final String attrName); - - /** - * Checks if attribute has value. - * - * @param attr - * the attribute to check. - * - * @return true if has value; - * - * @see PersonalAttribute - */ - boolean hasAttributeValue(final PersonalAttribute attr); - - /** - * Gets a map (attribute name, attribute isRequired) of attributes added to attribute list. - * - * @return the Map of attributes added and if is required to attribute list. - */ - Map getNormalAttributesAdded(); - - /** - * Adds normal attributes to personal attribute list if exist in original list (allAttrList). - * - * @param attrList - * the list which will be updated - * @param allAttrList - * the list to check if attributes are to be included. - * - * - * @return the attributes list updated. - */ - IPersonalAttributeList addNormalAttributes(IPersonalAttributeList attrList, IPersonalAttributeList allAttrList); - - /** - * Updates list by filtering any attribute that must be requested instead of using a value obtained from cache (business and legal attrs) - * - * @param attrList - * the list which will be updated - * @return the filtered list - */ - IPersonalAttributeList filterAttrList(IPersonalAttributeList attrList); - - /** - * Updates the list of cached attrs by inserting the business and/or legal attrs requested by the user - * - * @param cachedAttrList - * @param requestedAttrsList - */ - void updateAttrList(IPersonalAttributeList cachedAttrList, IPersonalAttributeList requestedAttrsList); - - /** - * Verifies if normal attribute list contains any attribute that we must always request (usually business attributes) - */ - boolean hasAlwaysRequestAttributes(IPersonalAttributeList attributeList); - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeProvidersMap.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeProvidersMap.java deleted file mode 100644 index cc5fe977f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IAttributeProvidersMap.java +++ /dev/null @@ -1,88 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.util.Iterator; - -/** - * Interface for Attributes Providers map. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.00 $, $Date: 2013-09-20 $ - */ -public interface IAttributeProvidersMap { - - /** - * Returns the object associated the the given key. - * - * @param key - * with which the specified value is to be associated. - * - * @return The object associated the the given key. - */ - IPersonalAttributeList get(AttributeSource key); - - /** - * Associates a key to a value, and inserts them in the session object. - * - * @param key - * with which the specified value is to be associated. - * @param value - * to be associated with the specified key. - * - * @return previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key. - */ - Object put(AttributeSource key, IPersonalAttributeList value); - - /** - * Removes the mapping for this key. - * - * @param key - * with which the specified value is to be associated. - * - * @return previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key. - */ - IPersonalAttributeList remove(AttributeSource key); - - /** - * Returns the number of key-value mappings in this map. - * - * @return the number of key-value mappings in this map. - */ - int size(); - - /** - * Returns true if this map contains a mapping for the specified key. - * - * @param key - * with which the specified value is to be associated. - * - * @return true if this map contains a mapping for the specified key. - */ - boolean containsKey(AttributeSource key); - - /** - * Removes all mappings from this map. - */ - void clear(); - - /** - * Returns true if this map contains no key-value mappings. - * - * @return true if this map contains no key-value mappings. - */ - boolean isEmpty(); - - /** - * Returns an Iterator of the keys contained in this map. The implementation must take care in order for the Iterator to have predictable order of the returned keys. - * - * @return an iterator of the keys contained in this map - */ - Iterator keyIterator(); - - /** - * Merges this Attribute Providers Map with another providers map changes the contents of this map so it returns null - * - * @param aPMap - */ - void mergeWith(IAttributeProvidersMap aPMap); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IPersonalAttributeList.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IPersonalAttributeList.java deleted file mode 100644 index 7eb788461..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IPersonalAttributeList.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.Collection; -import java.util.Iterator; -import java.util.Set; - -/** - * Interface for {@link PersonalAttributeList}. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.16 $, $Date: 2010-11-17 05:15:28 $ - * - * @see PersonalAttribute - */ -@SuppressWarnings("PMD.CloneMethodMustImplementCloneable") -public interface IPersonalAttributeList extends Iterable, Cloneable { - - /** - * Associates the specified value with the specified key in this Personal Attribute List. - * - * @param key - * with which the specified value is to be associated. - * @param value - * to be associated with the specified key. - * - * @return the previous value associated with key, or null if there was no mapping for key. - * - * @see PersonalAttribute - */ - PersonalAttribute put(String key, PersonalAttribute value); - - /** - * Replaces the specified value with the specified key in this Personal Attribute List. - * - * @param key - * with which the specified value is to be replaced. - * @param value - * to be associated with the specified key. - * - * @return the previous value associated with key, or null if there was no mapping for key. - * - * @see PersonalAttribute - */ - PersonalAttribute replace(String key, PersonalAttribute value); - - /** - * Returns the value to which the specified key is mapped, or null if this map contains no mapping for the key. - * - * @param key - * whose associated value is to be returned. - * - * @return The value to which the specified key is mapped, or null if this map contains no mapping for the key. - * - * @see PersonalAttribute - */ - PersonalAttribute get(Object key); - - /** - * Adds to the PersonalAttributeList the given PersonalAttribute. It sets the attribute name as the key to the attribute value. - * - * @param value - * PersonalAttribute to add to the PersonalAttributeList - */ - void add(PersonalAttribute value); - - /** - * Get the size of the Personal Attribute List. - * - * @return size of the Personal Attribute List. - */ - int size(); - - /** - * Checks if the Personal Attribute List contains the given key. - * - * @param key - * with which the specified value is to be associated. - * - * @return true if the Personal Attribute List contains the given key, false otherwise. - */ - boolean containsKey(Object key); - - /** - * Getter for the iterator of the Personal Attribute List values. - * - * @return The iterator for the Personal Attribute List values. - * - * @see PersonalAttribute - */ - Iterator iterator(); - - /** - * Creates a Personal Attribute List from a String representing an Attribute List. - * - * @param attrList - * String Object representing the attribute list. - */ - void populate(String attrList); - - /** - * Removes the mapping for this key from this map if present. - * - * @param key - * key whose mapping is to be removed from the map. - * @return previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null - * with the specified key. - */ - PersonalAttribute remove(Object key); - - /** - * Returns a collection view of the values contained in this map. The collection is backed by the map, so changes to the map are reflected in the collection, and vice-versa. The collection - * supports element removal, which removes the corresponding mapping from this map, via the Iterator.remove, Collection.remove, removeAll, retainAll, and - * clear operations. It does not support the add or addAll operations. - * - * @return a collection view of the values contained in this map. - */ - Collection values(); - - /** - * Returns a {@link Set} view of the keys contained in this map. The set is backed by the map, so changes to the map are reflected in the set, and vice-versa. If the map is modified while an - * iteration over the set is in progress (except through the iterator's own remove operation), the results of the iteration are undefined. The set supports element removal, which removes - * the corresponding mapping from the map, via the Iterator.remove, Set.remove, removeAll, retainAll, and clear operations. It does not support the - * add or addAll operations. - * - * @return a set view of the keys contained in this map - */ - Set keySet(); - - /** - * Returns a IPersonalAttributeList of the complex attributes. - * - * @return an IPersonalAttributeList of the complex attributes. - */ - IPersonalAttributeList getComplexAttributes(); - - /** - * Returns a IPersonalAttributeList of the simple value attributes. - * - * @return an IPersonalAttributeList of the simple value attributes. - */ - IPersonalAttributeList getSimpleValueAttributes(); - - /** - * Returns a IPersonalAttributeList of the mandatory attributes in this map. - * - * @return an IPersonalAttributeList of the mandatory attributes contained in this map. - */ - IPersonalAttributeList getMandatoryAttributes(); - - /** - * Returns a IPersonalAttributeList merged with provided one. - * - * @return an IPersonalAttributeList the attribute list to merge with. - */ - IPersonalAttributeList merge(IPersonalAttributeList attrList); - - /** - * Returns a IPersonalAttributeList of the optional attributes in this map. - * - * @return an IPersonalAttributeList of the optional attributes contained in this map. - */ - IPersonalAttributeList getOptionalAttributes(); - - /** - * Returns true if this map contains no key-value mappings. - * - * @return true if this map contains no key-value mappings. - */ - boolean isEmpty(); - - /** - * Returns true if this map contains at least one element that doesn't have value. - * - * @return true if this map contains at least one element that doesn't have value. - */ - boolean hasMissingValues(); - - /** - * Returns a copy of this IPersonalAttributeList instance. - * - * @return The copy of this IPersonalAttributeList. - */ - Object clone(); - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkLogger.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkLogger.java deleted file mode 100644 index 1bb8cffa8..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkLogger.java +++ /dev/null @@ -1,249 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * Interface for stork logging. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.10 $, $Date: 2011-02-17 22:44:34 $ - */ -public interface IStorkLogger { - - /** - * Getter for SpApplication. - * - * @return The SpApplication value. - */ - String getSpApplication(); - - /** - * Setter for SpApplication. - * - * @param spApplication - * The SP Application. - */ - void setSpApplication(String spApplication); - - /** - * Getter for ProviderName. - * - * @return The ProviderName value. - */ - String getProviderName(); - - /** - * Setter for ProviderName. - * - * @param providerName - * The provider name. - */ - void setProviderName(String providerName); - - /** - * - * Getter for Origin. - * - * @return The Origin value. - * - */ - String getOrigin(); - - /** - * Setter for Origin. - * - * @param origin - * The origin. - */ - void setOrigin(String origin); - - /** - * - * Getter for QAA Level. - * - * @return The QAA Level value. - * - */ - int getQaaLevel(); - - /** - * Setter for QAA Level. - * - * @param qaaLevel - * The qaa level. - */ - void setQaaLevel(int qaaLevel); - - /** - * - * Getter for timestamp. - * - * @return The timestamp value. - * - */ - String getTimestamp(); - - /** - * Setter for timestamp. - * - * @param timestamp - * The request's timestamp. - */ - void setTimestamp(String timestamp); - - /** - * Getter for InResponseTo. - * - * @return The InResponseTo value. - */ - String getInResponseTo(); - - /** - * Setter for InResponseTo. - * - * @param inResponseTo - * The Saml's response id. - */ - void setInResponseTo(String inResponseTo); - - /** - * Getter for InResponseToSPReq. - * - * @return The InResponseToSPReq value. - */ - String getInResponseToSPReq(); - - /** - * Setter for InResponseToSPRequ. - * - * @param inResponseToSPReq - * The Saml's response id. - */ - void setInResponseToSPReq(String inResponseToSPReq); - - /** - * Getter for opType. - * - * @return The opType value. - */ - String getOpType(); - - /** - * Setter for opType. - * - * @param opType - * The operation type. - */ - void setOpType(String opType); - - /** - * Getter for destination. - * - * @return The destination value. - */ - String getDestination(); - - /** - * Setter for destinationIp. - * - * @param destination - * The remote IP. - */ - void setDestination(String destination); - - /** - * Getter for message or assertion consumer. - * - * @return The message or assertion consumer. - */ - String getMessage(); - - /** - * Setter for message or assertion consumer. - * - * @param message - * or assertion consumer. - */ - void setMessage(String message); - - /** - * Getter for country. - * - * @return The country value. - */ - String getCountry(); - - /** - * Setter for country. - * - * @param country - * The country. - */ - void setCountry(String country); - - /** - * Getter for samlHash. - * - * @return The samlHash value. - */ - byte[] getSamlHash(); - - /** - * Setter for samlHash. - * - * @param samlHash - * the encrypted SAML token - */ - void setSamlHash(byte[] samlHash); - - /** - * Getter for msgId. - * - * @return the msgId - */ - String getMsgId(); - - /** - * Setter for msgId. - * - * @param msgId - * the ID of the originator of this message - */ - void setMsgId(String msgId); - - /** - * Getter for sPMsgId. - * - * @return the sPMsgId - */ - String getSPMsgId(); - - /** - * Setter for sPMsgId. - * - * @param sPMsgId - * the ID of the originator of this message - */ - void setSPMsgId(String sPMsgId); - - /** - * The format of the returned String must be the following: "requestCounter#ddMMMyyyykk:mm:ss#opType#originIp#originName #destinationIp#destinationName#samlHash#[originatorName#msgId#]" - * - * The values enclosed in '[]' only apply when logging responses. - * - * @return {@inheritDoc} - */ - @Override - String toString(); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkSession.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkSession.java deleted file mode 100644 index 33105c58f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/IStorkSession.java +++ /dev/null @@ -1,84 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * Interface for stork session. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.9 $, $Date: 2010-11-17 05:15:28 $ - */ -public interface IStorkSession { - - /** - * Returns the object associated the the given key. - * - * @param key - * with which the specified value is to be associated. - * - * @return The object associated the the given key. - */ - Object get(Object key); - - /** - * Associates a key to a value, and inserts them in the session object. - * - * @param key - * with which the specified value is to be associated. - * @param value - * to be associated with the specified key. - * - * @return previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key. - */ - Object put(String key, Object value); - - /** - * Removes the mapping for this key. - * - * @param key - * with which the specified value is to be associated. - * - * @return previous value associated with specified key, or null if there was no mapping for key. A null return can also indicate that the map previously associated null with the specified key. - */ - Object remove(Object key); - - /** - * Returns the number of key-value mappings in this map. - * - * @return the number of key-value mappings in this map. - */ - int size(); - - /** - * Returns true if this map contains a mapping for the specified key. - * - * @param key - * with which the specified value is to be associated. - * - * @return true if this map contains a mapping for the specified key. - */ - boolean containsKey(Object key); - - /** - * Removes all mappings from this map. - */ - void clear(); - - /** - * Returns true if this map contains no key-value mappings. - * - * @return true if this map contains no key-value mappings. - */ - boolean isEmpty(); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java deleted file mode 100644 index f326ccfe9..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/Linker.java +++ /dev/null @@ -1,330 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -import org.apache.log4j.Logger; - -/** - * This class is a bean used to store the information of Attribute Providers, the Attribute List to be requested, the Assertions returned by the Attribute Providers and the values that each Attribute - * has. This information along with the current status of the Linker (the attribute providers that were queried and the remaining providers) is used by the PEPS actions in order to complete the - * Attribute gathering. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos (ilias@aegean.gr) - * - * @version $Revision: 1.50 $, $Date: 2013-11-28 $ - */ -public final class Linker implements Serializable { - /** - * Unique identifier. - */ - private static final long serialVersionUID = -3268006381745987237L; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(Linker.class.getName()); - - /** - * Attributes Providers map. - */ - private IAttributeProvidersMap attributeProvidersMap; - - /** - * Assertion map. - */ - private Map> assertions; - - /** - * The current index of local (domestic) Attribute Providers. - */ - private int localIndex; - - /** - * The current index of remote (foreign) Attribute Providers - countries. - */ - private int remoteIndex; - - /** - * Constructs an empty Linker object. - */ - public Linker() { - localIndex = 0; - remoteIndex = 0; - - assertions = new LinkedHashMap>(); - } - - /** - * Based on the internal state of the Linker it returns the next local Attribute Source - * - * @return The next Attribute Source or null if not found - * - * @see AttributeSource - */ - public AttributeSource getNextLocalProvider() { - Iterator iterator; - AttributeSource source, found; - int curIndex = 0; - - found = null; - - if (attributeProvidersMap != null && !attributeProvidersMap.isEmpty()) { - iterator = attributeProvidersMap.keyIterator(); - while (iterator.hasNext()) { - source = iterator.next(); - - if (source.getSourceType() == AttributeSource.SOURCE_LOCAL_APROVIDER) { - if (curIndex >= localIndex) { - found = source; - - break; - } - - curIndex++; - } - } - } - - return found; - } - - /** - * Based on the internal state of the Linker it returns the next remote Attribute Source - * - * @return The next Attribute Source or null if not found - * - * @see AttributeSource - */ - public AttributeSource getNextRemoteProvider() { - Iterator iterator; - AttributeSource source, found; - int curIndex = 0; - - found = null; - - if (attributeProvidersMap != null && !attributeProvidersMap.isEmpty()) { - iterator = attributeProvidersMap.keyIterator(); - while (iterator.hasNext()) { - source = iterator.next(); - - if (source.getSourceType() == AttributeSource.SOURCE_REMOTE_COUNTRY) { - if (curIndex >= remoteIndex) { - found = source; - - break; - } - - curIndex++; - } - } - } - - return found; - } - - /** - * It updates the Linker with the values returned by the Attribute Source. It also advances to the next index in order to mark this attribute source as completed. - * - * @param source - * The Attribute Source that was queried for attribute values. - * @param attrResponse - * The attrResponse returned by the Attribute Source that contains the attribute values. - * - * @see AttributeSource, STORKAttrQueryResponse - */ - public void setProviderReponse(AttributeSource source, STORKAttrQueryResponse attrResponse) { - if (source.getSourceType() == AttributeSource.SOURCE_REMOTE_COUNTRY) - remoteIndex++; - else - localIndex++; - - // Assertion storage - if (this.assertions.containsKey(source)) { - this.assertions.get(source).add(attrResponse); - } else { - List temp = new ArrayList(); - temp.add(attrResponse); - this.assertions.put(source, temp); - } - - if (source.getSourceType() == AttributeSource.SOURCE_REMOTE_COUNTRY) { - this.attributeProvidersMap.put(source, attrResponse.getTotalPersonalAttributeList()); - } else { - this.attributeProvidersMap.put(source, attrResponse.getPersonalAttributeList()); - } - } - - /** - * Reset the internal state of the local Attribute Source in order to start over. - */ - public void resetLocalIndex() { - localIndex = 0; - } - - /** - * Reset the internal state of the remote Attribute Source in order to start over. - */ - public void resetRemoteIndex() { - remoteIndex = 0; - } - - /** - * Setter for attributeProvidersMap. - * - * @param attributeProvidersMap - * The attributeProvidersMap to set. - */ - public void setAttributeProvidersMap(IAttributeProvidersMap attributeProvidersMap) { - this.attributeProvidersMap = attributeProvidersMap; - } - - /** - * Getter for attributeProvidersMap. - * - * @return attributeProvidersMap - */ - public IAttributeProvidersMap getAttributeProvidersMap() { - return attributeProvidersMap; - } - - /** - * Returns the Personal Attribute list of the provided Attribute Source. - * - * @param source - * The attributeSource in reference - * - * @return The IPersonalAttributeList assosiated with this source or null if empty - * - * @see IPersonalAttributeList - */ - public IPersonalAttributeList getProviderAttributes(AttributeSource source) { - if (attributeProvidersMap.containsKey(source)) - return attributeProvidersMap.get(source); - else - return null; - } - - /** - * Returns the merged Personal Attribute list from all the Attribute Sources. - * - * @return The IPersonalAttributeList merged Personal Attribute list or null if empty - * - * @see IPersonalAttributeList - */ - public IPersonalAttributeList getAllAttributes() { - Iterator iterator; - AttributeSource source; - IPersonalAttributeList list, merged; - - merged = null; - - if (attributeProvidersMap != null && !attributeProvidersMap.isEmpty()) { - iterator = attributeProvidersMap.keyIterator(); - - merged = new PersonalAttributeList(); - while (iterator.hasNext()) { - source = iterator.next(); - list = this.getProviderAttributes(source); - - for (final PersonalAttribute pa : list) { - merged.add(pa); - } - } - } - - return merged; - } - - /** - * Returns a List with all the assertions gathered by the AAS-PEPS module returned both by local APs or remote A-PEPS. - * - * @return The assertions returned from the APs and A-PEPS - */ - public List getAttrQueryResponseList() { - List originalAssertions; - - originalAssertions = new ArrayList(); - - // Gather all assertions - for (List element : this.assertions.values()) { - originalAssertions.addAll(element); - } - return originalAssertions; - } - - /** - * Checks the internal state of the Linker and if all Attribute Sources where visited returns true, otherwise it returns false. So if you go directly from AtPLinkerAction to MoreAttributesAction - * the call will have, since the method setProviderReponse was not executed from every Attribute Source. - * - * @return true if everything is OK, false otherwise - */ - public boolean isComplete() { - boolean outcome = false; - - LOG.debug("Check if linkder is complete: R[" + remoteIndex + "], L[" + localIndex + "], S[" + attributeProvidersMap.size() + "]"); - if (attributeProvidersMap != null && !attributeProvidersMap.isEmpty()) { - if ((remoteIndex + localIndex) == attributeProvidersMap.size()) - outcome = true; - } else { - outcome = true; - } - - return outcome; - } - - /** - * Merge the two Linker objects. - * - * @param previous - * The other Linker object to merge with this one. - */ - public void mergeWith(Linker previous) { - // BEFORE - if (LOG.isDebugEnabled()) { - LOG.debug("The attributeProvidersMap from the current object."); - ((AttributeProvidersMap) this.attributeProvidersMap).trace(); - LOG.debug("The attributeProvidersMap from the provided object."); - ((AttributeProvidersMap) previous.getAttributeProvidersMap()).trace(); - } - - IAttributeProvidersMap map = previous.getAttributeProvidersMap(); - Iterator items = map.keyIterator(); - while (items.hasNext()) { - AttributeSource item = items.next(); - IPersonalAttributeList pal = map.get(item); - - if (this.attributeProvidersMap.containsKey(item)) { - IPersonalAttributeList new_pal = this.attributeProvidersMap.get(item); - - for (PersonalAttribute pa : pal) - new_pal.add(pa); - } else { - if (item.getSourceType() == AttributeSource.SOURCE_REMOTE_COUNTRY) - remoteIndex++; - else - localIndex++; - - this.attributeProvidersMap.put(item, pal); - } - } - - // AFTER - if (LOG.isDebugEnabled()) { - LOG.debug("The attributeProvidersMap after the merge."); - ((AttributeProvidersMap) this.attributeProvidersMap).trace(); - } - - for (AttributeSource as : previous.assertions.keySet()) { - if (!assertions.containsKey(as)) { - assertions.put(as, previous.assertions.get(as)); - } else { - assertions.get(as).addAll(previous.assertions.get(as)); - } - } - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java deleted file mode 100644 index 7d758d754..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSErrors.java +++ /dev/null @@ -1,394 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains all the STORK PEPS, Commons and Specific errors constant identifiers. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.10 $, $Date: 2011-02-17 22:44:34 $ - */ -public enum PEPSErrors { - - /** - * Represents the 'authenticationFailed' constant error identifier. - */ - AUTHENTICATION_FAILED_ERROR("authenticationFailed"), - /** - * Represents the 'spCountrySelector.errorCreatingSAML' constant error identifier. - */ - SP_COUNTRY_SELECTOR_ERROR_CREATE_SAML("spCountrySelector.errorCreatingSAML"), - /** - * Represents the 'spCountrySelector.destNull' constant error identifier. - */ - SP_COUNTRY_SELECTOR_DESTNULL("spCountrySelector.destNull"), - /** - * Represents the 'spCountrySelector.invalidAttr' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_ATTR("spCountrySelector.invalidAttr"), - /** - * Represents the 'spCountrySelector.invalidProviderName' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_PROVIDER_NAME("spCountrySelector.invalidProviderName"), - /** - * Represents the 'spCountrySelector.invalidQaaSPid' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_QAASPID("spCountrySelector.invalidQaaSPid"), - /** - * Represents the 'spCountrySelector.invalidSpId' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_SPID("spCountrySelector.invalidSpId"), - /** - * Represents the 'spCountrySelector.invalidSPQAA' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_SPQAA("spCountrySelector.invalidSPQAA"), - /** - * Represents the 'spCountrySelector.invalidSpURL' constant error identifier. - */ - SP_COUNTRY_SELECTOR_INVALID_SPURL("spCountrySelector.invalidSpURL"), - /** - * Represents the 'spCountrySelector.spNotAllowed' constant error identifier. - */ - SP_COUNTRY_SELECTOR_SPNOTALLOWED("spCountrySelector.spNotAllowed"), - - /** - * Represents the 'sProviderAction.errorCreatingSAML' constant error identifier. - */ - SPROVIDER_SELECTOR_ERROR_CREATE_SAML("sProviderAction.errorCreatingSAML"), - /** - * Represents the 'sProviderAction.attr' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_ATTR("sProviderAction.invalidAttr"), - /** - * Represents the 'sProviderAction.country' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_COUNTRY("sProviderAction.invalidCountry"), - /** - * Represents the 'sProviderAction.relayState' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_RELAY_STATE("sProviderAction.invalidRelayState"), - /** - * Represents the 'sProviderAction.saml' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SAML("sProviderAction.invalidSaml"), - /** - * Represents the 'sProviderAction.spAlias' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPALIAS("sProviderAction.invalidSPAlias"), - /** - * Represents the 'sProviderAction.spDomain' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPDOMAIN("sProviderAction.invalidSPDomain"), - /** - * Represents the 'sProviderAction.spId' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPID("sProviderAction.invalidSPId"), - /** - * Represents the 'sProviderAction.spQAA' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPQAA("sProviderAction.invalidSPQAA"), - /** - * Represents the 'sProviderAction.spQAAId' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPQAAID("sProviderAction.invalidSPQAAId"), - /** - * Represents the 'sProviderAction.spRedirect' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SPREDIRECT("sProviderAction.invalidSPRedirect"), - /** - * Represents the 'sPPowerValidationAction.invalidSPPVAttrList' constant error identifier. - */ - SPPOWERVALIDATION_SELECTOR_INVALID_SP_PV_ATTR_LIST("sPPowerValidationAction.invalidSPPVAttrList"), - - /** - * Represents the 'sProviderAction.invalidSPProviderName' constant error identifier. - */ - SPROVIDER_SELECTOR_INVALID_SP_PROVIDERNAME("sProviderAction.invalidSPProviderName"), - /** - * Represents the 'sProviderAction.spNotAllowed' constant error identifier. - */ - SPROVIDER_SELECTOR_SPNOTALLOWED("sProviderAction.spNotAllowed"), - - /** - * Represents the 'internalError' constant error identifier. - */ - INTERNAL_ERROR("internalError"), - - /** - * Represents the 'colleagueRequest.attrNull' constant error identifier. - */ - COLLEAGUE_REQ_ATTR_NULL("colleagueRequest.attrNull"), - /** - * Represents the 'colleagueRequest.errorCreatingSAML' constant error identifier. - */ - COLLEAGUE_REQ_ERROR_CREATE_SAML("colleagueRequest.errorCreatingSAML"), - /** - * Represents the 'colleagueRequest.invalidCountryCode' constant error identifier. - */ - COLLEAGUE_REQ_INVALID_COUNTRYCODE("colleagueRequest.invalidCountryCode"), - /** - * Represents the 'colleagueRequest.invalidDestUrl' constant error identifier. - */ - COLLEAGUE_REQ_INVALID_DEST_URL("colleagueRequest.invalidDestUrl"), - /** - * Represents the 'colleagueRequest.invalidQaa' constant error identifier. - */ - COLLEAGUE_REQ_INVALID_QAA("colleagueRequest.invalidQaa"), - /** - * Represents the 'colleagueRequest.invalidRedirect' constant error identifier. - */ - COLLEAGUE_REQ_INVALID_REDIRECT("colleagueRequest.invalidRedirect"), - /** - * Represents the 'colleagueRequest.invalidSAML' constant error identifier. - */ - COLLEAGUE_REQ_INVALID_SAML("colleagueRequest.invalidSAML"), - - /** - * Represents the 'colleaguePVRequest.invalidPVAttrList' constant error identifier. - */ - COLLEAGUE_PV_REQ_INVALID_PV_ATTR_LIST("colleaguePVRequest.invalidPVAttrList"), - - /** - * Represents the 'cpepsRedirectUrl' constant error identifier. - */ - CPEPS_REDIRECT_URL("cpepsRedirectUrl"), - /** - * Represents the 'spepsRedirectUrl' constant error identifier. - */ - SPEPS_REDIRECT_URL("spepsRedirectUrl"), - /** - * Represents the 'sProviderAction.invCountry' constant error identifier. - */ - SP_ACTION_INV_COUNTRY("sProviderAction.invCountry"), - - /** - * Represents the 'providernameAlias.invalid' constant error identifier. - */ - PROVIDER_ALIAS_INVALID("providernameAlias.invalid"), - - /** - * Represents the 'cPeps.attrNull' constant error identifier. - */ - CPEPS_ATTR_NULL("cPeps.attrNull"), - - /** - * Represents the 'colleagueResponse.invalidSAML' constant error identifier. - */ - COLLEAGUE_RESP_INVALID_SAML("colleagueResponse.invalidSAML"), - - /** - * Represents the 'citizenNoConsent.mandatory' constant error identifier. - */ - CITIZEN_NO_CONSENT_MANDATORY("citizenNoConsent.mandatory"), - /** - * Represents the 'citizenResponse.mandatory' constant error identifier. - */ - CITIZEN_RESPONSE_MANDATORY("citizenResponse.mandatory"), - /** - * Represents the 'attVerification.mandatory' constant error identifier. - */ - ATT_VERIFICATION_MANDATORY("attVerification.mandatory"), - /** - * Represents the 'attrValue.verification' constant error identifier. - */ - ATTR_VALUE_VERIFICATION("attrValue.verification"), - - /** - * Represents the 'audienceRestrictionError' constant error identifier. - */ - AUDIENCE_RESTRICTION("audienceRestrictionError"), - /** - * Represents the 'auRequestIdError' constant error identifier. - */ - AU_REQUEST_ID("auRequestIdError"), - /** - * Represents the 'domain' constant error identifier. - */ - DOMAIN("domain"), - /** - * Represents the 'hash.error' constant error identifier. - */ - HASH_ERROR("hash.error"), - /** - * Represents the 'invalidAttributeList' constant error identifier. - */ - INVALID_ATTRIBUTE_LIST("invalidAttributeList"), - /** - * Represents the 'invalidAttributeValue' constant error identifier. - */ - INVALID_ATTRIBUTE_VALUE("invalidAttributeValue"), - /** - * Represents the 'qaaLevel' constant error identifier. - */ - QAALEVEL("qaaLevel"), - /** - * Represents the 'requests' constant error identifier. - */ - REQUESTS("requests"), - /** - * Represents the 'SPSAMLRequest' constant error identifier. - */ - SP_SAML_REQUEST("SPSAMLRequest"), - /** - * Represents the 'spepsSAMLRequest' constant error identifier. - */ - SPEPS_SAML_REQUEST("spepsSAMLRequest"), - /** - * Represents the 'IdPSAMLResponse' constant error identifier. - */ - IDP_SAML_RESPONSE("IdPSAMLResponse"), - /** - * Represents the 'cpepsSAMLResponse' constant error identifier. - */ - CPEPS_SAML_RESPONSE("cpepsSAMLResponse"), - /** - * Represents the 'cpepsSAMLResponse' constant error identifier. - */ - SPEPS_SAML_RESPONSE("spepsSAMLResponse"), - /** - * Represents the 'session' constant error identifier. - */ - SESSION("session"), - /** - * Represents the 'invalid.session' constant error identifier. - */ - INVALID_SESSION("invalid.session"), - /** - * Represents the 'invalid.sessionId' constant error identifier. - */ - INVALID_SESSION_ID("invalid.sessionId"), - /** - * Represents the 'missing.sessionId' constant error identifier. - */ - MISSING_SESSION_ID("sessionError"), - /** - * Represents the 'missing.mandate' constant error identifier. - */ - MISSING_MANDATE("missing.mandate"), - /** - * Represents the 'AtPSAMLResponse' constant error identifier. - */ - ATP_SAML_RESPONSE("AtPSAMLResponse"), - - /** - * Represents the 'AtPSAMLResponse' constant error identifier. - */ - ATP_RESPONSE_ERROR("atp.response.error"), - - /** - * Represents the 'apepsSAMLRequest' constant error identifier. - */ - APEPS_SAML_REQUEST("apepsSAMLRequest"), - - /** - * Represents the 'apepsSAMLResponse' constant error identifier. - */ - APEPS_SAML_RESPONSE("apepsSAMLResponse"), - - /** - * Represents the 'invalid.apepsRedirectUrl' constant error identifier. - */ - INVALID_APEPS_REDIRECT_URL("invalid.apepsRedirectUrl"), - - /** - * Represents the 'invalid.apepsCallbackUrl' constant error identifier. - */ - INVALID_APEPS_CALLBACK_URL("invalid.apepsCallbackUrl"), - - /** - * Represents the 'colleagueAttributeRequest.invalidSAML' constant error identifier. - */ - COLLEAGUE_ATTR_REQ_INVALID_SAML("colleagueAttributeRequest.invalidSAML"), - - /** - * Represents the 'invalid.attr.country.code' constant error identifier. - */ - INVALID_COUNTRY_CODE("invalid.attr.country.code"), - /** - * DTL error codes. - */ - DTL_ERROR_ADD("dtl.error.adding.doc"), DTL_ERROR_GET("dtl.error.getting.doc"), DTL_ERROR_REQUEST("dtl.error.request.attribute"), DTL_INVALID_XML("dtl.invalid.xml"), DTL_EMPTY_REQUEST( - "dtl.empty.request"), DTL_ERROR_DOCUMENT_URL("dtl.error.no.document.url"), DTL_ERROR_NO_DOCUMENT("dtl.error.no.document"), DTL_ERROR_MARSHALL_SIGNREQUEST("dtl.error.marshall.signrequest"), DTL_ERROR_MARSHALL_SIGNRESPONSE( - "dtl.error.marshall.signresponse"), - /** - * Represents the 'colleagueAttributeRequest.invalidSAML' constant error identifier. - */ - COLLEAGUE_LOGOUT_INVALID_SAML("colleagueLogoutRequest.invalidSAML"); - - /** - * Represents the constant's value. - */ - private String error; - - /** - * Solo Constructor. - * - * @param nError - * The Constant error value. - */ - PEPSErrors(final String nError) { - this.error = nError; - } - - /** - * Construct the errorCode Constant value. - * - * @return The errorCode Constant. - */ - public String errorCode() { - return error + ".code"; - } - - /** - * Construct the errorCode Constant value with the given code text. - * - * @param text - * the code text to append to the constant. - * - * @return The errorCode Constant for the given code text. - */ - public String errorCode(final String text) { - return error + "." + text + ".code"; - } - - /** - * Construct the errorMessage constant value. - * - * @return The errorMessage constant. - */ - public String errorMessage() { - return error + ".message"; - } - - /** - * Construct the errorMessage Constant value with the given message text. - * - * @param text - * the message text to append to the constant. - * - * @return The errorMessage Constant for the given text. - */ - public String errorMessage(final String text) { - return error + "." + text + ".message"; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - return error; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java deleted file mode 100644 index 6b876b680..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSParameters.java +++ /dev/null @@ -1,651 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains all the STORK PEPS, Commons and Specific Parameters. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.13 $, $Date: 2011-07-07 20:48:45 $ - */ -public enum PEPSParameters { - - /** - * Represents the 'apId' parameter constant. - */ - AP_ID("apId"), - /** - * Represents the 'apUrl' parameter constant. - */ - AP_URL("apUrl"), - /** - * Represents the 'ap.number' parameter constant. - */ - AP_NUMBER("ap.number"), - - /** - * Represents the 'assertionConsumerServiceURL' parameter constant. - */ - ASSERTION_CONSUMER_S_URL("assertionConsumerServiceURL"), - - /** - * Represents the 'auth' parameter constant. - */ - AUTHENTICATION("auth"), - - /** - * Represents the 'attr' parameter constant. - */ - ATTRIBUTE("attr"), - /** - * Represents the 'attrName' parameter constant. - */ - ATTRIBUTE_NAME("attrName"), - /** - * Represents the 'attrStatus' parameter constant. - */ - ATTRIBUTE_STATUS("attrStatus"), - /** - * Represents the 'attrType' parameter constant. - */ - ATTRIBUTE_TYPE("attrType"), - /** - * Represents the 'attrValue' parameter constant. - */ - ATTRIBUTE_VALUE("attrValue"), - /** - * Represents the 'attrList' parameter constant. - */ - ATTRIBUTE_LIST("attrList"), - /** - * Represents the 'allAttrList' parameter constant. - */ - ALL_ATTRIBUTE_LIST("allAttrList"), - /** - * Represents the 'apMandAttrList' parameter constant. - */ - AP_MANDATORY_ATTRIBUTE_LIST("apMandAttrList"), - /** - * Represents the 'attrTuple' parameter constant. - */ - ATTRIBUTE_TUPLE("attrTuple"), - /** - * Represents the 'attribute-missing' parameter constant. - */ - ATTRIBUTE_MISSING("attribute-missing"), - /** - * Represents the 'attributesNotAllowed' parameter constant. - */ - ATTRIBUTES_NOT_ALLOWED("attributesNotAllowed"), - /** - * Represents the 'authnRequest' parameter constant. - */ - AUTH_REQUEST("authnRequest"), - - /** - * Represents the 'attrValue.number' parameter constant. - */ - ATTR_VALUE_NUMBER("attrValue.number"), - - /** - * Represents the 'derivation.date.format' parameter constant. - */ - DERIVATION_DATE_FORMAT("derivation.date.format"), - /** - * Represents the 'deriveAttr.number' parameter constant. - */ - DERIVE_ATTRIBUTE_NUMBER("deriveAttr.number"), - - /** - * Represents the complex attributes parameter constant. - */ - COMPLEX_ADDRESS_VALUE("canonicalResidenceAddress"), COMPLEX_NEWATTRIBUTE_VALUE("newAttribute2"), COMPLEX_HASDEGREE_VALUE("hasDegree"), COMPLEX_MANDATECONTENT_VALUE("mandate"), - /** - * Represents the 'consent-type' parameter constant. - */ - CONSENT_TYPE("consent-type"), - /** - * Represents the 'consent-value' parameter constant. - */ - CONSENT_VALUE("consent-value"), - /** - * Represents the 'country' parameter constant. - */ - COUNTRY("country"), - /** - * Represents the 'countryOrigin' parameter constant. - */ - COUNTRY_ORIGIN("countryOrigin"), - - /** - * Represents the 'cpepsURL' parameter constant. - */ - CPEPS_URL("cpepsURL"), - /** - * Represents the 'callback' parameter constant. - */ - CPEPS_CALLBACK("callback"), - /** - * Represents the 'peps.specificidpredirect.url' parameter constant. - */ - CPEPS_IDP_CALLBACK_VALUE("peps.specificidpredirect.url"), - /** - * Represents the 'peps.specificapredirect.url' parameter constant. - */ - CPEPS_AP_CALLBACK_VALUE("peps.specificapredirect.url"), - - /** - * Represents the 'errorCode' parameter constant. - */ - ERROR_CODE("errorCode"), - /** - * Represents the 'subCode' parameter constant. - */ - ERROR_SUBCODE("subCode"), - /** - * Represents the 'errorMessage' parameter constant. - */ - ERROR_MESSAGE("errorMessage"), - /** - * Represents the 'errorRedirectUrl' parameter constant. - */ - ERROR_REDIRECT_URL("errorRedirectUrl"), - - /** - * errorRedirectUrl Represents the 'external-authentication' parameter constant. - */ - EXTERNAL_AUTH("external-authentication"), - /** - * Represents the 'external-ap' parameter constant. - */ - EXTERNAL_AP("external-ap"), - /** - * Represents the 'external-pv' parameter constant. - */ - EXTERNAL_PV("external-pv"), - /** - * Represents the 'external-sig-module' parameter constant. - */ - EXT_SIG_CREATOR_MOD("external-sig-module"), - - /** - * Represents the 'http-x-forwarded-for' parameter constant. - */ - HTTP_X_FORWARDED_FOR("http-x-forwarded-for"), - - /** - * Represents the 'idp.url' parameter constant. - */ - IDP_URL("idp.url"), - /** - * Represents the 'internal-authentication' parameter constant. - */ - INTERNAL_AUTH("internal-authentication"), - /** - * Represents the 'internal-ap' parameter constant. - */ - INTERNAL_AP("internal-ap"), - /** - * Represents the 'internal-pv' parameter constant. - */ - INTERNAL_PV("internal-pv"), - - /** - * Represents the 'samlIssuer' parameter constant. - */ - ISSUER("samlIssuer"), - /** - * Represents the 'samlIssuer.idp' parameter constant. - */ - ISSUER_IDP("samlIssuer.idp"), - /** - * Represents the 'samlIssuer.atp' parameter constant. - */ - ISSUER_ATP("samlIssuer.atp"), - - /** - * Represents the 'mandatory' parameter constant. - */ - MANDATORY("mandatory"), - /** - * Represents the 'mandatoryAttributeMissing' parameter constant. - */ - MANDATORY_ATTR_MISSING("mandatoryAttributeMissing"), - /** - * Represents the 'mandatoryConsentAttrMissing' parameter constant. - */ - MANDATORY_CONSENT_MISSING("mandatoryConsentAttrMissing"), - /** - * Represents the 'missing-attrs' parameter constant. - */ - MISSING_ATTRS("missing-attrs"), - /** - * Represents the 'no-more-attrs' parameter constant. - */ - NO_MORE_ATTRS("no-more-attrs"), - - /** - * Represents the 'optional' parameter constant. - */ - OPTIONAL("optional"), - - /** - * Represents the 'no-consent-type' parameter constant. - */ - NO_CONSENT_TYPE("no-consent-type"), - /** - * Represents the 'no-consent-value' parameter constant. - */ - NO_CONSENT_VALUE("no-consent-value"), - - /** - * Represents the 'provider.name' parameter constant. - */ - PROVIDER_NAME_VALUE("providerName"), - /** - * Represents the 'cpeps.askconsent' parameter constant. - */ - PEPS_ASK_CONSENT("cpeps.askconsent"), - /** - * Represents the 'cpeps.askconsentvalue' parameter constant. - */ - PEPS_ASK_CONSENT_VALUE("cpeps.askconsentvalue"), - /** - * Represents the 'pepsAuth' parameter constant. - */ - PEPS_AUTH_CONSENT("pepsAuth"), - /** - * Represents the 'validation.bypass' parameter constant. - */ - PEPS_BYPASS("validation.bypass"), - /** - * Represents the 'cpeps.number' parameter constant. - */ - PEPS_NUMBER("cpeps.number"), - /** - * Represents the 'cpeps.specificapredirect.url' parameter constant. - */ - PEPS_SPECIFIC_URL("cpeps.specificapredirect.url"), - /** - * Represents the 'pv.url' parameter constant. - */ - PV_URL("pv.url"), - - /** - * Represents the 'qaaLevel' parameter constant. - */ - QAALEVEL("qaaLevel"), - - /** - * Represents the 'speps.redirectUrl' parameter constant. - */ - SPEPS_REDIRECT_URL("speps.redirectUrl"), - - /** - * Represents the 'sp.redirectUrl' parameter constant. - */ - SP_REDIRECT_URL("sp.redirectUrl"), - /** - * Represents the 'cpeps.redirectUrl' parameter constant. - */ - CPEPS_REDIRECT_URL("cpeps.redirectUrl"), - /** - * Represents the 'RelayState' parameter constant. - */ - RELAY_STATE("RelayState"), - /** - * Represents the 'remoteAddr' parameter constant. - */ - REMOTE_ADDR("remoteAddr"), - /** - * Represents the 'remoteUser' parameter constant. - */ - REMOTE_USER("remoteUser"), - - /** - * Represents the 'SAMLRequest' parameter constant. - */ - SAML_REQUEST("SAMLRequest"), - /** - * Represents the 'SAMLResponse' parameter constant. - */ - SAML_RESPONSE("SAMLResponse"), - /** - * Represents the 'SAMLFail' parameter constant. - */ - SAML_TOKEN_FAIL("SAMLFail"), - /** - * Represents the 'TokenId' parameter constant. - */ - SAML_TOKEN_ID("TokenId"), - /** - * Represents the 'inResponseTo' parameter constant. - */ - SAML_IN_RESPONSE_TO("inResponseTo"), - /** - * Represents the 'inResponseTo.idp' parameter constant. - */ - SAML_IN_RESPONSE_TO_IDP("inResponseTo.idp"), - /** - * Represents the 'inResponseTo.atp' parameter constant. - */ - SAML_IN_RESPONSE_TO_ATP("inResponseTo.atp"), - /** - * Represents the 'SignatureResponse' parameter constant. - */ - SIGNATURE_RESPONSE("SignatureResponse"), - - /** - * Represents the 'cPepsSession' parameter constant. - */ - SESSION_ID_URL("cPepsSession"), - /** - * Represents the 'spId' parameter constant. - */ - SP_ID("spId"), - /** - * Represents the 'spQaaLevel' parameter constant. - */ - SP_QAALEVEL("spQaaLevel"), - /** - * Represents the 'spUrl' parameter constant. - */ - SP_URL("spUrl"), - - /** - * Represents the 'allow.derivation.all' parameter constant. - */ - SPECIFIC_ALLOW_DERIVATION_ALL("allow.derivation.all"), - /** - * Represents the ''allow.unknowns parameter constant. - */ - SPECIFIC_ALLOW_UNKNOWNS("allow.unknowns"), - /** - * Represents the 'derivation.date.separator' parameter constant. - */ - SPECIFIC_DERIVATION_DATE_SEP("derivation.date.separator"), - /** - * Represents the 'derivation.month.position' parameter constant. - */ - SPECIFIC_DERIVATION_MONTH_POS("derivation.month.position"), - /** - * Represents the 'derivation.day.position' parameter constant. - */ - SPECIFIC_DERIVATION_DAY_POS("derivation.day.position"), - /** - * Represents the 'derivation.year.position' parameter constant. - */ - SPECIFIC_DERIVATION_YEAR_POS("derivation.year.position"), - - /** - * sp.authorized.parameters Represents the '' parameter constant. - */ - SPEPS_AUTHORIZED("sp.authorized.parameters"), - - /** - * Represents the 'spSector' constant value. - */ - SPSECTOR("spSector"), - /** - * Represents the 'spApplication' constant value. - */ - SPAPPLICATION("spApplication"), - /** - * Represents the 'spCountry' constant value. - */ - SPCOUNTRY("spCountry"), - - /** - * Represents the 'spInstitution' constant value. - */ - SPINSTITUTION("spInstitution"), - - /** - * Represents the 'spCountryCode' constant value. - */ - SP_COUNTRY_CODE("spCountryCode"), - - /** - * Represents the 'storkAttribute.number' parameter constant. - */ - STORK_ATTRIBUTE_NUMBER("storkAttribute.number"), - /** - * Represents the 'storkAttributeValue.number' parameter constant. - */ - STORK_ATTRIBUTE_VALUE_NUMBER("storkAttributeValue.number"), - - /** - * Represents the 'username' parameter constant. - */ - USERNAME("username"), - - /** - * Represents the 'tooManyParameters' parameter constant. - */ - TOO_MANY_PARAMETERS("tooManyParameters"), - /** - * Represents the 'validation.active' parameter constant. - */ - VALIDATION_ACTIVE("validation.active"), - - /** - * Represents the 'x-forwarded-for' parameter constant. - */ - X_FORWARDED_FOR("x-forwarded-for"), - /** - * Represents the 'x-forwarded-host' parameter constant. - */ - X_FORWARDED_HOST("x-forwarded-host"), - /** - * Represents the 'XMLResponse' parameter constant. - */ - XML_RESPONSE("XMLResponse"), - - /** - * Represents the 'ap-cpeps.number' parameter constant. - */ - AP_PEPS_NUMBER("ap-cpeps.number"), - - /** - * Represents the 'atp.number' parameter constant. - */ - ATTRIBUTE_PROVIDER_NUMBER("atp.number"), - - /** - * Represents the 'atn.number' parameter constant. - */ - ATTRIBUTE_NAME_NUMBER("atn.number"), - - /** - * Represents the 'apLinker' parameter constant. - */ - AP_LINKER("apLinker"), - - /** - * Represents the 'prevApLinker' parameter constant. - */ - PREV_AP_LINKER("prevApLinker"), - - /** - * Represents the 'NOSEL' parameter constant (no attribute provider selected). - */ - AP_NO_SELECTION("NOSEL"), - - /** - * Represents the 'OCSEL' parameter constant (attribute provider in another country). - */ - AP_OTHER_COUNTRY("OCSEL"), - - /** - * Represents the '_provider' suffix parameter constant. - */ - AP_PROVIDER_SELECT_SUFFIX("_provider"), - - /** - * Represents the '_country' suffix parameter constant. - */ - AP_COUNTRY_SELECT_SUFFIX("_country"), - - /** - * Represents the '_name' suffix parameter constant. - */ - AP_NAME_SELECT_SUFFIX("_name"), - - /** - * Represents the 'next-ap' parameter constant. - */ - NEXT_AP("next-ap"), - - /** - * Represents the 'next-apeps' parameter constant. - */ - NEXT_APEPS("next-apeps"), - - /** - * Represents the 'back-to-apeps' parameter constant. - */ - BACK_TO_APEPS("back-to-apeps"), - - /** - * Represents the 'is-remote-apeps' parameter constant. - */ - IS_REMOTE_APEPS("is-remote-apeps"), - - /** - * Represents the 'more-attributes' parameter constant. - */ - MORE_ATTRIBUTES("more-attributes"), - - /** - * Represents the 'attr-filter.number' parameter constant. - */ - ATTRIBUTES_FILTER_NUMBER("attr-filter.number"), - - /** - * Represents the 'attr-group' parameter constant. - */ - ATTRIBUTE_GROUPS("attr-group"), - - /** - * Represents the 'all' parameter constant for attribute groups. - */ - ATTRIBUTE_GROUPS_ALL("all"), - - /** - * Represents the 'none' parameter constant for attribute groups. - */ - ATTRIBUTE_GROUPS_NONE("none"), - - /** - * Represents the 'atp.url' parameter constant. - */ - ATP_URL("atp.url"), - /** - * Represents the 'apepsURL' parameter constant. - */ - APEPS_URL("apepsUrl"), - - /** - * Represents the 'apepsCountry' parameter constant. - */ - APEPS_COUNTRY("apepsCountry"), - - /** - * Represents the 'apepsAuthRequest' parameter constant. - */ - APEPS_ATTR_REQUEST("apepsAttrRequest"), - - /** - * Represents the 'isApepsRequest' parameter constant. - */ - APEPS_REQUEST_COMPLETE("apeps-request-complete"), - - /** - * Represents the 'apeps.callbackUrl' parameter constant. - */ - APEPS_CALLBACK_URL("apeps.callbackUrl"), - /** - * Represents the 'attrListMand' parameter constant. - */ - ATTR_LIST_MAND("attrListMand"), - - /** - * Represents the 'attrListOpt' parameter constant. - */ - ATTR_LIST_OPT("attrListOpt"), - - /** - * Represents the 'simpleAttrListMand' parameter constant. - */ - SIMPLE_ATTR_LIST_MAND("simpleAttrListMand"), - - /** - * Represents the 'simpleAttrListOpt' parameter constant. - */ - SIMPLE_ATTR_LIST_OPT("simpleAttrListOpt"), - - /** - * Represents the 'complexAttrListMand' parameter constant. - */ - COMPLEX_ATTR_LIST_MAND("complexAttrListMand"), - - /** - * Represents the 'complexAttrListOpt' parameter constant. - */ - COMPLEX_ATTR_LIST_OPT("complexAttrListOpt"), - /** - * Represents the 'idPDerivedAttrList' parameter constant. - */ - IDP_DERIVED_ATTR_LIST("idPDerivedAttrList"), - /** - * Represents the 'apRejectedAttrsList' parameter constant. - */ - AP_REJECTED_ATTRS_LIST("apRejectedAttrsList"), - /** - * Represents the 'logoutRequest' parameter constant. - */ - LOGOUT_REQUEST("logoutRequest"), - /** - * Represents the 'logoutRequest' parameter constant. - */ - LOGOUT_RESPONSE("logoutResponse"), - /** - * Represents the 'logoutRequest' parameter constant. - */ - LOGOUT_DEST_URL("speps.logout.destination.url"); - - /** - * Represents the constant's value. - */ - private String value; - - /** - * Solo Constructor. - * - * @param nValue - * The Constant value. - */ - PEPSParameters(final String nValue) { - this.value = nValue; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - return value; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSUtil.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSUtil.java deleted file mode 100644 index c026ebdbe..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSUtil.java +++ /dev/null @@ -1,392 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.ByteArrayInputStream; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; -import org.bouncycastle.crypto.Digest; -import org.bouncycastle.util.encoders.Base64; -import org.bouncycastle.util.encoders.UrlBase64; - -import eu.stork.peps.auth.commons.exceptions.InternalErrorPEPSException; -import eu.stork.peps.auth.commons.exceptions.InvalidParameterPEPSException; - -/** - * This class holds static helper methods. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.75 $, $Date: 2010-11-23 00:05:35 $ - */ -public final class PEPSUtil { - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(PEPSUtil.class.getName()); - - /** - * Configurations object. - */ - private static Properties configs; - - /** - * Max prefix. - */ - private static final String MAX_PARAM_PREFIX = "max."; - - /** - * Code prefix to get error code. - */ - private static final String CODE_PARAM_SUFFIX = ".code"; - - /** - * param's size prefix to get max param size. - */ - private static final String MAX_PARAM_SUFFIX = ".size"; - - /** - * Message prefix to get error message. - */ - private static final String MSG_PARAM_SUFFIX = ".message"; - - /** - * Private constructor. Prevents the class from being instantiated. - */ - private PEPSUtil() { - // empty constructor - } - - /** - * Creates a single instance of this class and sets the properties. - * - * @param nConfigs - * The set of available configurations. - * - * @return The created PEPSUtil's class. - */ - public static PEPSUtil createInstance(final Properties nConfigs) { - if (nConfigs != null) { - PEPSUtil.configs = nConfigs; - } - return new PEPSUtil(); - } - - /** - * Getter for the Properties. - * - * @return configs The properties value. - */ - public Properties getConfigs() { - return configs; - } - - /** - * Setter for the Properties. - * - * @param nConfigs - * The new properties value. - */ - public static void setConfigs(final Properties nConfigs) { - if (nConfigs != null) { - PEPSUtil.configs = nConfigs; - } - } - - /** - * Returns the identifier of some configuration given a set of configurations and the corresponding configuration key. - * - * @param configKey - * The key that IDs some configuration. - * - * @return The configuration String value. - */ - public static String getConfig(final String configKey) { - return configs.getProperty(configKey); - } - - /** - * Validates the input paramValue identified by the paramName. - * - * @param paramName - * The name of the parameter to validate. - * @param paramValue - * The value of the parameter to validate. - * - * @return true if the parameter is valid. - */ - public static boolean isValidParameter(final String paramName, final String paramValue) { - - final String validationParam = PEPSUtil.getConfig(PEPSParameters.VALIDATION_ACTIVE.toString()); - boolean retVal = true; - - final String paramConf = MAX_PARAM_PREFIX + paramName + MAX_PARAM_SUFFIX; - - if (PEPSValues.TRUE.toString().equals(validationParam)) { - final String paramSizeStr = PEPSUtil.getConfig(paramConf); - // Checking if the parameter size exists and if it's numeric - if (StringUtils.isNumeric(paramSizeStr)) { - final int maxParamSize = Integer.valueOf(paramSizeStr); - if (StringUtils.isEmpty(paramValue) || paramValue.length() > maxParamSize) { - retVal = false; - LOG.warn("Invalid parameter [" + paramName + "] value " + paramValue); - } - } else { - retVal = false; - LOG.error("Missing " + paramConf + " configuration in the pepsUtils.properties configuration file"); - } - } - return retVal; - } - - /** - * Validates the Parameter and throws an exception if an error occurs. Throws an InvalidParameterPEPSException runtime exception if the parameter is invalid. - * - * @param className - * The Class Name that invoked the method. - * @param paramName - * The name of the parameter to validate. - * @param paramValue - * The value of the parameter to validate. - */ - public static void validateParameter(final String className, final String paramName, final Object paramValue) { - - if (paramValue == null) { - PEPSUtil.validateParameter(className, paramName, ""); - } else { - PEPSUtil.validateParameter(className, paramName, paramValue.toString()); - } - } - - /** - * Validates the Parameters and throws an exception if an error occurs. - * - * @param className - * The Class Name that invoked the method. - * @param paramName - * The name of the parameter to validate. - * @param paramValue - * The value of the parameter to validate. - */ - public static void validateParameter(final String className, final String paramName, final String paramValue) { - - PEPSUtil.validateParameter(className, paramName, paramValue, PEPSUtil.getErrorCode(paramName), PEPSUtil.getErrorMessage(paramName)); - } - - /** - * Validates the Parameters and throws an exception if an error occurs. - * - * @param className - * The Class Name that invoked the method. - * @param paramName - * The name of the parameter to validate. - * @param paramValue - * The value of the parameter to validate. - * @param error - * The PEPSError to get error code and messages from configs. - */ - public static void validateParameter(final String className, final String paramName, final String paramValue, final PEPSErrors error) { - - PEPSUtil.validateParameter(className, paramName, paramValue, PEPSUtil.getConfig(error.errorCode()), PEPSUtil.getConfig(error.errorMessage())); - } - - /** - * Validates the HTTP Parameter and throws an exception if an error occurs. Throws an InvalidParameterPEPSException runtime exception if the parameter is invalid. - * - * @param className - * The Class Name that invoked the method. - * @param paramName - * The name of the parameter to validate. - * @param paramValue - * The value of the parameter to validate. - * @param errorCode - * The error code to include on the exception. - * @param errorMessage - * The error message to include on the exception. - */ - public static void validateParameter(final String className, final String paramName, final String paramValue, final String errorCode, final String errorMessage) { - - if (!isValidParameter(paramName, paramValue)) { - LOG.warn("Invalid parameter [" + paramName + "] value found at " + className); - throw new InvalidParameterPEPSException(errorCode, errorMessage); - } - } - - /** - * Getter for the error code of some given error related to the input param. - * - * @param paramName - * The name of the parameter associated with the error. - * - * @return The code of the error. - */ - private static String getErrorCode(final String paramName) { - return getConfig(paramName + CODE_PARAM_SUFFIX); - } - - /** - * Getter for the error message of some given error related to the input parameter. - * - * @param paramName - * The name of the parameter associated with the message. - * - * @return The message for the error. - */ - private static String getErrorMessage(final String paramName) { - return getConfig(paramName + MSG_PARAM_SUFFIX); - } - - /** - * {@link Base64} encodes the input samlToken parameter. - * - * @param samlToken - * the SAML Token to be encoded. - * - * @return The Base64 String representing the samlToken. - * - * @see Base64#encode - */ - public static String encodeSAMLToken(final byte[] samlToken) { - try { - return new String(Base64.encode(samlToken), "UTF8"); - } catch (final UnsupportedEncodingException e) { - LOG.error(PEPSErrors.INTERNAL_ERROR.errorMessage(), e); - return null; - } - } - - /** - * Encode samltoken url safe - * - * @param samlToken - * the saml token to encode - * @return the bas64 encoded string - */ - public static String encodeSAMLTokenUrlSafe(final byte[] samlToken) { - try { - return new String(UrlBase64.encode(samlToken), "UTF8"); - } catch (final UnsupportedEncodingException e) { - LOG.error(PEPSErrors.INTERNAL_ERROR.errorMessage(), e); - return null; - } - } - - /** - * Decodes the {@link Base64} String input parameter representing a samlToken. - * - * @param samlToken - * the SAML Token to be decoded. - * - * @return The samlToken decoded bytes. - * - * @see Base64#decode - */ - public static byte[] decodeSAMLToken(final String samlToken) { - return Base64.decode(samlToken); - } - - /** - * Decode URL save base64 saml token - * - * @param samlToken - * the SAML toke to decode - * @return The decoded bytes - */ - public static byte[] decodeSAMLTokenUrlSafe(final String samlToken) { - return UrlBase64.decode(samlToken); - } - - /** - * Hashes a SAML token. Throws an InternalErrorPEPSException runtime exception if the Cryptographic Engine fails. - * - * @param samlToken - * the SAML Token to be hashed. - * - * @return byte[] with the hashed SAML Token. - */ - public static byte[] hashPersonalToken(final byte[] samlToken) { - try { - final String className = PEPSUtil.getConfig(PEPSValues.HASH_DIGEST_CLASS.toString()); - - final Digest digest = (Digest) Class.forName(className).getConstructor().newInstance((Object[]) null); - digest.update(samlToken, 0, samlToken.length); - - final int retLength = digest.getDigestSize(); - final byte[] ret = new byte[retLength]; - - digest.doFinal(ret, 0); - return ret; - - } catch (final Exception e) { - // For all those exceptions that could be thrown, we always log it and - // thrown an InternalErrorPEPSException. - LOG.error(PEPSErrors.HASH_ERROR.errorMessage(), e); - throw new InternalErrorPEPSException(PEPSUtil.getConfig(PEPSErrors.HASH_ERROR.errorCode()), PEPSUtil.getConfig(PEPSErrors.HASH_ERROR.errorMessage()), e); - } - } - - /** - * Gets the Stork error code in the error message if exists! - * - * @param errorMessage - * The message to get the error code if exists; - * - * @return the error code if exists. Returns null otherwise. - */ - public static String getStorkErrorCode(final String errorMessage) { - if (StringUtils.isNotBlank(errorMessage) && errorMessage.indexOf(PEPSValues.ERROR_MESSAGE_SEP.toString()) >= 0) { - final String[] msgSplitted = errorMessage.split(PEPSValues.ERROR_MESSAGE_SEP.toString()); - if (msgSplitted.length == 2 && StringUtils.isNumeric(msgSplitted[0])) { - return msgSplitted[0]; - } - } - return null; - } - - /** - * Gets the Stork error message in the saml message if exists! - * - * @param errorMessage - * The message to get in the saml message if exists; - * - * @return the error message if exists. Returns the original message otherwise. - */ - public static String getStorkErrorMessage(final String errorMessage) { - if (StringUtils.isNotBlank(errorMessage) && errorMessage.indexOf(PEPSValues.ERROR_MESSAGE_SEP.toString()) >= 0) { - final String[] msgSplitted = errorMessage.split(PEPSValues.ERROR_MESSAGE_SEP.toString()); - if (msgSplitted.length == 2 && StringUtils.isNumeric(msgSplitted[0])) { - return msgSplitted[1]; - } - } - return errorMessage; - } - - /** - * Get inputstream from string - * - * @param string - * the string to convert - * @param codePage - * the codepage of string - * @return an inputstream - * @throws UnsupportedEncodingException - */ - public static InputStream getStream(final String string, final String codePage) throws UnsupportedEncodingException { - return new ByteArrayInputStream(string.getBytes(codePage)); - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSValues.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSValues.java deleted file mode 100644 index a63db12e1..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PEPSValues.java +++ /dev/null @@ -1,345 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains all the value constants. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.17 $, $Date: 2011-07-07 20:48:45 $ - */ -public enum PEPSValues { - - /** - * Represents the 'all' constant value. - */ - ALL("all"), - /** - * Represents the 'none' constant value. - */ - NONE("none"), - /** - * Represents the 'true' constant value. - */ - TRUE("true"), - /** - * Represents the 'false' constant value. - */ - FALSE("false"), - /** - * Represents the empty string constant value. - */ - EMPTY_STRING(""), - - /** - * Represents the ',' separator constant value. - */ - ATTRIBUTE_VALUE_SEP(","), - /** - * Represents the ';' separator constant value. - */ - ATTRIBUTE_SEP(";"), - /** - * Represents the ':' separator constant value. - */ - ATTRIBUTE_TUPLE_SEP(":"), - /** - * Represents the '/' separator constant value. - */ - EID_SEPARATOR("/"), - /** - * Represents the ' - ' separator constant value. - */ - ERROR_MESSAGE_SEP(" - "), - /** - * Represents the '#' parameter constant value. - */ - LOGGER_SEP("#"), - /** - * Represents the 'NOT_AVAILABLE' parameter constant value. - */ - NOT_AVAILABLE("NotAvailable"), - /** - * Represents the ';' parameter constant value. - */ - SPEPS_AUTHORIZED_SEP(";"), - - /** - * Represents the 'ap' constant value. - */ - AP("ap"), - /** - * Represents the 'C-PEPS' constant value. - */ - CPEPS("C-PEPS"), - /** - * Represents the 'cpeps' constant value. - */ - CPEPS_PREFIX("cpeps"), - /** - * Represents the 'peps' constant value. - */ - PEPS("peps"), - /** - * Represents the '-PEPS' constant value. - */ - PEPS_SUFFIX("-PEPS"), - /** - * Represents the 'SP' constant value. - */ - SP("SP"), - /** - * Represents the 'S-PEPS' constant value. - */ - SPEPS("S-PEPS"), - /** - * Represents the 'speps' constant value. - */ - SPEPS_PREFIX("speps"), - /** - * Represents the 'sp.default.parameters' constant value. - */ - DEFAULT("sp.default.parameters"), - /** - * Represents the default saml id constant value. - */ - DEFAULT_SAML_ID("1"), - /** - * Represents the 'hashDigest.className' constant value. - */ - HASH_DIGEST_CLASS("hashDigest.className"), - - /** - * Represents the 'eu.stork.communication.requests' constant value. - */ - STORK_PACKAGE_REQUEST_LOGGER_VALUE("eu.stork.communication.requests"), - /** - * Represents the 'eu.stork.communication.responses' constant value. - */ - STORK_PACKAGE_RESPONSE_LOGGER_VALUE("eu.stork.communication.responses"), - - /** - * Represents the 'S-PEPS receives request from SP' constant value. - */ - SP_REQUEST("S-PEPS receives request from SP"), - /** - * Represents the 'Get Citizen Consent' constant value. - */ - CITIZEN_CONSENT_LOG("Get Citizen Consent"), - /** - * Represents the 'C-PEPS receives request from S-PEPS' constant value. - */ - CPEPS_REQUEST("C-PEPS receives request from S-PEPS"), - /** - * Represents the 'C-PEPS generates response to S-PEPS' constant value. - */ - CPEPS_RESPONSE("C-PEPS generates response to S-PEPS"), - /** - * Represents the 'S-PEPS generates request to C-PEPS' constant value. - */ - SPEPS_REQUEST("S-PEPS generates request to C-PEPS"), - /** - * Represents the 'S-PEPS receives response from C-PEPS' constant value. - */ - SPEPS_RESPONSE("S-PEPS receives response from C-PEPS"), - /** - * Represents the 'S-PEPS generates response to SP' constant value. - */ - SP_RESPONSE("S-PEPS generates response to SP"), - /** - * Represents the 'Success' constant value. - */ - SUCCESS("Success"), - /** - * Represents the December's month number constant value. - */ - LAST_MONTH("12"), - /** - * Represents the yyyyMM constant value. - */ - NO_DAY_DATE_FORMAT("yyyyMM"), - - /** - * Represents the 'attrValue' constant value. - */ - ATTRIBUTE("attrValue"), - /** - * Represents the 'derivedAttr' constant value. - */ - DERIVE_ATTRIBUTE("deriveAttr"), - /** - * Represents the 'storkAttribute' constant value. - */ - STORK_ATTRIBUTE("storkAttribute"), - - /** - * Represents the 'properties' constant value. - */ - PROPERTIES("properties"), - /** - * Represents the 'referer' constant value. - */ - REFERER("referer"), - /** - * Represents the 'host' constant value. - */ - HOST("host"), - /** - * Represents the 'spid' constant value. - */ - SPID("spid"), - /** - * Represents the 'domain' constant value. - */ - DOMAIN("domain"), - /** - * Represents the '.validation' constant value. - */ - VALIDATION_SUFFIX(".validation"), - /** - * Represents the 'jsessionid' constant value. - */ - EQUAL("="), - /** - * Represents the 'HttpOnly' constant value. - */ - HTTP_ONLY("HttpOnly"), - /** - * Represents the 'SET-COOKIE' constant value. - */ - JSSESSION("JSESSIONID"), - /** - * Represents the '=' constant value. - */ - SETCOOKIE("SET-COOKIE"), - /** - * Represents the ';' constant value. - */ - SEMICOLON(";"), - /** - * Represents the ' ' constant value. - */ - SPACE(" "), - /** - * Represents the 'atp' constant value. - */ - APROVIDER_PREFIX("atp"), - /** - * Represents the 'atn' constant value. - */ - ANAME_PREFIX("atn"), - /** - * Represents the 'ap-cpeps' constant value. - */ - AP_CPEPS_PREFIX("ap-cpeps"), - /** - * Represents the 'attr-filter' constant value. - */ - AP_ATTRFILTER_PREFIX("attr-filter"), - /** - * Represents the 'save-session' constant value. - */ - SAVED_SESSION("saved-session"); - - /** - * Represents the constant's value. - */ - private String value; - - /** - * Solo Constructor. - * - * @param val - * The Constant value. - */ - PEPSValues(final String val) { - - this.value = val; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - - return value; - } - - /** - * Construct the return value with the following structure CONSTANT_VALUE+index+".id". - * - * @param index - * the number. - * - * @return The concatenated String value. - */ - public String index(final int index) { - - return value + index + ".id"; - } - - /** - * Construct the return value with the following structure CONSTANT_VALUE+index+".value". - * - * @param index - * the number. - * - * @return The concatenated string value. - */ - public String value(final int index) { - - return value + index + ".value"; - } - - /** - * Construct the return value with the following structure CONSTANT_VALUE+index+".name". - * - * @param index - * the number. - * - * @return The concatenated String value. - */ - public String name(final int index) { - - return value + index + ".name"; - } - - /** - * Construct the return value with the following structure CONSTANT_VALUE+index+".url". - * - * @param index - * the number. - * - * @return The concatenated String value. - */ - public String url(final int index) { - - return value + index + ".url"; - } - - /** - * Construct the return value with the following structure CONSTANT_VALUE+index+".allowedGroups". - * - * @param index - * the number. - * - * @return The concatenated String value. - */ - public String allowedGroups(final int index) { - - return value + index + ".allowedGroups"; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttribute.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttribute.java deleted file mode 100644 index 8d1482f05..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttribute.java +++ /dev/null @@ -1,391 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Vector; - -import org.apache.log4j.Logger; - -import eu.stork.peps.auth.commons.exceptions.InternalErrorPEPSException; - -/** - * This class is a bean used to store the information relative to the PersonalAttribute. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.22 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class PersonalAttribute implements Serializable, Cloneable { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 2612951678412632174L; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(PersonalAttribute.class.getName()); - - /** - * Name of the personal attribute. - */ - private String name; - - /** - * Values of the personal attribute. - */ - private List value = new ArrayList(); - - /** - * Type of the personal attribute. - */ - private String type; - - /** - * Complex values of the personal attribute. - */ - private List> complexValue = new Vector>(); - - /** - * Is the personal attribute mandatory? - */ - private boolean required; - - /** - * Returned status of the attribute from the IdP. - */ - private String status; - - /** - * Name of the personal attribute. - */ - private String friendlyName; - - /** - * Empty Constructor. - */ - public PersonalAttribute() { - super(); - } - - /** - * PersonalAttribute Constructor for complex values. - * - * @param attrName - * The attribute name. - * @param attrIsRequired - * The attribute type value. - * @param attrComplexValue - * The attribute's value. - * @param attrStatus - * The attribute's status value. - */ - public PersonalAttribute(final String attrName, final boolean attrIsRequired, final List attrComplexValue, final String attrStatus) { - this.setName(attrName); - this.setIsRequired(attrIsRequired); - this.setValue(attrComplexValue); - this.setStatus(attrStatus); - } - - /** - * PersonalAttribute Constructor for complex values. - * - * @param attrName - * The attribute name. - * @param attrIsRequired - * The attribute type value. - * @param attrComplexValue - * The attribute's complex value. - * @param attrStatus - * The attribute's status value. - */ - public PersonalAttribute(final String attrName, final boolean attrIsRequired, final Map attrComplexValue, final String attrStatus) { - this.setName(attrName); - this.setIsRequired(attrIsRequired); - this.setComplexValue(attrComplexValue); - this.setStatus(attrStatus); - } - - /** - * {@inheritDoc} - */ - @SuppressWarnings("unchecked") - public Object clone() { - - try { - final PersonalAttribute personalAttr = (PersonalAttribute) super.clone(); - personalAttr.setIsRequired(this.isRequired()); - personalAttr.setName(this.getName()); - personalAttr.setStatus(this.getStatus()); - if (!isEmptyValue()) { - final List val = (List) ((ArrayList) this.getValue()).clone(); - personalAttr.setValue(val); - } - if (!isEmptyComplexValue()) { - personalAttr.addComplexValues(this.getComplexValues()); - } - return personalAttr; - } catch (final CloneNotSupportedException e) { - // assert false; - LOG.trace("Nothing to do."); - throw new InternalErrorPEPSException(PEPSUtil.getConfig(PEPSErrors.INTERNAL_ERROR.errorCode()), PEPSUtil.getConfig(PEPSErrors.INTERNAL_ERROR.errorMessage()), e); - } - } - - /** - * Getter for the required value. - * - * @return The required value. - */ - public boolean isRequired() { - return required; - } - - /** - * Setter for the required value. - * - * @param attrIsRequired - * this attribute? - */ - public void setIsRequired(final boolean attrIsRequired) { - this.required = attrIsRequired; - } - - /** - * Getter for the name value. - * - * @return The name value. - */ - public String getName() { - return name; - } - - /** - * Setter for the name value. - * - * @param attrName - * The personal attribute name. - */ - public void setName(final String attrName) { - this.name = attrName; - } - - /** - * Getter for the value. - * - * @return The list of values. - */ - public List getValue() { - return value; - } - - /** - * Setter for the list of values. - * - * @param attrValue - * The personal attribute value. - */ - public void setValue(final List attrValue) { - if (attrValue != null) { - this.value = attrValue; - } - } - - /** - * Add new value to list of values. - * - * @param attrValue - * The personal attribute value. - */ - public void addValue(final String attrValue) { - if (attrValue != null) { - this.value.add(attrValue); - } - } - - /** - * Getter for the type value. - * - * @return The name value. - */ - public String getType() { - return type; - } - - /** - * Setter for the type value. - * - * @param attrName - * The personal attribute type. - */ - public void setType(final String attrType) { - this.type = attrType; - } - - /** - * Getter for the status. - * - * @return The status value. - */ - public String getStatus() { - return status; - } - - /** - * Setter for the status value. - * - * @param attrStatus - * The personal attribute status. - */ - public void setStatus(final String attrStatus) { - this.status = attrStatus; - } - - /** - * Getter for the complex value. - * - * @return The complex value. - */ - public Map getComplexValue() { - if (complexValue.size() > 0) { - return complexValue.get(0); - } else { - return new HashMap(); - } - } - - /** - * Getter for the complex values. - * - * @return The complex value. - */ - public List> getComplexValues() { - return complexValue; - } - - /** - * Setter for the complex value. - * - * @param complexVal - * The personal attribute Complex value. - */ - public void setComplexValue(final Map complexVal) { - if (complexVal != null) { - this.complexValue.add(complexVal); - } - } - - /** - * Setter for the complex values. - * - * @param complexVal - * The personal attribute Complex values. - */ - public void addComplexValues(final List> complexVals) { - this.complexValue.addAll(complexVals); - } - - /** - * Getter for the personal's friendly name. - * - * @return The personal's friendly name value. - */ - public String getFriendlyName() { - return friendlyName; - } - - /** - * Setter for the personal's friendly name. - * - * @param fName - * The personal's friendly name. - */ - public void setFriendlyName(final String fName) { - this.friendlyName = fName; - } - - /** - * Return true the value is empty. - * - * @return True if the value is empty "[]"; - */ - public boolean isEmptyValue() { - return value.isEmpty() || (value.size() == 1 && value.get(0).length() == 0); - } - - /** - * Returns true if the Complex Value is empty. - * - * @return True if the Complex Value is empty; - */ - public boolean isEmptyComplexValue() { - return complexValue.isEmpty() || complexValue.get(0).isEmpty(); - } - - /** - * Returns true if the Status is empty. - * - * @return True if the Status is empty; - */ - public boolean isEmptyStatus() { - return (status == null || status.length() == 0); - } - - /** - * Prints the PersonalAttribute in the following format. name:required:[v,a,l,u,e,s]|[v=a,l=u,e=s]:status; - * - * @return The PersonalAttribute as a string. - */ - public String toString() { - final StringBuilder strBuild = new StringBuilder(); - - AttributeUtil.appendIfNotNull(strBuild, getName()); - strBuild.append(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()); - AttributeUtil.appendIfNotNull(strBuild, String.valueOf(isRequired())); - strBuild.append(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()); - strBuild.append('['); - - if (isEmptyValue()) { - if (!isEmptyComplexValue()) { - AttributeUtil.appendIfNotNull(strBuild, AttributeUtil.mapToString(getComplexValue(), PEPSValues.ATTRIBUTE_VALUE_SEP.toString())); - } - } else { - AttributeUtil.appendIfNotNull(strBuild, AttributeUtil.listToString(getValue(), PEPSValues.ATTRIBUTE_VALUE_SEP.toString())); - } - - strBuild.append(']'); - strBuild.append(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()); - AttributeUtil.appendIfNotNull(strBuild, getStatus()); - strBuild.append(PEPSValues.ATTRIBUTE_SEP.toString()); - - return strBuild.toString(); - } - - /** - * Empties the Value or ComplexValue field of a PersonalAttribute - */ - public void setEmptyValue() { - if (this.isEmptyValue()) { - this.complexValue = new Vector>(); - } else { - this.value = new ArrayList(); - } - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java deleted file mode 100644 index 1ddc02e15..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/PersonalAttributeList.java +++ /dev/null @@ -1,454 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; -import java.util.StringTokenizer; - -import org.apache.commons.lang.StringUtils; -import org.apache.log4j.Logger; - -/** - * This class is a bean used to store the information relative to the PersonalAttributeList. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.27 $, $Date: 2010-11-18 22:54:56 $ - * - * @see PersonalAttribute - */ -@SuppressWarnings("PMD") -public final class PersonalAttributeList extends ConcurrentHashMap implements IPersonalAttributeList { - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(PersonalAttributeList.class.getName()); - - /** - * Serial id. - */ - private static final long serialVersionUID = 7375127363889975062L; - - /** - * Hash with the latest fetched attribute name alias. - */ - private final Map latestAttrAlias = new HashMap(); - - /** - * Hash with mapping number of alias or the attribute name. - */ - private final Map> attrAliasNumber = new HashMap>(); - - /** - * Default constructor. - */ - public PersonalAttributeList() { - // The best practices recommend to call the super constructor. - super(); - } - - /** - * Constructor with initial capacity for the PersonalAttributeList size. - * - * @param capacity - * The initial capacity for the PersonalAttributeList. - */ - public PersonalAttributeList(final int capacity) { - super(capacity); - } - - /** - * {@inheritDoc} - */ - public Iterator iterator() { - return this.values().iterator(); - } - - /** - * {@inheritDoc} - */ - public PersonalAttribute get(final Object key) { - String attrName = (String) key; - - if (this.latestAttrAlias.containsKey(key)) { - int index = this.latestAttrAlias.get(key); - if ((index + 1) > this.attrAliasNumber.get(key).size()) { - index = 0; - } - - attrName = this.attrAliasNumber.get(key).get(index); - this.latestAttrAlias.put((String) key, Integer.valueOf(++index)); - } else { - if (this.attrAliasNumber.containsKey(key)) { - this.latestAttrAlias.put((String) key, Integer.valueOf(0)); - attrName = this.attrAliasNumber.get(key).get(0); - } - } - return super.get(attrName); - } - - /** - * {@inheritDoc} - */ - public void add(final PersonalAttribute value) { - if (value != null) { - this.put(value.getName(), value); - } - } - - /** - * {@inheritDoc} - */ - public PersonalAttribute replace(final String key, final PersonalAttribute val) { - return super.put(key, val); - } - - /** - * {@inheritDoc} - */ - public PersonalAttribute put(final String key, final PersonalAttribute val) { - PersonalAttribute attr = val; - if (this.containsKey(key)) { - attr = this.get(key); - - if (!attr.isEmptyValue()) { - if (!attr.getValue().containsAll(val.getValue())) { - attr.getValue().addAll(val.getValue()); - } - } else { - - if (!attr.isEmptyComplexValue()) { - for (Map valTemp : val.getComplexValues()) { - if (!attr.getComplexValues().contains(valTemp)) { - attr.setComplexValue(valTemp); - } - } - } else { - if (STORKStatusCode.STATUS_NOT_AVAILABLE.toString().equals(attr.getStatus())) { - attr = val; - } - } - } - } - return super.put(key, attr); - } - - /** - * Escape method for attributes with double comma - * - * @return escaped attribute list - * - */ - private String attrListEncoder(String attrList) { - StringBuilder finalAttr = new StringBuilder(); - String boolAttr = PEPSValues.TRUE.toString(); - String reqRegex = PEPSValues.ATTRIBUTE_TUPLE_SEP.toString() + PEPSValues.TRUE.toString() + PEPSValues.ATTRIBUTE_TUPLE_SEP.toString(); - - String reqRegexSeparator = PEPSValues.ATTRIBUTE_TUPLE_SEP.toString() + PEPSValues.TRUE.toString() + PEPSValues.ATTRIBUTE_TUPLE_SEP.toString() + "|" + PEPSValues.ATTRIBUTE_TUPLE_SEP.toString() - + PEPSValues.FALSE.toString() + PEPSValues.ATTRIBUTE_TUPLE_SEP.toString(); - - for (String s : attrList.split(PEPSValues.ATTRIBUTE_SEP.toString())) { - StringBuilder tempBuilder = new StringBuilder(s); - if (s.split(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()).length > 4) { - LOG.info("Found attributes with special characters, escaping special characters"); - - if (s.split(reqRegex) == null) { - boolAttr = PEPSValues.FALSE.toString(); - } - - tempBuilder.setLength(0); - tempBuilder.append(AttributeUtil.escape(s.split(reqRegexSeparator)[0])); - tempBuilder.append(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()); - tempBuilder.append(boolAttr); - tempBuilder.append(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString()); - tempBuilder.append(s.split(reqRegexSeparator)[1]); - - } - - finalAttr.append(tempBuilder.toString()); - finalAttr.append(PEPSValues.ATTRIBUTE_SEP.toString()); - } - return finalAttr.toString(); - } - - /** - * Unescape a string - * - * @see PersonalAttributeList#attrListEncoder - * - */ - private String attrListDecoder(String string) { - return AttributeUtil.unescape(string); - } - - public void populate(final String attrList) { - - final StringTokenizer strToken = new StringTokenizer(attrListEncoder(attrList), PEPSValues.ATTRIBUTE_SEP.toString()); - - while (strToken.hasMoreTokens()) { - final PersonalAttribute persAttr = new PersonalAttribute(); - String[] tuples = strToken.nextToken().split(PEPSValues.ATTRIBUTE_TUPLE_SEP.toString(), AttributeConstants.NUMBER_TUPLES.intValue()); - - // Convert to the new format if needed! - tuples = convertFormat(tuples); - - if (AttributeUtil.hasValidTuples(tuples)) { - final int attrValueIndex = AttributeConstants.ATTR_VALUE_INDEX.intValue(); - final String tmpAttrValue = tuples[attrValueIndex].substring(1, tuples[attrValueIndex].length() - 1); - final String[] vals = tmpAttrValue.split(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - persAttr.setName(tuples[AttributeConstants.ATTR_NAME_INDEX.intValue()]); - persAttr.setIsRequired(Boolean.valueOf(tuples[AttributeConstants.ATTR_TYPE_INDEX.intValue()])); - - // check if it is a complex value - if (isComplexValue(vals)) { - persAttr.setComplexValue(createComplexValue(vals)); - } else { - persAttr.setValue(createValues(vals)); - } - - if (tuples.length == AttributeConstants.NUMBER_TUPLES.intValue()) { - tuples[0] = attrListDecoder(tuples[0]); - persAttr.setName(attrListDecoder(persAttr.getName())); - - persAttr.setStatus(tuples[AttributeConstants.ATTR_STATUS_INDEX.intValue()]); - } - this.put(tuples[AttributeConstants.ATTR_NAME_INDEX.intValue()], persAttr); - - } else { - LOG.warn("Invalid personal attribute list tuples"); - } - - } - } - - /** - * Returns a copy of this IPersonalAttributeList instance. - * - * @return The copy of this IPersonalAttributeList. - */ - public Object clone() { - // This implementation may have an bug! - try { - return (PersonalAttributeList) super.clone(); - } catch (CloneNotSupportedException e) { - return null; - } - } - - /** - * Creates a string in the following format. - * - * attrName:attrType:[attrValue1,attrValue2=attrComplexValue]:attrStatus; - * - * @return {@inheritDoc} - */ - @Override - public String toString() { - final Iterator> itAttrs = this.entrySet().iterator(); - final StringBuilder strBuilder = new StringBuilder(); - - while (itAttrs.hasNext()) { - final Entry attrEntry = itAttrs.next(); - final PersonalAttribute attr = attrEntry.getValue(); - // strBuilder.append(attr.toString()); - strBuilder.insert(0, attr.toString()); - } - - return strBuilder.toString(); - } - - /** - * Validates and creates the attribute's complex values. - * - * @param values - * The complex values. - * - * @return The {@link Map} with the complex values. - * - * @see Map - */ - private Map createComplexValue(final String[] values) { - final Map complexValue = new HashMap(); - for (final String val : values) { - final String[] tVal = val.split("="); - if (StringUtils.isNotEmpty(val) && tVal.length == 2) { - complexValue.put(tVal[0], AttributeUtil.unescape(tVal[1])); - } - } - return complexValue; - } - - /** - * Checks if value is complex or not - * - * @param values - * The values to check - * @return True if succesful - */ - private boolean isComplexValue(final String[] values) { - boolean isComplex = false; - if (values.length > 0) { - final String[] tVal = values[0].split("="); - if (StringUtils.isNotEmpty(values[0]) && tVal.length == 2) { - isComplex = true; - } - } - return isComplex; - } - - /** - * Validates and creates the attribute values. - * - * @param vals - * The attribute values. - * - * @return The {@link List} with the attribute values. - * - * @see List - */ - private List createValues(final String[] vals) { - final List values = new ArrayList(); - for (final String val : vals) { - if (StringUtils.isNotEmpty(val)) { - values.add(AttributeUtil.unescape(val)); - } - } - return values; - } - - /** - * Converts the attribute tuple (attrName:attrType...) to the new format. - * - * @param tuples - * The attribute tuples to convert. - * - * @return The attribute tuples in the new format. - */ - private String[] convertFormat(final String[] tuples) { - final String[] newFormatTuples = new String[AttributeConstants.NUMBER_TUPLES.intValue()]; - if (tuples != null) { - System.arraycopy(tuples, 0, newFormatTuples, 0, tuples.length); - - for (int i = tuples.length; i < newFormatTuples.length; i++) { - if (i == AttributeConstants.ATTR_VALUE_INDEX.intValue()) { - newFormatTuples[i] = "[]"; - } else { - newFormatTuples[i] = ""; - } - } - } - return newFormatTuples; - } - - /** - * Returns a IPersonalAttributeList of the complex attributes in this map. - * - * @return an IPersonalAttributeList of the complex attributes contained in this map. - */ - public IPersonalAttributeList getComplexAttributes() { - LOG.info("get complex attributes"); - IPersonalAttributeList attrList = new PersonalAttributeList(); - for (PersonalAttribute attr : this) { - if (!attr.getComplexValue().isEmpty()) { - attrList.put(attr.getName(), attr); - LOG.info("adding complex attribute:" + attr.getName()); - } - } - return attrList; - } - - /** - * {@inheritDoc} - */ - public IPersonalAttributeList merge(IPersonalAttributeList attrList1) { - - for (PersonalAttribute attr : attrList1) { - this.add(attr); - } - return this; - } - - /** - * Returns a IPersonalAttributeList of the mandatory attributes in this map. - * - * @return an IPersonalAttributeList of the mandatory attributes contained in this map. - */ - public IPersonalAttributeList getSimpleValueAttributes() { - LOG.info("get simple attributes"); - IPersonalAttributeList attrList = new PersonalAttributeList(); - for (PersonalAttribute attr : this) { - if (!attr.getValue().isEmpty()) { - attrList.put(attr.getName(), attr); - LOG.info("adding simple attribute:" + attr.getName()); - } - } - return attrList; - } - - /** - * Returns a IPersonalAttributeList of the mandatory attributes in this map. - * - * @return an IPersonalAttributeList of the mandatory attributes contained in this map. - */ - public IPersonalAttributeList getMandatoryAttributes() { - return getAttributesByParam(true); - } - - /** - * Returns a IPersonalAttributeList of the attributes in this map by parameter value. - * - * @param compareValue - * The boolean to get mandatory (true) or optional (false) attributes. - * - * @return an IPersonalAttributeList of the mandatory attributes contained in this map if compareValue is true or optional otherwise. - */ - private IPersonalAttributeList getAttributesByParam(final boolean compareValue) { - LOG.info("get attributes by param :" + compareValue); - IPersonalAttributeList attrList = new PersonalAttributeList(); - for (PersonalAttribute attr : this) { - if (attr.isRequired() == compareValue) { - attrList.put(attr.getName(), attr); - LOG.info("adding attribute:" + attr.getName()); - } - } - return attrList; - } - - /** - * Returns a IPersonalAttributeList of the optional attributes in this map. - * - * @return an IPersonalAttributeList of the optional attributes contained in this map. - */ - public IPersonalAttributeList getOptionalAttributes() { - return getAttributesByParam(false); - } - - /** - * {@inheritDoc} - */ - public boolean hasMissingValues() { - for (PersonalAttribute attr : this) { - if (attr.isEmptyValue() && attr.isEmptyComplexValue()) { - return true; - } - } - return false; - } -} \ No newline at end of file diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryRequest.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryRequest.java deleted file mode 100644 index 33ae4c743..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryRequest.java +++ /dev/null @@ -1,452 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -public class STORKAttrQueryRequest implements Serializable, Cloneable { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 4778480781609392750L; - - /** The samlId. */ - private String samlId; - - /** The destination. */ - private String destination; - - /** The assertion consumer service url. */ - private String serviceURL; - - /** The distinguished name. */ - private String distinguishedName; - - /** The e id sector share. */ - private boolean eIDSectorShare; - - /** The e id cross sector share. */ - private boolean eIDCrossSectorShare; - - /** The e id cross border share. */ - private boolean eIDCrossBorderShare; - - /** The personal attribute list. */ - private IPersonalAttributeList attributeList = new PersonalAttributeList(); - - /** The qaa. */ - private int qaa; - - /** The token saml. */ - private byte[] tokenSaml = new byte[0]; - - /** The issuer. */ - private String issuer; - - /** The service provider sector. */ - private String spSector; - - /** The service provider institution. */ - private String spInstitution; - - /** The service provider application. */ - private String spApplication; - - /** The service provider country. */ - private String spCountry; - - /** The country. */ - private String country; - - /** The citizen country code. */ - private String citizenCountry; - - /** The Service Provider ID. */ - private String sPID; - - /** The Alias used at the keystore for saving this certificate. */ - private String alias; - - /** - * Gets the SP's Certificate Alias. - * - * @return alias The SP's Certificate Alias. - */ - public String getAlias() { - return alias; - } - - /** - * Sets the SP's Certificate Alias. - * - * @param nAlias - * The SP's Certificate Alias. - */ - public void setAlias(final String nAlias) { - this.alias = nAlias; - } - - /** - * Gets the SP ID. - * - * @return sPID The SP ID. - */ - public String getSPID() { - return sPID; - } - - /** - * Sets the SP ID. - * - * @param sPId - * The new sp samlId. - */ - public void setSPID(final String sPId) { - this.sPID = sPId; - } - - /** - * Gets the citizen country code. - * - * @return The citizen country code value. - */ - public String getCitizenCountryCode() { - return citizenCountry; - } - - /** - * Sets the citizen country code. - * - * @param countryCode - * the new citizen country code value. - */ - public void setCitizenCountryCode(final String countryCode) { - this.citizenCountry = countryCode; - } - - /** - * Gets the sp country. - * - * @return The sp country value. - */ - public String getSpCountry() { - return spCountry; - } - - /** - * Sets the sp country. - * - * @param sPCountry - * the new sp country value. - */ - public void setSpCountry(final String sPCountry) { - this.spCountry = sPCountry; - } - - /** - * Gets the issuer. - * - * @return The issuer value. - */ - public String getIssuer() { - return issuer; - } - - /** - * Sets the issuer. - * - * @param samlIssuer - * the new issuer value. - */ - public void setIssuer(final String samlIssuer) { - this.issuer = samlIssuer; - } - - /** - * Gets the SAML Token. - * - * @return The SAML Token value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Sets the SAML Token. - * - * @param samlToken - * The new SAML Token value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Gets the country. - * - * @return The country value. - */ - public String getCountry() { - return country; - } - - /** - * Sets the country. - * - * @param nCountry - * the new country value. - */ - public void setCountry(final String nCountry) { - this.country = nCountry; - } - - /** - * Getter for the qaa value. - * - * @return The qaa value value. - */ - public int getQaa() { - return qaa; - } - - /** - * Setter for the qaa value. - * - * @param qaaLevel - * The new qaa value. - */ - public void setQaa(final int qaaLevel) { - this.qaa = qaaLevel; - } - - /** - * Getter for the serviceURL value. - * - * @return The serviceURL value. - */ - public String getAssertionConsumerServiceURL() { - return serviceURL; - } - - /** - * Setter for the serviceURL value. - * - * @param newServiceURL - * the assertion consumer service URL. - */ - public void setAssertionConsumerServiceURL(final String newServiceURL) { - this.serviceURL = newServiceURL; - } - - /** - * Getter for the destination value. - * - * @return The destination value. - */ - public String getDestination() { - return destination; - } - - /** - * Setter for the destination value. - * - * @param detination - * the new destination value. - */ - public void setDestination(final String detination) { - this.destination = detination; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param newSamlId - * the new samlId value. - */ - public void setSamlId(final String newSamlId) { - this.samlId = newSamlId; - } - - /** - * Getter for the attributeList value. - * - * @return The attributeList value. - * - * @see IPersonalAttributeList - */ - public IPersonalAttributeList getPersonalAttributeList() { - return (IPersonalAttributeList) attributeList.clone(); - } - - /** - * Setter for the attributeList value. - * - * @param attrList - * the personal attribute list value. - * - * @see IPersonalAttributeList - */ - public void setPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.attributeList = attrList; - } - } - - /** - * Getter for the distinguishedName value. - * - * @return The distinguishedName value. - */ - public String getDistinguishedName() { - return distinguishedName; - } - - /** - * Setter for the distinguishedName value. - * - * @param certDN - * the distinguished name value. - */ - public void setDistinguishedName(final String certDN) { - this.distinguishedName = certDN; - } - - /** - * Gets the service provider sector. - * - * @return The service provider sector value. - */ - public String getSpSector() { - return spSector; - } - - /** - * Sets the service provider sector. - * - * @param samlSPSector - * the new service provider sector value. - */ - public void setSpSector(final String samlSPSector) { - this.spSector = samlSPSector; - } - - /** - * Gets the service provider institution. - * - * @return The service provider institution value. - */ - public String getSpInstitution() { - return spInstitution; - } - - /** - * Sets the service provider institution. - * - * @param samlSPInst - * the new service provider institution value. - */ - public void setSpInstitution(final String samlSPInst) { - this.spInstitution = samlSPInst; - } - - /** - * Gets the service provider application. - * - * @return The service provider application value. - */ - public String getSpApplication() { - return spApplication; - } - - /** - * Sets the service provider application. - * - * @param samlSPApp - * the new service provider application value. - */ - public void setSpApplication(final String samlSPApp) { - this.spApplication = samlSPApp; - } - - /** - * Checks if is eId sector share. - * - * @return true, if is eId sector share. - */ - public boolean isEIDSectorShare() { - return eIDSectorShare; - } - - /** - * Sets the eId sector share. - * - * @param eIdSectorShare - * the new eId sector share value. - */ - public void setEIDSectorShare(final boolean eIdSectorShare) { - this.eIDSectorShare = eIdSectorShare; - } - - /** - * Checks if is eId cross sector share. - * - * @return true, if is eId cross sector share. - */ - public boolean isEIDCrossSectorShare() { - return eIDCrossSectorShare; - } - - /** - * Sets the eId cross sector share. - * - * @param eIdCrossSectorShare - * the new eId cross sector share value. - */ - public void setEIDCrossSectorShare(final boolean eIdCrossSectorShare) { - this.eIDCrossSectorShare = eIdCrossSectorShare; - } - - /** - * Checks if is eId cross border share. - * - * @return true, if is eId cross border share. - */ - public boolean isEIDCrossBorderShare() { - return eIDCrossBorderShare; - } - - /** - * Sets the eId cross border share. - * - * @param eIdCrossBorderShare - * the new eId cross border share value. - */ - public void setEIDCrossBorderShare(final boolean eIdCrossBorderShare) { - this.eIDCrossBorderShare = eIdCrossBorderShare; - } - - /** - * Returns a copy of this STORKAttrQueryRequest instance. - * - * @return The copy of this STORKAttrQueryRequest. - * @throws CloneNotSupportedException - * on clone exception - */ - @Override - public Object clone() throws CloneNotSupportedException { - STORKAttrQueryRequest storkAttrQueryReq = null; - storkAttrQueryReq = (STORKAttrQueryRequest) super.clone(); - storkAttrQueryReq.setPersonalAttributeList(getPersonalAttributeList()); - storkAttrQueryReq.setTokenSaml(getTokenSaml()); - return storkAttrQueryReq; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java deleted file mode 100644 index ac4663eaf..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAttrQueryResponse.java +++ /dev/null @@ -1,393 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; -import java.util.List; - -import org.apache.log4j.Logger; -import org.joda.time.DateTime; -import org.opensaml.saml2.core.Assertion; - -public class STORKAttrQueryResponse implements Serializable { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 7653893041391541235L; - - /** Response Id. */ - private String samlId; - - /** Request failed? */ - private boolean fail; - - /** Status code. */ - private String statusCode; - - /** Secondary status code. */ - private String subStatusCode; - - /** Audience restriction. */ - private String audienceRest; - - /** Error message. */ - private String message; - - /** Id of the request that originated this response. */ - private String inResponseTo; - - /** Expiration date. */ - private DateTime notOnOrAfter; - - /** Creation date. */ - private DateTime notBefore; - - /** The SAML token. */ - private byte[] tokenSaml = new byte[0]; - - /** Country. */ - private String country; - - /** The complete assertion **/ - private Assertion assertion; - - /** List of all assertions in response **/ - private List assertions; - - /** The complete list from all assertions **/ - private IPersonalAttributeList totalAttributeList = new PersonalAttributeList(); - - /** All personal attribute lists **/ - private List attributeLists; - - /** Citizen's personal attribute list. */ - private IPersonalAttributeList attributeList = new PersonalAttributeList(); - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(STORKAttrQueryResponse.class.getName()); - - /** - * Getter for the subStatusCode. - * - * @return The subStatusCode value. - */ - public String getSubStatusCode() { - return subStatusCode; - } - - /** - * Setter for the subStatusCode. - * - * @param samlSubStatusCode - * the new subStatusCode value. - */ - public void setSubStatusCode(final String samlSubStatusCode) { - this.subStatusCode = samlSubStatusCode; - } - - /** - * Getter for audienceRest. - * - * @return The audienceRest value. - */ - public String getAudienceRestriction() { - return audienceRest; - } - - /** - * Setter for audienceRest. - * - * @param audRest - * the new audienceRest value. - */ - public void setAudienceRestriction(final String audRest) { - this.audienceRest = audRest; - } - - /** - * Getter for the samlToken. - * - * @return The samlToken value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Setter for samlToken. - * - * @param samlToken - * the new tokenSaml value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Getter for the country name. - * - * @return The country name value. - */ - public String getCountry() { - return country; - } - - /** - * Setter for the country name. - * - * @param cCountry - * the new country name value. - */ - public void setCountry(final String cCountry) { - this.country = cCountry; - } - - /** - * Getter for pal value. - * - * @return The pal value. - * - * @see PersonalAttributeList - */ - public IPersonalAttributeList getPersonalAttributeList() { - return (IPersonalAttributeList) attributeList.clone(); - } - - /** - * Setter for the Personal Attribute List value. - * - * @param attrList - * the new value. - * - * @see PersonalAttributeList - */ - public void setPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.attributeList = attrList; - } - } - - /** - * Getter for the inResponseTo value. - * - * @return The inResponseTo value. - */ - public String getInResponseTo() { - return inResponseTo; - } - - /** - * Setter for the inResponseTo value. - * - * @param samlInResponseTo - * the new inResponseTo value. - */ - public void setInResponseTo(final String samlInResponseTo) { - this.inResponseTo = samlInResponseTo; - } - - /** - * Getter for the fail value. - * - * @return The fail value. - */ - public boolean isFail() { - return fail; - } - - /** - * Setter for the fail value. - * - * @param failVal - * the new fail value. - */ - public void setFail(final boolean failVal) { - this.fail = failVal; - } - - /** - * Getter for the message value. - * - * @return The message value. - */ - public String getMessage() { - return message; - } - - /** - * Setter for the message value. - * - * @param msg - * the new message value. - */ - public void setMessage(final String msg) { - this.message = msg; - } - - /** - * Getter for the statusCode value. - * - * @return The statusCode value. - */ - public String getStatusCode() { - return statusCode; - } - - /** - * Setter for the statusCode value. - * - * @param status - * the new statusCode value. - */ - public void setStatusCode(final String status) { - this.statusCode = status; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param nSamlId - * the new samlId value. - */ - public void setSamlId(final String nSamlId) { - this.samlId = nSamlId; - } - - /** - * Getter for the notOnOrAfter value. - * - * @return The notOnOrAfter value. - * - * @see DateTime - */ - public DateTime getNotOnOrAfter() { - return this.notOnOrAfter; - } - - /** - * Setter for the notOnOrAfter value. - * - * @param nOnOrAfter - * the new notOnOrAfter value. - * - * @see DateTime - */ - public void setNotOnOrAfter(final DateTime nOnOrAfter) { - this.notOnOrAfter = nOnOrAfter; - } - - /** - * Getter for the notBefore value. - * - * @return The notBefore value. - * - * @see DateTime - */ - public DateTime getNotBefore() { - return notBefore; - } - - /** - * Setter for the notBefore value. - * - * @param nBefore - * the new notBefore value. - * - * @see DateTime - */ - public void setNotBefore(final DateTime nBefore) { - this.notBefore = nBefore; - } - - /** Get the assertion from the response **/ - public Assertion getAssertion() { - return assertion; - } - - /** Set the assertion in the response **/ - public void setAssertion(final Assertion nAssertion) { - this.assertion = nAssertion; - } - - public void setAssertions(List newAssert) { - this.assertions = newAssert; - } - - public List getAssertions() { - return assertions; - } - - /** - * Getter for the toal pal value. - * - * @return The total pal value. - * - * @see PersonalAttributeList - */ - public IPersonalAttributeList getTotalPersonalAttributeList() { - return (IPersonalAttributeList) totalAttributeList.clone(); - } - - /** - * Setter for the total Personal Attribute List value. - * - * @param attrList - * the new value. - * - * @see PersonalAttributeList - */ - public void setTotalPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.totalAttributeList = attrList; - } - } - - /** - * Getter for personal attribute lists - * - * @return The lists - * - * @see PersonalAttributeList - */ - public List getPersonalAttributeLists() { - return attributeLists; - } - - /** - * Setter for the Personal Attribute List value. - * - * @param attrList - * the new value. - * - * @see PersonalAttributeList - */ - public void setPersonalAttributeLists(final List attrLists) { - if (attrLists != null) { - this.attributeLists = attrLists; - } - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnRequest.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnRequest.java deleted file mode 100644 index c3223ec40..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnRequest.java +++ /dev/null @@ -1,506 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -import org.apache.log4j.Logger; - -/** - * This class is a bean used to store the information relative to the STORKAuthnRequest (SAML Token Request). - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.21 $, $Date: 2011-02-17 22:44:34 $ - */ -public final class STORKAuthnRequest implements Serializable, Cloneable { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 4778480781609392750L; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(STORKAuthnRequest.class.getName()); - - /** The samlId. */ - private String samlId; - - /** The assertion consumer service url. */ - private String serviceURL; - - /** The destination. */ - private String destination; - - /** The provider name. */ - private String providerName; - - /** The distinguished name. */ - private String distinguishedName; - - /** The e id sector share. */ - private boolean eIDSectorShare; - - /** The e id cross sector share. */ - private boolean eIDCrossSectorShare; - - /** The e id cross border share. */ - private boolean eIDCrossBorderShare; - - /** The personal attribute list. */ - private IPersonalAttributeList attributeList = new PersonalAttributeList(); - - /** The qaa. */ - private int qaa; - - /** The token saml. */ - private byte[] tokenSaml = new byte[0]; - - /** The issuer. */ - private String issuer; - - /** The service provider sector. */ - private String spSector; - - /** The service provider institution. */ - private String spInstitution; - - /** The service provider application. */ - private String spApplication; - - /** The service provider country. */ - private String spCountry; - - /** The country. */ - private String country; - - /** The citizen country code. */ - private String citizenCountry; - - /** The Service Provider ID. */ - private String sPID; - - /** The Alias used at the keystore for saving this certificate. */ - private String alias; - - /** - * Gets the SP's Certificate Alias. - * - * @return alias The SP's Certificate Alias. - */ - public String getAlias() { - return alias; - } - - /** - * Sets the SP's Certificate Alias. - * - * @param nAlias - * The SP's Certificate Alias. - */ - public void setAlias(final String nAlias) { - this.alias = nAlias; - } - - /** - * Gets the SP ID. - * - * @return sPID The SP ID. - */ - public String getSPID() { - return sPID; - } - - /** - * Sets the SP ID. - * - * @param sPId - * The new sp samlId. - */ - public void setSPID(final String sPId) { - this.sPID = sPId; - } - - /** - * Gets the citizen country code. - * - * @return The citizen country code value. - */ - public String getCitizenCountryCode() { - return citizenCountry; - } - - /** - * Sets the citizen country code. - * - * @param countryCode - * the new citizen country code value. - */ - public void setCitizenCountryCode(final String countryCode) { - this.citizenCountry = countryCode; - } - - /** - * Gets the sp country. - * - * @return The sp country value. - */ - public String getSpCountry() { - return spCountry; - } - - /** - * Sets the sp country. - * - * @param sPCountry - * the new sp country value. - */ - public void setSpCountry(final String sPCountry) { - this.spCountry = sPCountry; - } - - /** - * Gets the issuer. - * - * @return The issuer value. - */ - public String getIssuer() { - return issuer; - } - - /** - * Sets the issuer. - * - * @param samlIssuer - * the new issuer value. - */ - public void setIssuer(final String samlIssuer) { - this.issuer = samlIssuer; - } - - /** - * Gets the SAML Token. - * - * @return The SAML Token value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Sets the SAML Token. - * - * @param samlToken - * The new SAML Token value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Gets the country. - * - * @return The country value. - */ - public String getCountry() { - return country; - } - - /** - * Sets the country. - * - * @param nCountry - * the new country value. - */ - public void setCountry(final String nCountry) { - this.country = nCountry; - } - - /** - * Getter for the qaa value. - * - * @return The qaa value value. - */ - public int getQaa() { - return qaa; - } - - /** - * Setter for the qaa value. - * - * @param qaaLevel - * The new qaa value. - */ - public void setQaa(final int qaaLevel) { - this.qaa = qaaLevel; - } - - /** - * Getter for the serviceURL value. - * - * @return The serviceURL value. - */ - public String getAssertionConsumerServiceURL() { - return serviceURL; - } - - /** - * Setter for the serviceURL value. - * - * @param newServiceURL - * the assertion consumer service URL. - */ - public void setAssertionConsumerServiceURL(final String newServiceURL) { - this.serviceURL = newServiceURL; - } - - /** - * Getter for the destination value. - * - * @return The destination value. - */ - public String getDestination() { - return destination; - } - - /** - * Setter for the destination value. - * - * @param detination - * the new destination value. - */ - public void setDestination(final String detination) { - this.destination = detination; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param newSamlId - * the new samlId value. - */ - public void setSamlId(final String newSamlId) { - this.samlId = newSamlId; - } - - /** - * Getter for the providerName value. - * - * @return The provider name value. - */ - public String getProviderName() { - return providerName; - } - - /** - * Setter for the providerName value. - * - * @param samlProvider - * the provider name value. - */ - public void setProviderName(final String samlProvider) { - this.providerName = samlProvider; - } - - /** - * Getter for the attributeList value. - * - * @return The attributeList value. - * - * @see IPersonalAttributeList - */ - public IPersonalAttributeList getPersonalAttributeList() { - return (IPersonalAttributeList) attributeList.clone(); - } - - /** - * Setter for the attributeList value. - * - * @param attrList - * the personal attribute list value. - * - * @see IPersonalAttributeList - */ - public void setPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.attributeList = attrList; - } - } - - /** - * Getter for the distinguishedName value. - * - * @return The distinguishedName value. - */ - public String getDistinguishedName() { - return distinguishedName; - } - - /** - * Setter for the distinguishedName value. - * - * @param certDN - * the distinguished name value. - */ - public void setDistinguishedName(final String certDN) { - this.distinguishedName = certDN; - } - - /** - * Gets the service provider sector. - * - * @return The service provider sector value. - */ - public String getSpSector() { - return spSector; - } - - /** - * Sets the service provider sector. - * - * @param samlSPSector - * the new service provider sector value. - */ - public void setSpSector(final String samlSPSector) { - this.spSector = samlSPSector; - } - - /** - * Gets the service provider institution. - * - * @return The service provider institution value. - */ - public String getSpInstitution() { - return spInstitution; - } - - /** - * Sets the service provider institution. - * - * @param samlSPInst - * the new service provider institution value. - */ - public void setSpInstitution(final String samlSPInst) { - this.spInstitution = samlSPInst; - } - - /** - * Gets the service provider application. - * - * @return The service provider application value. - */ - public String getSpApplication() { - return spApplication; - } - - /** - * Sets the service provider application. - * - * @param samlSPApp - * the new service provider application value. - */ - public void setSpApplication(final String samlSPApp) { - this.spApplication = samlSPApp; - } - - /** - * Checks if is eId sector share. - * - * @return true, if is eId sector share. - */ - public boolean isEIDSectorShare() { - return eIDSectorShare; - } - - /** - * Sets the eId sector share. - * - * @param eIdSectorShare - * the new eId sector share value. - */ - public void setEIDSectorShare(final boolean eIdSectorShare) { - this.eIDSectorShare = eIdSectorShare; - } - - /** - * Checks if is eId cross sector share. - * - * @return true, if is eId cross sector share. - */ - public boolean isEIDCrossSectorShare() { - return eIDCrossSectorShare; - } - - /** - * Sets the eId cross sector share. - * - * @param eIdCrossSectorShare - * the new eId cross sector share value. - */ - public void setEIDCrossSectorShare(final boolean eIdCrossSectorShare) { - this.eIDCrossSectorShare = eIdCrossSectorShare; - } - - /** - * Checks if is eId cross border share. - * - * @return true, if is eId cross border share. - */ - public boolean isEIDCrossBorderShare() { - return eIDCrossBorderShare; - } - - /** - * Sets the eId cross border share. - * - * @param eIdCrossBorderShare - * the new eId cross border share value. - */ - public void setEIDCrossBorderShare(final boolean eIdCrossBorderShare) { - this.eIDCrossBorderShare = eIdCrossBorderShare; - } - - /** - * Returns a copy of this STORKAuthnRequest instance. - * - * @return The copy of this STORKAuthnRequest. - * @throws CloneNotSupportedException - * on clone exception - */ - @Override - public Object clone() throws CloneNotSupportedException { - STORKAuthnRequest storkAuthnReq = null; - try { - storkAuthnReq = (STORKAuthnRequest) super.clone(); - storkAuthnReq.setPersonalAttributeList(getPersonalAttributeList()); - storkAuthnReq.setTokenSaml(getTokenSaml()); - } catch (final CloneNotSupportedException e) { - // assert false; - LOG.trace("[PersonalAttribute] Nothing to do."); - } - - return storkAuthnReq; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java deleted file mode 100644 index 32bfd0df0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKAuthnResponse.java +++ /dev/null @@ -1,405 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; - -import org.apache.log4j.Logger; -import org.joda.time.DateTime; -import org.opensaml.saml2.core.Assertion; - -/** - * This class is a bean used to store the information relative to the STORKAuthnResponse. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class STORKAuthnResponse implements Serializable, Cloneable { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = -9100982727074068660L; - - /** Response Id. */ - private String samlId; - - /** Authentication failed? */ - private boolean fail; - - /** Status code. */ - private String statusCode; - - /** Secondary status code. */ - private String subStatusCode; - - /** Audience restriction. */ - private String audienceRest; - - /** Error message. */ - private String message; - - /** Id of the request that originated this response. */ - private String inResponseTo; - - /** Expiration date. */ - private DateTime notOnOrAfter; - - /** Creation date. */ - private DateTime notBefore; - - /** The SAML token. */ - private byte[] tokenSaml = new byte[0]; - - /** Country. */ - private String country; - - /** Citizen's personal attribute list. */ - private IPersonalAttributeList attributeList = new PersonalAttributeList(); - - /** List of all assertions in response **/ - private List assertions; - - /** The complete list from all assertions **/ - private IPersonalAttributeList totalAttributeList = new PersonalAttributeList(); - - /** All personal attribute lists **/ - private List attributeLists; - - /** - * Logger object. - */ - private static final Logger LOG = Logger.getLogger(STORKAuthnResponse.class.getName()); - - /** - * Getter for the subStatusCode. - * - * @return The subStatusCode value. - */ - public String getSubStatusCode() { - return subStatusCode; - } - - /** - * Setter for the subStatusCode. - * - * @param samlSubStatusCode - * the new subStatusCode value. - */ - public void setSubStatusCode(final String samlSubStatusCode) { - this.subStatusCode = samlSubStatusCode; - } - - /** - * Getter for audienceRest. - * - * @return The audienceRest value. - */ - public String getAudienceRestriction() { - return audienceRest; - } - - /** - * Setter for audienceRest. - * - * @param audRest - * the new audienceRest value. - */ - public void setAudienceRestriction(final String audRest) { - this.audienceRest = audRest; - } - - /** - * Getter for the samlToken. - * - * @return The samlToken value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Setter for samlToken. - * - * @param samlToken - * the new tokenSaml value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Getter for the country name. - * - * @return The country name value. - */ - public String getCountry() { - return country; - } - - /** - * Setter for the country name. - * - * @param cCountry - * the new country name value. - */ - public void setCountry(final String cCountry) { - this.country = cCountry; - } - - /** - * Getter for pal value. - * - * @return The pal value. - * - * @see PersonalAttributeList - */ - public IPersonalAttributeList getPersonalAttributeList() { - return (IPersonalAttributeList) attributeList.clone(); - } - - /** - * Setter for the Personal Attribute List value. - * - * @param attrList - * the new value. - * - * @see PersonalAttributeList - */ - public void setPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.attributeList = attrList; - } - } - - /** - * Getter for the inResponseTo value. - * - * @return The inResponseTo value. - */ - public String getInResponseTo() { - return inResponseTo; - } - - /** - * Setter for the inResponseTo value. - * - * @param samlInResponseTo - * the new inResponseTo value. - */ - public void setInResponseTo(final String samlInResponseTo) { - this.inResponseTo = samlInResponseTo; - } - - /** - * Getter for the fail value. - * - * @return The fail value. - */ - public boolean isFail() { - return fail; - } - - /** - * Setter for the fail value. - * - * @param failVal - * the new fail value. - */ - public void setFail(final boolean failVal) { - this.fail = failVal; - } - - /** - * Getter for the message value. - * - * @return The message value. - */ - public String getMessage() { - return message; - } - - /** - * Setter for the message value. - * - * @param msg - * the new message value. - */ - public void setMessage(final String msg) { - this.message = msg; - } - - /** - * Getter for the statusCode value. - * - * @return The statusCode value. - */ - public String getStatusCode() { - return statusCode; - } - - /** - * Setter for the statusCode value. - * - * @param status - * the new statusCode value. - */ - public void setStatusCode(final String status) { - this.statusCode = status; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param nSamlId - * the new samlId value. - */ - public void setSamlId(final String nSamlId) { - this.samlId = nSamlId; - } - - /** - * Getter for the notOnOrAfter value. - * - * @return The notOnOrAfter value. - * - * @see DateTime - */ - public DateTime getNotOnOrAfter() { - return this.notOnOrAfter; - } - - /** - * Setter for the notOnOrAfter value. - * - * @param nOnOrAfter - * the new notOnOrAfter value. - * - * @see DateTime - */ - public void setNotOnOrAfter(final DateTime nOnOrAfter) { - this.notOnOrAfter = nOnOrAfter; - } - - /** - * Getter for the notBefore value. - * - * @return The notBefore value. - * - * @see DateTime - */ - public DateTime getNotBefore() { - return notBefore; - } - - /** - * Setter for the notBefore value. - * - * @param nBefore - * the new notBefore value. - * - * @see DateTime - */ - public void setNotBefore(final DateTime nBefore) { - this.notBefore = nBefore; - } - - public void setAssertions(List newAssert) { - this.assertions = newAssert; - } - - public List getAssertions() { - return assertions; - } - - /** - * Getter for the toal pal value. - * - * @return The total pal value. - * - * @see PersonalAttributeList - */ - public IPersonalAttributeList getTotalPersonalAttributeList() { - return (IPersonalAttributeList) totalAttributeList.clone(); - } - - public List getNormalizedPersonalAttributeList() { - List returnAttrList = new ArrayList(); - - if (this.totalAttributeList.isEmpty()) { - this.totalAttributeList = this.attributeList; - } - - for (PersonalAttribute pa : this.totalAttributeList) { - // Get the shortname of the attribute by removing - // the attached assertionId, if there is one and - // put the shortname as the attribute name - pa.setName(pa.getName().split("_")[0]); - // We add it to the return list. - returnAttrList.add(pa); - } - return returnAttrList; - } - - /** - * Setter for the total Personal Attribute List value. - * - * @param attrList - * the new value. - * - * @see PersonalAttributeList - */ - public void setTotalPersonalAttributeList(final IPersonalAttributeList attrList) { - if (attrList != null) { - this.totalAttributeList = attrList; - } - } - - /** - * Getter for personal attribute lists - * - * @return The lists - * - * @see PersonalAttributeList - */ - public List getPersonalAttributeLists() { - return attributeLists; - } - - /** - * Setter for the Personal Attribute List value. - * - * @param attrList - * the new value. - * - * @see PersonalAttributeList - */ - public void setPersonalAttributeLists(final List attrLists) { - if (attrLists != null) { - this.attributeLists = attrLists; - } - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutRequest.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutRequest.java deleted file mode 100644 index acb70d365..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutRequest.java +++ /dev/null @@ -1,205 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -public class STORKLogoutRequest implements Serializable, Cloneable { - private static final long serialVersionUID = 4778480781609392750L; - - /** The samlId. */ - private String samlId; - - /** The destination. */ - private String destination; - - /** The distinguished name. */ - private String distinguishedName; - - /** The qaa. */ - private int qaa; - - /** The token saml. */ - private byte[] tokenSaml = new byte[0]; - - /** The issuer. */ - private String issuer; - - /** The country. */ - private String country; - - /** The Alias used at the keystore for saving this certificate. */ - private String alias; - - /** The ID of principal as known to SP **/ - private String spProvidedId; - - /** - * Gets the SP's Certificate Alias. - * - * @return alias The SP's Certificate Alias. - */ - public String getAlias() { - return alias; - } - - /** - * Sets the SP's Certificate Alias. - * - * @param nAlias - * The SP's Certificate Alias. - */ - public void setAlias(final String nAlias) { - this.alias = nAlias; - } - - /** - * Gets the issuer. - * - * @return The issuer value. - */ - public String getIssuer() { - return issuer; - } - - /** - * Sets the issuer. - * - * @param samlIssuer - * the new issuer value. - */ - public void setIssuer(final String samlIssuer) { - this.issuer = samlIssuer; - } - - /** - * Gets the SAML Token. - * - * @return The SAML Token value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Sets the SAML Token. - * - * @param samlToken - * The new SAML Token value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Gets the country. - * - * @return The country value. - */ - public String getCountry() { - return country; - } - - /** - * Sets the country. - * - * @param nCountry - * the new country value. - */ - public void setCountry(final String nCountry) { - this.country = nCountry; - } - - /** - * Getter for the qaa value. - * - * @return The qaa value value. - */ - public int getQaa() { - return qaa; - } - - /** - * Setter for the qaa value. - * - * @param qaaLevel - * The new qaa value. - */ - public void setQaa(final int qaaLevel) { - this.qaa = qaaLevel; - } - - /** - * Getter for the destination value. - * - * @return The destination value. - */ - public String getDestination() { - return destination; - } - - /** - * Setter for the destination value. - * - * @param detination - * the new destination value. - */ - public void setDestination(final String detination) { - this.destination = detination; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param newSamlId - * the new samlId value. - */ - public void setSamlId(final String newSamlId) { - this.samlId = newSamlId; - } - - /** - * Getter for the distinguishedName value. - * - * @return The distinguishedName value. - */ - public String getDistinguishedName() { - return distinguishedName; - } - - /** - * Setter for the distinguishedName value. - * - * @param certDN - * the distinguished name value. - */ - public void setDistinguishedName(final String certDN) { - this.distinguishedName = certDN; - } - - /** Getter for spProvidedId **/ - public String getSpProvidedId() { - return spProvidedId; - } - - public void setSpProvidedId(final String nSpProvidedId) { - this.spProvidedId = nSpProvidedId; - } - - @Override - public Object clone() throws CloneNotSupportedException { - STORKLogoutRequest storkLogoutRequest = null; - storkLogoutRequest = (STORKLogoutRequest) super.clone(); - storkLogoutRequest.setTokenSaml(getTokenSaml()); - return storkLogoutRequest; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutResponse.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutResponse.java deleted file mode 100644 index 8606b6389..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKLogoutResponse.java +++ /dev/null @@ -1,281 +0,0 @@ -package eu.stork.peps.auth.commons; - -import java.io.Serializable; - -public class STORKLogoutResponse implements Serializable, Cloneable { - private static final long serialVersionUID = 4778480781609392750L; - - /** The samlId. */ - private String samlId; - - /** The destination. */ - private String destination; - - /** The distinguished name. */ - private String distinguishedName; - - /** The token saml. */ - private byte[] tokenSaml = new byte[0]; - - /** The issuer. */ - private String issuer; - - /** The country. */ - private String country; - - /** The Alias used at the keystore for saving this certificate. */ - private String alias; - - /** Status code. */ - private String statusCode; - - /** Secondary status code. */ - private String subStatusCode; - - /** Status message. */ - private String statusMessage; - - /** Logout failed? */ - private boolean fail; - - /** The inResponseTo */ - private String inResponseTo; - - /** - * Gets the SP's Certificate Alias. - * - * @return alias The SP's Certificate Alias. - */ - public String getAlias() { - return alias; - } - - /** - * Sets the SP's Certificate Alias. - * - * @param nAlias - * The SP's Certificate Alias. - */ - public void setAlias(final String nAlias) { - this.alias = nAlias; - } - - /** - * Gets the issuer. - * - * @return The issuer value. - */ - public String getIssuer() { - return issuer; - } - - /** - * Sets the issuer. - * - * @param samlIssuer - * the new issuer value. - */ - public void setIssuer(final String samlIssuer) { - this.issuer = samlIssuer; - } - - /** - * Gets the SAML Token. - * - * @return The SAML Token value. - */ - public byte[] getTokenSaml() { - return tokenSaml.clone(); - } - - /** - * Sets the SAML Token. - * - * @param samlToken - * The new SAML Token value. - */ - public void setTokenSaml(final byte[] samlToken) { - if (samlToken != null) { - this.tokenSaml = samlToken.clone(); - } - } - - /** - * Gets the country. - * - * @return The country value. - */ - public String getCountry() { - return country; - } - - /** - * Sets the country. - * - * @param nCountry - * the new country value. - */ - public void setCountry(final String nCountry) { - this.country = nCountry; - } - - /** - * Getter for the destination value. - * - * @return The destination value. - */ - public String getDestination() { - return destination; - } - - /** - * Setter for the destination value. - * - * @param detination - * the new destination value. - */ - public void setDestination(final String detination) { - this.destination = detination; - } - - /** - * Getter for the samlId value. - * - * @return The samlId value. - */ - public String getSamlId() { - return samlId; - } - - /** - * Setter for the samlId value. - * - * @param newSamlId - * the new samlId value. - */ - public void setSamlId(final String newSamlId) { - this.samlId = newSamlId; - } - - /** - * Getter for the distinguishedName value. - * - * @return The distinguishedName value. - */ - public String getDistinguishedName() { - return distinguishedName; - } - - /** - * Setter for the distinguishedName value. - * - * @param certDN - * the distinguished name value. - */ - public void setDistinguishedName(final String certDN) { - this.distinguishedName = certDN; - } - - /** - * Getter for the fail value. - * - * @return The fail value. - */ - public boolean isFail() { - return fail; - } - - /** - * Setter for the fail value. - * - * @param failVal - * the new fail value. - */ - public void setFail(final boolean failVal) { - this.fail = failVal; - } - - /** - * Getter for the statusCode value. - * - * @return The statusCode value. - */ - public String getStatusCode() { - return statusCode; - } - - /** - * Getter for the subStatusCode. - * - * @return The subStatusCode value. - */ - public String getSubStatusCode() { - return subStatusCode; - } - - /** - * Setter for the subStatusCode. - * - * @param samlSubStatusCode - * the new subStatusCode value. - */ - public void setSubStatusCode(final String samlSubStatusCode) { - this.subStatusCode = samlSubStatusCode; - } - - /** - * Setter for the statusMessage value. - * - * @param status - * the new statusMessage value. - */ - public void setStatusMessage(final String status) { - this.statusMessage = status; - } - - /** - * Getter for the statusMessage value. - * - * @return The statusMessage value. - */ - public String getStatusMessage() { - return statusMessage; - } - - /** - * Setter for the statusCode value. - * - * @param status - * the new statusCode value. - */ - public void setStatusCode(final String status) { - this.statusCode = status; - } - - @Override - public Object clone() throws CloneNotSupportedException { - STORKLogoutResponse storkLogoutResponse = null; - storkLogoutResponse = (STORKLogoutResponse) super.clone(); - storkLogoutResponse.setTokenSaml(getTokenSaml()); - return storkLogoutResponse; - } - - - /** - * Getter for the inResponseTo value. - * - * @return The inResponseTo value. - */ - public String getInResponseTo() { - return inResponseTo; - } - - /** - * Setter for the inResponseTo value. - * - * @param inResponseTo the new inResponseTo value. - */ - public void setInResponseTo(String inResponseTo) { - this.inResponseTo = inResponseTo; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKStatusCode.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKStatusCode.java deleted file mode 100644 index 98781828e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKStatusCode.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains the SAML Token Status Code. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ - */ -public enum STORKStatusCode { - - /** URI for Requester status code. */ - REQUESTER_URI("urn:oasis:names:tc:SAML:2.0:status:Requester"), - - /** URI for Responder status code. */ - RESPONDER_URI("urn:oasis:names:tc:SAML:2.0:status:Responder"), - - /** URI for Success status code. */ - SUCCESS_URI("urn:oasis:names:tc:SAML:2.0:status:Success"), - - /** Attribute is Available. */ - STATUS_AVAILABLE("Available"), - - /** Attribute is NotAvailable. */ - STATUS_NOT_AVAILABLE("NotAvailable"), - - /** Attribute is Withheld. */ - STATUS_WITHHELD("Withheld"); - - /** - * Represents the constant's value. - */ - private String value; - - /** - * Solo Constructor. - * - * @param val - * The Constant value. - */ - private STORKStatusCode(final String val) { - - this.value = val; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - - return value; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKSubStatusCode.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKSubStatusCode.java deleted file mode 100644 index 0d5d72a0e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/STORKSubStatusCode.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons; - -/** - * This enum class contains the SAML Token Sub Status Code. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.7 $, $Date: 2010-11-17 05:15:28 $ - */ -public enum STORKSubStatusCode { - - /** URI for AuthnFailed status code. */ - AUTHN_FAILED_URI("urn:oasis:names:tc:SAML:2.0:status:AuthnFailed"), - - /** URI for InvalidAttrNameOrValue status code. */ - INVALID_ATTR_NAME_VALUE_URI("urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue"), - - /** URI for InvalidNameIDPolicy status code. */ - INVALID_NAMEID_POLICY_URI("urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy"), - - /** URI for VersionMismatch status code. */ - VERSION_MISMATCH_URI("urn:oasis:names:tc:SAML:2.0:status:VersionMismatch"), - - /** URI for RequestDenied status code. */ - REQUEST_DENIED_URI("urn:oasis:names:tc:SAML:2.0:status:RequestDenied"), - - /** URI for QaaNotSupported status code. */ - QAA_NOT_SUPPORTED("http://www.stork.gov.eu/saml20/statusCodes/QAANotSupported"); - - /** - * Represents the constant's value. - */ - private String value; - - /** - * Solo Constructor. - * - * @param val - * The Constant value. - */ - private STORKSubStatusCode(final String val) { - - this.value = val; - } - - /** - * Return the Constant Value. - * - * @return The constant value. - */ - public String toString() { - - return value; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java deleted file mode 100644 index 97b43cf67..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/AbstractPEPSException.java +++ /dev/null @@ -1,177 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -import java.io.Serializable; - -/** - * Abstract class to represent the various PEPS exceptions. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ - */ -public abstract class AbstractPEPSException extends RuntimeException implements Serializable { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = -1884417567740138022L; - - /** - * Error code. - */ - private String errorCode; - - /** - * Error message. - */ - private String errorMessage; - - /** - * SAML token. - */ - private String samlTokenFail; - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters. - * - * @param code - * The error code value. - * @param message - * The error message value. - */ - public AbstractPEPSException(final String code, final String message) { - - super(message); - this.errorCode = code; - this.errorMessage = message; - } - - /** - * Exception Constructor with the errorMessage as parameters and the Throwable cause. - * - * @param message - * The error message value. - * @param cause - * The throwable object. - */ - public AbstractPEPSException(final String message, final Throwable cause) { - - super(message, cause); - this.errorMessage = message; - } - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters and the Throwable cause. - * - * @param code - * The error code value. - * @param message - * The error message value. - * @param cause - * The throwable object. - */ - public AbstractPEPSException(final String code, final String message, final Throwable cause) { - - super(message, cause); - this.errorCode = code; - this.errorMessage = message; - } - - /** - * Exception Constructor with three Strings representing the errorCode, errorMessage and encoded samlToken as parameters. - * - * @param code - * The error code value. - * @param message - * The error message value. - * @param samlToken - * The error SAML Token. - */ - public AbstractPEPSException(final String code, final String message, final String samlToken) { - - super(message); - this.errorCode = code; - this.errorMessage = message; - this.samlTokenFail = samlToken; - } - - /** - * Constructor with SAML Token as argument. Error message and error code are embedded in the SAML. - * - * @param samlToken - * The error SAML Token. - */ - public AbstractPEPSException(final String samlToken) { - super(); - this.samlTokenFail = samlToken; - } - - /** - * Getter for errorCode. - * - * @return The errorCode value. - */ - public final String getErrorCode() { - return errorCode; - } - - /** - * Setter for errorCode. - * - * @param code - * The error code value. - */ - public final void setErrorCode(final String code) { - this.errorCode = code; - } - - /** - * Getter for errorMessage. - * - * @return The error Message value. - */ - public final String getErrorMessage() { - return errorMessage; - } - - /** - * Setter for errorMessage. - * - * @param message - * The error message value. - */ - public final void setErrorMessage(final String message) { - this.errorMessage = message; - } - - /** - * Getter for SAMLTokenFail. - * - * @return The error SAML Token. - */ - public final String getSamlTokenFail() { - return samlTokenFail; - } - - /** - * Setter for SAMLTokenFail. - * - * @param samlToken - * The error SAML token. - */ - public final void setSamlTokenFail(final String samlToken) { - this.samlTokenFail = samlToken; - } -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java deleted file mode 100644 index 3479a33b8..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/CPEPSException.java +++ /dev/null @@ -1,146 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * This exception is thrown by the C-PEPS service and holds the relative information to present to the citizen. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.9 $, $Date: 2010-11-17 05:15:28 $ - */ -public final class CPEPSException extends RuntimeException { - - /** - * Serial id. - */ - private static final long serialVersionUID = -4012295047127999362L; - - /** - * Error code. - */ - private String errorCode; - - /** - * Error message. - */ - private String errorMessage; - - /** - * SAML token. - */ - private String samlTokenFail; - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters. - * - * @param samlToken - * The SAML Token. - * @param code - * The error code value. - * @param message - * The error message value. - */ - public CPEPSException(final String samlToken, final String code, final String message) { - - super(message); - this.setErrorCode(code); - this.setErrorMessage(message); - this.setSamlTokenFail(samlToken); - } - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters. - * - * @param samlToken - * The SAML Token. - * @param code - * The error code value. - * @param message - * The error message value. - * @param cause - * The original exception; - */ - public CPEPSException(final String samlToken, final String code, final String message, final Throwable cause) { - - super(message, cause); - this.setErrorCode(code); - this.setErrorMessage(message); - this.setSamlTokenFail(samlToken); - } - - /** - * {@inheritDoc} - */ - public String getMessage() { - return this.getErrorMessage() + " (" + this.getErrorCode() + ")"; - } - - /** - * Getter for the error code. - * - * @return The errorCode value. - */ - public String getErrorCode() { - return errorCode; - } - - /** - * Setter for the error code. - * - * @param code - * The error code. - */ - public void setErrorCode(final String code) { - this.errorCode = code; - } - - /** - * Getter for the error message. - * - * @return The errorMessage value. - */ - public String getErrorMessage() { - return errorMessage; - } - - /** - * Setter for the error message. - * - * @param message - * The error message. - */ - public void setErrorMessage(final String message) { - this.errorMessage = message; - } - - /** - * Getter for the samlTokenFail. - * - * @return The samlTokenFail value. - */ - public String getSamlTokenFail() { - return samlTokenFail; - } - - /** - * Setter for the samlTokenFail. - * - * @param samlToken - * The error Saml Token. - */ - public void setSamlTokenFail(final String samlToken) { - this.samlTokenFail = samlToken; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java deleted file mode 100644 index f1bccb277..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InternalErrorPEPSException.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Internal Error Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.13 $, $Date: 2010-11-17 05:15:28 $ - * - * @see AbstractPEPSException - */ -public final class InternalErrorPEPSException extends AbstractPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 1193001455410319795L; - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters and the Throwable cause. - * - * @param errorCode - * The error code value. - * @param errorMessage - * The error message value. - * @param cause - * The throwable object. - */ - public InternalErrorPEPSException(final String errorCode, final String errorMessage, final Throwable cause) { - - super(errorCode, errorMessage, cause); - } - - /** - * Exception Constructor with three strings representing the errorCode, errorMessage and encoded samlToken as parameters. - * - * @param errorCode - * The error code value. - * @param errorMessage - * The error message value. - * @param samlTokenFail - * The error SAML Token. - */ - public InternalErrorPEPSException(final String errorCode, final String errorMessage, final String samlTokenFail) { - - super(errorCode, errorMessage, samlTokenFail); - } - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters. - * - * @param errorCode - * The error code value. - * @param errorMessage - * The error message value. - */ - public InternalErrorPEPSException(final String errorCode, final String errorMessage) { - - super(errorCode, errorMessage); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java deleted file mode 100644 index 0aca67d5b..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidParameterPEPSException.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Invalid Parameter Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.11 $, $Date: 2010-11-17 05:15:28 $ - * - * @see InvalidParameterPEPSException - */ -public class InvalidParameterPEPSException extends AbstractPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 2046282148740524875L; - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters. - * - * @param errorCode - * The error code value. - * @param errorMessage - * The error code message value. - */ - public InvalidParameterPEPSException(final String errorCode, final String errorMessage) { - super(errorCode, errorMessage); - } - - /** - * Exception Constructor with one String representing the encoded samlToken. - * - * @param samlTokenFail - * The error SAML Token. - */ - public InvalidParameterPEPSException(final String samlTokenFail) { - super(samlTokenFail); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java deleted file mode 100644 index a4389da79..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/InvalidSessionPEPSException.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Invalid session Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.14 $, $Date: 2010-11-17 05:15:28 $ - * - * @see InvalidParameterPEPSException - */ -public class InvalidSessionPEPSException extends InvalidParameterPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 7147090160978319016L; - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters. - * - * @param errorCode - * The error code value. - * @param errorMessage - * The error message value. - */ - public InvalidSessionPEPSException(final String errorCode, final String errorMessage) { - - super(errorCode, errorMessage); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java deleted file mode 100644 index 03e7fb72f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/SecurityPEPSException.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Security PEPS Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.18 $, $Date: 2010-11-17 05:15:28 $ - * - * @see AbstractPEPSException - */ -public final class SecurityPEPSException extends AbstractPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 5605743302478554967L; - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters. - * - * @param errorCode - * The error code value. - * @param errorMsg - * The error message value. - */ - public SecurityPEPSException(final String errorCode, final String errorMsg) { - super(errorCode, errorMsg); - } - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters and the Throwable cause. - * - * @param errorCode - * The error code value. - * @param errorMessage - * The error message value. - * @param cause - * The throwable object. - */ - public SecurityPEPSException(final String errorCode, final String errorMessage, final Throwable cause) { - - super(errorCode, errorMessage, cause); - } - - /** - * Exception Constructor with one String representing the encoded samlToken. - * - * @param samlTokenFail - * The error SAML Token. - */ - public SecurityPEPSException(final String samlTokenFail) { - super(samlTokenFail); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java deleted file mode 100644 index 55f4f5a01..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/StorkPEPSException.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.commons.exceptions; - -/** - * Security PEPS Exception class. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com, paulo.ribeiro@multicert.com - * @version $Revision: 1.15 $, $Date: 2010-11-17 05:15:28 $ - * - * @see AbstractPEPSException - */ -public final class StorkPEPSException extends AbstractPEPSException { - - /** - * Unique identifier. - */ - private static final long serialVersionUID = 8048033129798427574L; - - /** - * Exception Constructor with two Strings representing the errorCode and errorMessage as parameters. - * - * @param errorCode - * The error code value. - * @param errorMsg - * The error message value. - */ - public StorkPEPSException(final String errorCode, final String errorMsg) { - super(errorCode, errorMsg); - } - - /** - * {@inheritDoc} - */ - public String getMessage() { - - return "Security Error (" + this.getErrorCode() + ") processing request : " + this.getErrorMessage(); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java deleted file mode 100644 index d83068beb..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/exceptions/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -/** - * Package for the PEPS’ Exceptions handling. - * - * @since 1.0 - */ -package eu.stork.peps.auth.commons.exceptions; - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/package-info.java deleted file mode 100644 index d733342d7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/commons/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -/** - * Common Authentication Service functionalities to be deployed in every PEPS - * is contained in this package. - * In particular, it contains the SAML Engine that implements the SAML messages - * management - * - * @since 1.0 - */ -package eu.stork.peps.auth.commons; - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IAUService.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IAUService.java deleted file mode 100644 index d9166458f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IAUService.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import java.util.Map; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.IStorkSession; -import eu.stork.peps.auth.commons.STORKAttrQueryResponse; -import eu.stork.peps.auth.commons.STORKAuthnResponse; - -/** - * Interface for Specific Authentication methods. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface IAUService { - - /** - * Prepares the citizen to be redirected to the IdP. - * - * @param personalList - * The Personal Attribute List. - * @param parameters - * The parameters. - * @param session - * The session object. - * @param requestAttributes - * The Requested attributes. - * - * @return byte[] containing a SAML Request. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - byte[] prepareCitizenAuthentication(IPersonalAttributeList personalList, Map parameters, Map requestAttributes, IStorkSession session); - - /** - * Prepares the citizen to be redirected to the PV. - * - * @param personalList - * The Personal Attribute List. - * @param parameters - * The parameters. - * @param session - * The session object. - * @param requestAttributes - * The Requested attributes. - * - * @return byte[] containing a SAML Request. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - byte[] preparePVRequest(IPersonalAttributeList personalList, Map parameters, Map requestAttributes, IStorkSession session); - - /** - * Authenticates a citizen. - * - * @param personalList - * The Personal Attribute List. - * @param parameters - * The parameters. - * @param requestAttributes - * The requested attributes. - * - * @return The updated Personal Attribute List. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList authenticateCitizen(IPersonalAttributeList personalList, Map parameters, Map requestAttributes); - - /** - * Validates a power. - * - * @param personalList - * The Personal Attribute List. - * @param parameters - * The parameters. - * @param requestAttributes - * The requested attributes. - * - * @return The updated Personal Attribute List (power validated). - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList powerValidation(IPersonalAttributeList personalList, Map parameters, Map requestAttributes); - - /** - * Prepares the Citizen browser to be redirected to the AP. - * - * @param personalList - * The Personal Attribute List. - * @param parameters - * The parameters. - * @param session - * The session object. - * @param requestAttributes - * The requested attributes. - * - * @return true in case of no error. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - boolean prepareAPRedirect(IPersonalAttributeList personalList, Map parameters, Map requestAttributes, IStorkSession session); - - /** - * Returns the attributes values from the AP. - * - * @param personalList - * The Personal Attribute List. - * @param parameters - * The parameters. - * @param requestAttributes - * The request attributes. - * - * @return The updated Personal Attribute List. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList getAttributesFromAttributeProviders(IPersonalAttributeList personalList, Map parameters, Map requestAttributes); - - /** - * Get the attributes from the AP with verification. - * - * @param personalList - * The Personal Attribute List. - * @param parameters - * The HTTP Parameters. - * @param requestAttributes - * The requested Attributes. - * @param session - * The session object. - * @param auProcessId - * The SAML identifier. - * - * @return true if the attributes were correctly verified. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - boolean getAttributesWithVerification(IPersonalAttributeList personalList, Map parameters, Map requestAttributes, IStorkSession session, String auProcessId); - - /** - * Validates a SAML Response. - * - * @param samlToken - * The SAML Token. - * @param session - * The session object. - * - * @return the STORKAuthnResponse associated with the validated response. - * - * @see IStorkSession - */ - STORKAuthnResponse processAuthenticationResponse(byte[] samlToken, IStorkSession session); - - /** - * Generates a SAML Response in case of error. - * - * @param inResponseTo - * The SAML's identifier to response. - * @param issuer - * The issuer value. - * @param assertionURL - * The assertion URL. - * @param code - * The error code. - * @param subcode - * The sub error code. - * @param message - * The error message. - * @param ipUserAddress - * The user IP address. - * - * @return byte[] containing the SAML Response. - */ - byte[] generateErrorAuthenticationResponse(String inResponseTo, String issuer, String assertionURL, String code, String subcode, String message, String ipUserAddress); - - /** - * Compares two given personal attribute lists. - * - * @param original - * The original Personal Attribute List. - * @param modified - * The modified Personal Attribute List. - * @return true if the original list contains the modified one. False otherwise. - * - * @see IPersonalAttributeList - */ - boolean comparePersonalAttributeLists(IPersonalAttributeList original, IPersonalAttributeList modified); - - /** - * Prepares the citizen to be redirected to the AtP. - * - * @param personalList - * The Personal Attribute List. - * @param parameters - * The parameters. - * @param session - * The session object. - * - * @return byte[] containing a SAML Request. - * - * @see IPersonalAttributeList - * @see IStorkSession - */ - byte[] prepareAttributeRequest(IPersonalAttributeList personalList, Map parameters, IStorkSession session); - - /** - * Validates a SAML Response. - * - * @param samlToken - * The SAML Token. - * @param session - * The session object. - * - * @return the STORKAttrQueryResponse associated with the validated response. - * - * @see IStorkSession - */ - STORKAttrQueryResponse processAttributeResponse(byte[] samlToken, IStorkSession session); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ICheckAttributeValue.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ICheckAttributeValue.java deleted file mode 100644 index ccfcebf43..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ICheckAttributeValue.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import java.util.List; - -/** - * Interface that defines the methods to work with the validation of attributes. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface ICheckAttributeValue { - - /** - * Checks if the list of values contains the expected value. - * - * @param values - * The List of values. - * @param expectedValue - * The value to check if it exists on the list. - * - * @return boolean true, if the value is present in the list. False, otherwise. - */ - boolean checkValue(List values, String expectedValue); - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IDeriveAttribute.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IDeriveAttribute.java deleted file mode 100644 index a661e731b..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/IDeriveAttribute.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import eu.stork.peps.auth.commons.IStorkSession; -import eu.stork.peps.auth.commons.PersonalAttribute; - -/** - * Interface that defines the methods to work with derivation of attributes. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface IDeriveAttribute { - - /** - * Derives the attribute value. Set the Personal Attribute value to null if the value in session or the value of age are invalid (non-numeric or null). - * - * @param personalAttrList - * The Personal Attribute List. - * @param session - * The session object. - * - * @see PersonalAttribute The personal Attribute - * @see IStorkSession The session object. - */ - void deriveAttributeToData(PersonalAttribute personalAttrList, IStorkSession session); - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/INormaliseValue.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/INormaliseValue.java deleted file mode 100644 index eaae06481..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/INormaliseValue.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import eu.stork.peps.auth.commons.PersonalAttribute; - -/** - * Interface for attribute's value normalisation. - * - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface INormaliseValue { - - /** - * Translates the attribute's value from local format to STORK format. - * - * @param personalAttribute - * The Personal Attribute to normalise the value. - * - * @see PersonalAttribute - */ - void normaliseAttributeValueToStork(PersonalAttribute personalAttribute); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ITranslatorService.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ITranslatorService.java deleted file mode 100644 index 4769bba19..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/ITranslatorService.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.auth.specific; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.IStorkSession; -import eu.stork.peps.auth.commons.STORKAuthnRequest; - -/** - * Interface for attributes normalization. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, luis.felix@multicert.com, hugo.magalhaes@multicert.com - */ -public interface ITranslatorService { - - /** - * Translates the attributes from local format to STORK format. - * - * @param personalList - * The Personal Attribute List. - * - * @return The Personal Attribute List with normalised attributes. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList normaliseAttributeNamesToStork(IPersonalAttributeList personalList); - - /** - * Translates the attributes values from local format to STORK format. - * - * @param personalList - * The Personal Attribute List. - * - * @return The PersonalAttributeList with normalised values. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList normaliseAttributeValuesToStork(IPersonalAttributeList personalList); - - /** - * Translates the attributes from STORK format to local format. - * - * @param personalList - * The Personal Attribute List. - * - * @return The PersonalAttributeList with normalised attributes. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList normaliseAttributeNamesFromStork(IPersonalAttributeList personalList); - - /** - * Derive Attribute Names To Stork format. - * - * @param personalList - * The Personal Attribute List, - * - * @return The PersonalAttributeList with derived attributes. - * - * @see IPersonalAttributeList - */ - IPersonalAttributeList deriveAttributeFromStork(IPersonalAttributeList personalList); - - /** - * Derive Attribute Names from Stork format. - * - * @param session - * The session object. - * @param modifiedList - * The Personal Attribute List. - * - * @return The PersonalAttributeList with derived attributes. - * - * @see IStorkSession - * @see IPersonalAttributeList - */ - IPersonalAttributeList deriveAttributeToStork(IStorkSession session, IPersonalAttributeList modifiedList); - - /** - * Validate the values of the attributes. - * - * @param pal - * The attribute list - * - * @return True, if all the attributes have values. False, otherwise. - * - * @see STORKAuthnRequest - */ - boolean checkAttributeValues(IPersonalAttributeList pa); -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/package-info.java deleted file mode 100644 index a25c52311..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/auth/specific/package-info.java +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Specific PEPS Interfaces that implements functionality of the Authentication - * Service. - * - * @since 1.0 - */ -package eu.stork.peps.auth.specific; - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AdditionalInformationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AdditionalInformationType.java deleted file mode 100644 index 87268f991..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AdditionalInformationType.java +++ /dev/null @@ -1,90 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Additional information - * - *

- * Java class for AdditionalInformationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AdditionalInformationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="SpecificInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="OtherSources" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AdditionalInformationType", propOrder = { "specificInformation", "otherSources" }) -public class AdditionalInformationType { - - @XmlElement(name = "SpecificInformation") - protected RichTextTagType specificInformation; - @XmlElement(name = "OtherSources") - protected RichTextTagType otherSources; - - /** - * Gets the value of the specificInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getSpecificInformation() { - return specificInformation; - } - - /** - * Sets the value of the specificInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setSpecificInformation(RichTextTagType value) { - this.specificInformation = value; - } - - /** - * Gets the value of the otherSources property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getOtherSources() { - return otherSources; - } - - /** - * Sets the value of the otherSources property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setOtherSources(RichTextTagType value) { - this.otherSources = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AddressType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AddressType.java deleted file mode 100644 index 044fd0a04..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AddressType.java +++ /dev/null @@ -1,254 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - * Address - * - *

- * Java class for AddressType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AddressType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Line" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" maxOccurs="unbounded"/>
- *         <element name="City" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="StateOrRegion" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="PostalCode" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Country">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="country" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}CountryType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AddressType", propOrder = { "line", "city", "stateOrRegion", "postalCode", "country" }) -public class AddressType { - - @XmlElement(name = "Line", required = true) - protected List line; - @XmlElement(name = "City", required = true) - protected String city; - @XmlElement(name = "StateOrRegion", required = true) - protected String stateOrRegion; - @XmlElement(name = "PostalCode", required = true) - protected String postalCode; - @XmlElement(name = "Country", required = true) - protected AddressType.Country country; - - /** - * Gets the value of the line property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the line property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getLine().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getLine() { - if (line == null) { - line = new ArrayList(); - } - return this.line; - } - - /** - * Gets the value of the city property. - * - * @return possible object is {@link String } - * - */ - public String getCity() { - return city; - } - - /** - * Sets the value of the city property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCity(String value) { - this.city = value; - } - - /** - * Gets the value of the stateOrRegion property. - * - * @return possible object is {@link String } - * - */ - public String getStateOrRegion() { - return stateOrRegion; - } - - /** - * Sets the value of the stateOrRegion property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStateOrRegion(String value) { - this.stateOrRegion = value; - } - - /** - * Gets the value of the postalCode property. - * - * @return possible object is {@link String } - * - */ - public String getPostalCode() { - return postalCode; - } - - /** - * Sets the value of the postalCode property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setPostalCode(String value) { - this.postalCode = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link AddressType.Country } - * - */ - public AddressType.Country getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link AddressType.Country } - * - */ - public void setCountry(AddressType.Country value) { - this.country = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="country" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}CountryType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Country { - - @XmlValue - protected String value; - @XmlAttribute(name = "country", required = true) - protected CountryType country; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link CountryType } - * - */ - public CountryType getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link CountryType } - * - */ - public void setCountry(CountryType value) { - this.country = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedFileDataType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedFileDataType.java deleted file mode 100644 index 17212282b..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedFileDataType.java +++ /dev/null @@ -1,112 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Data file - * - *

- * Java class for AttachedFileDataType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedFileDataType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Mime" type="{urn:crue:academic:xsd:language:diplomasupplement}MimeType"/>
- *         <element name="Data" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedFileDataType", propOrder = { "description", "mime", "data" }) -public class AttachedFileDataType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlElement(name = "Mime", required = true) - protected MimeType mime; - @XmlElement(name = "Data", required = true) - protected byte[] data; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the mime property. - * - * @return possible object is {@link MimeType } - * - */ - public MimeType getMime() { - return mime; - } - - /** - * Sets the value of the mime property. - * - * @param value - * allowed object is {@link MimeType } - * - */ - public void setMime(MimeType value) { - this.mime = value; - } - - /** - * Gets the value of the data property. - * - * @return possible object is byte[] - */ - public byte[] getData() { - return data; - } - - /** - * Sets the value of the data property. - * - * @param value - * allowed object is byte[] - */ - public void setData(byte[] value) { - this.data = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedFileURLType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedFileURLType.java deleted file mode 100644 index 5cae1a677..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedFileURLType.java +++ /dev/null @@ -1,114 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * URL reference to the file - * - *

- * Java class for AttachedFileURLType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedFileURLType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Mime" type="{urn:crue:academic:xsd:language:diplomasupplement}MimeType"/>
- *         <element name="URL" type="{urn:crue:academic:xsd:language:diplomasupplement}URLType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedFileURLType", propOrder = { "description", "mime", "url" }) -public class AttachedFileURLType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlElement(name = "Mime", required = true) - protected MimeType mime; - @XmlElement(name = "URL", required = true) - protected String url; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the mime property. - * - * @return possible object is {@link MimeType } - * - */ - public MimeType getMime() { - return mime; - } - - /** - * Sets the value of the mime property. - * - * @param value - * allowed object is {@link MimeType } - * - */ - public void setMime(MimeType value) { - this.mime = value; - } - - /** - * Gets the value of the url property. - * - * @return possible object is {@link String } - * - */ - public String getURL() { - return url; - } - - /** - * Sets the value of the url property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setURL(String value) { - this.url = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedImageDataType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedImageDataType.java deleted file mode 100644 index 24b2df121..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedImageDataType.java +++ /dev/null @@ -1,112 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Image data file - * - *

- * Java class for AttachedImageDataType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedImageDataType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Mime" type="{urn:crue:academic:xsd:language:diplomasupplement}ImageMimeType"/>
- *         <element name="Data" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedImageDataType", propOrder = { "description", "mime", "data" }) -public class AttachedImageDataType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlElement(name = "Mime", required = true) - protected ImageMimeType mime; - @XmlElement(name = "Data", required = true) - protected byte[] data; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the mime property. - * - * @return possible object is {@link ImageMimeType } - * - */ - public ImageMimeType getMime() { - return mime; - } - - /** - * Sets the value of the mime property. - * - * @param value - * allowed object is {@link ImageMimeType } - * - */ - public void setMime(ImageMimeType value) { - this.mime = value; - } - - /** - * Gets the value of the data property. - * - * @return possible object is byte[] - */ - public byte[] getData() { - return data; - } - - /** - * Sets the value of the data property. - * - * @param value - * allowed object is byte[] - */ - public void setData(byte[] value) { - this.data = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedImageURLType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedImageURLType.java deleted file mode 100644 index 2a13c9332..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedImageURLType.java +++ /dev/null @@ -1,114 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * URL reference to the image file - * - *

- * Java class for AttachedImageURLType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedImageURLType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Mime" type="{urn:crue:academic:xsd:language:diplomasupplement}ImageMimeType"/>
- *         <element name="URL" type="{urn:crue:academic:xsd:language:diplomasupplement}URLType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedImageURLType", propOrder = { "description", "mime", "url" }) -public class AttachedImageURLType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlElement(name = "Mime", required = true) - protected ImageMimeType mime; - @XmlElement(name = "URL", required = true) - protected String url; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the mime property. - * - * @return possible object is {@link ImageMimeType } - * - */ - public ImageMimeType getMime() { - return mime; - } - - /** - * Sets the value of the mime property. - * - * @param value - * allowed object is {@link ImageMimeType } - * - */ - public void setMime(ImageMimeType value) { - this.mime = value; - } - - /** - * Gets the value of the url property. - * - * @return possible object is {@link String } - * - */ - public String getURL() { - return url; - } - - /** - * Sets the value of the url property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setURL(String value) { - this.url = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedType.java deleted file mode 100644 index 9f9cca5d7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachedType.java +++ /dev/null @@ -1,170 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - * Attachment resource - * - *

- * Java class for AttachedType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice>
- *         <element name="FileData" type="{urn:crue:academic:xsd:language:diplomasupplement}AttachedFileDataType"/>
- *         <element name="FileURI" type="{urn:crue:academic:xsd:language:diplomasupplement}AttachedFileURLType"/>
- *         <element name="ImageData" type="{urn:crue:academic:xsd:language:diplomasupplement}AttachedImageDataType"/>
- *         <element name="ImageURI" type="{urn:crue:academic:xsd:language:diplomasupplement}AttachedImageURLType"/>
- *       </choice>
- *       <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedType", propOrder = { "fileData", "fileURI", "imageData", "imageURI" }) -public class AttachedType { - - @XmlElement(name = "FileData") - protected AttachedFileDataType fileData; - @XmlElement(name = "FileURI") - protected AttachedFileURLType fileURI; - @XmlElement(name = "ImageData") - protected AttachedImageDataType imageData; - @XmlElement(name = "ImageURI") - protected AttachedImageURLType imageURI; - @XmlAttribute(name = "attachedID", required = true) - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String attachedID; - - /** - * Gets the value of the fileData property. - * - * @return possible object is {@link AttachedFileDataType } - * - */ - public AttachedFileDataType getFileData() { - return fileData; - } - - /** - * Sets the value of the fileData property. - * - * @param value - * allowed object is {@link AttachedFileDataType } - * - */ - public void setFileData(AttachedFileDataType value) { - this.fileData = value; - } - - /** - * Gets the value of the fileURI property. - * - * @return possible object is {@link AttachedFileURLType } - * - */ - public AttachedFileURLType getFileURI() { - return fileURI; - } - - /** - * Sets the value of the fileURI property. - * - * @param value - * allowed object is {@link AttachedFileURLType } - * - */ - public void setFileURI(AttachedFileURLType value) { - this.fileURI = value; - } - - /** - * Gets the value of the imageData property. - * - * @return possible object is {@link AttachedImageDataType } - * - */ - public AttachedImageDataType getImageData() { - return imageData; - } - - /** - * Sets the value of the imageData property. - * - * @param value - * allowed object is {@link AttachedImageDataType } - * - */ - public void setImageData(AttachedImageDataType value) { - this.imageData = value; - } - - /** - * Gets the value of the imageURI property. - * - * @return possible object is {@link AttachedImageURLType } - * - */ - public AttachedImageURLType getImageURI() { - return imageURI; - } - - /** - * Sets the value of the imageURI property. - * - * @param value - * allowed object is {@link AttachedImageURLType } - * - */ - public void setImageURI(AttachedImageURLType value) { - this.imageURI = value; - } - - /** - * Gets the value of the attachedID property. - * - * @return possible object is {@link String } - * - */ - public String getAttachedID() { - return attachedID; - } - - /** - * Sets the value of the attachedID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAttachedID(String value) { - this.attachedID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachmentsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachmentsType.java deleted file mode 100644 index 751482eba..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/AttachmentsType.java +++ /dev/null @@ -1,74 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Attachments resources - * - *

- * Java class for AttachmentsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachmentsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Attached" type="{urn:crue:academic:xsd:language:diplomasupplement}AttachedType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachmentsType", propOrder = { "attached" }) -public class AttachmentsType { - - @XmlElement(name = "Attached", required = true) - protected List attached; - - /** - * Gets the value of the attached property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the attached property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getAttached().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link AttachedType } - * - * - */ - public List getAttached() { - if (attached == null) { - attached = new ArrayList(); - } - return this.attached; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CertificationOfTheSupplementType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CertificationOfTheSupplementType.java deleted file mode 100644 index e2d0d51f7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CertificationOfTheSupplementType.java +++ /dev/null @@ -1,115 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - * Certification of the Supplement - * - *

- * Java class for CertificationOfTheSupplementType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CertificationOfTheSupplementType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CertificationDate" type="{urn:crue:academic:xsd:language:diplomasupplement}DateType"/>
- *         <element name="OfficialsCertifying" type="{urn:crue:academic:xsd:language:diplomasupplement}OfficialsCertifyingType"/>
- *         <element name="OfficialStamp" type="{urn:crue:academic:xsd:language:diplomasupplement}OfficialStampType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CertificationOfTheSupplementType", propOrder = { "certificationDate", "officialsCertifying", "officialStamp" }) -public class CertificationOfTheSupplementType { - - @XmlElement(name = "CertificationDate", required = true) - protected XMLGregorianCalendar certificationDate; - @XmlElement(name = "OfficialsCertifying", required = true) - protected OfficialsCertifyingType officialsCertifying; - @XmlElement(name = "OfficialStamp") - protected OfficialStampType officialStamp; - - /** - * Gets the value of the certificationDate property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getCertificationDate() { - return certificationDate; - } - - /** - * Sets the value of the certificationDate property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setCertificationDate(XMLGregorianCalendar value) { - this.certificationDate = value; - } - - /** - * Gets the value of the officialsCertifying property. - * - * @return possible object is {@link OfficialsCertifyingType } - * - */ - public OfficialsCertifyingType getOfficialsCertifying() { - return officialsCertifying; - } - - /** - * Sets the value of the officialsCertifying property. - * - * @param value - * allowed object is {@link OfficialsCertifyingType } - * - */ - public void setOfficialsCertifying(OfficialsCertifyingType value) { - this.officialsCertifying = value; - } - - /** - * Gets the value of the officialStamp property. - * - * @return possible object is {@link OfficialStampType } - * - */ - public OfficialStampType getOfficialStamp() { - return officialStamp; - } - - /** - * Sets the value of the officialStamp property. - * - * @param value - * allowed object is {@link OfficialStampType } - * - */ - public void setOfficialStamp(OfficialStampType value) { - this.officialStamp = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ContactInformationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ContactInformationType.java deleted file mode 100644 index 63df83402..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ContactInformationType.java +++ /dev/null @@ -1,158 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Contact information - * - *

- * Java class for ContactInformationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ContactInformationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Address" type="{urn:crue:academic:xsd:language:diplomasupplement}AddressType"/>
- *         <element name="PhoneNumber" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="Email" type="{urn:crue:academic:xsd:language:diplomasupplement}EmailAddressType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="WebSite" type="{urn:crue:academic:xsd:language:diplomasupplement}URLType" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContactInformationType", propOrder = { "address", "phoneNumber", "email", "webSite" }) -public class ContactInformationType { - - @XmlElement(name = "Address", required = true) - protected AddressType address; - @XmlElement(name = "PhoneNumber") - protected List phoneNumber; - @XmlElement(name = "Email") - protected List email; - @XmlElement(name = "WebSite") - protected List webSite; - - /** - * Gets the value of the address property. - * - * @return possible object is {@link AddressType } - * - */ - public AddressType getAddress() { - return address; - } - - /** - * Sets the value of the address property. - * - * @param value - * allowed object is {@link AddressType } - * - */ - public void setAddress(AddressType value) { - this.address = value; - } - - /** - * Gets the value of the phoneNumber property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the phoneNumber property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getPhoneNumber().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getPhoneNumber() { - if (phoneNumber == null) { - phoneNumber = new ArrayList(); - } - return this.phoneNumber; - } - - /** - * Gets the value of the email property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the email property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getEmail().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getEmail() { - if (email == null) { - email = new ArrayList(); - } - return this.email; - } - - /** - * Gets the value of the webSite property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the webSite property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getWebSite().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getWebSite() { - if (webSite == null) { - webSite = new ArrayList(); - } - return this.webSite; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CountryType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CountryType.java deleted file mode 100644 index 5988f5ef7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CountryType.java +++ /dev/null @@ -1,1420 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CountryType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="CountryType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="AD"/>
- *     <enumeration value="AE"/>
- *     <enumeration value="AF"/>
- *     <enumeration value="AG"/>
- *     <enumeration value="AL"/>
- *     <enumeration value="AM"/>
- *     <enumeration value="AO"/>
- *     <enumeration value="AR"/>
- *     <enumeration value="AT"/>
- *     <enumeration value="AU"/>
- *     <enumeration value="AZ"/>
- *     <enumeration value="BA"/>
- *     <enumeration value="BB"/>
- *     <enumeration value="BD"/>
- *     <enumeration value="BE"/>
- *     <enumeration value="BF"/>
- *     <enumeration value="BG"/>
- *     <enumeration value="BH"/>
- *     <enumeration value="BI"/>
- *     <enumeration value="BJ"/>
- *     <enumeration value="BN"/>
- *     <enumeration value="BO"/>
- *     <enumeration value="BR"/>
- *     <enumeration value="BS"/>
- *     <enumeration value="BT"/>
- *     <enumeration value="BW"/>
- *     <enumeration value="BY"/>
- *     <enumeration value="BZ"/>
- *     <enumeration value="CA"/>
- *     <enumeration value="CD"/>
- *     <enumeration value="CF"/>
- *     <enumeration value="CG"/>
- *     <enumeration value="CH"/>
- *     <enumeration value="CI"/>
- *     <enumeration value="CL"/>
- *     <enumeration value="CM"/>
- *     <enumeration value="CN"/>
- *     <enumeration value="CO"/>
- *     <enumeration value="CR"/>
- *     <enumeration value="CU"/>
- *     <enumeration value="CV"/>
- *     <enumeration value="CY"/>
- *     <enumeration value="CZ"/>
- *     <enumeration value="DE"/>
- *     <enumeration value="DJ"/>
- *     <enumeration value="DK"/>
- *     <enumeration value="DM"/>
- *     <enumeration value="DO"/>
- *     <enumeration value="DZ"/>
- *     <enumeration value="EC"/>
- *     <enumeration value="EE"/>
- *     <enumeration value="EG"/>
- *     <enumeration value="ER"/>
- *     <enumeration value="ES"/>
- *     <enumeration value="ET"/>
- *     <enumeration value="FI"/>
- *     <enumeration value="FJ"/>
- *     <enumeration value="FM"/>
- *     <enumeration value="FR"/>
- *     <enumeration value="GA"/>
- *     <enumeration value="GB"/>
- *     <enumeration value="GD"/>
- *     <enumeration value="GE"/>
- *     <enumeration value="GH"/>
- *     <enumeration value="GL"/>
- *     <enumeration value="GM"/>
- *     <enumeration value="GN"/>
- *     <enumeration value="GQ"/>
- *     <enumeration value="GR"/>
- *     <enumeration value="GT"/>
- *     <enumeration value="GW"/>
- *     <enumeration value="GY"/>
- *     <enumeration value="HN"/>
- *     <enumeration value="HR"/>
- *     <enumeration value="HT"/>
- *     <enumeration value="HU"/>
- *     <enumeration value="ID"/>
- *     <enumeration value="IE"/>
- *     <enumeration value="IL"/>
- *     <enumeration value="IN"/>
- *     <enumeration value="IQ"/>
- *     <enumeration value="IR"/>
- *     <enumeration value="IS"/>
- *     <enumeration value="IT"/>
- *     <enumeration value="JM"/>
- *     <enumeration value="JO"/>
- *     <enumeration value="JP"/>
- *     <enumeration value="KE"/>
- *     <enumeration value="KG"/>
- *     <enumeration value="KH"/>
- *     <enumeration value="KI"/>
- *     <enumeration value="KM"/>
- *     <enumeration value="KN"/>
- *     <enumeration value="KP"/>
- *     <enumeration value="KR"/>
- *     <enumeration value="KW"/>
- *     <enumeration value="KZ"/>
- *     <enumeration value="LA"/>
- *     <enumeration value="LB"/>
- *     <enumeration value="LC"/>
- *     <enumeration value="LI"/>
- *     <enumeration value="LK"/>
- *     <enumeration value="LR"/>
- *     <enumeration value="LS"/>
- *     <enumeration value="LT"/>
- *     <enumeration value="LU"/>
- *     <enumeration value="LV"/>
- *     <enumeration value="LY"/>
- *     <enumeration value="MA"/>
- *     <enumeration value="MC"/>
- *     <enumeration value="MD"/>
- *     <enumeration value="ME"/>
- *     <enumeration value="MG"/>
- *     <enumeration value="MH"/>
- *     <enumeration value="MK"/>
- *     <enumeration value="ML"/>
- *     <enumeration value="MM"/>
- *     <enumeration value="MN"/>
- *     <enumeration value="MR"/>
- *     <enumeration value="MT"/>
- *     <enumeration value="MU"/>
- *     <enumeration value="MV"/>
- *     <enumeration value="MW"/>
- *     <enumeration value="MX"/>
- *     <enumeration value="MY"/>
- *     <enumeration value="MZ"/>
- *     <enumeration value="NA"/>
- *     <enumeration value="NE"/>
- *     <enumeration value="NG"/>
- *     <enumeration value="NI"/>
- *     <enumeration value="NL"/>
- *     <enumeration value="NO"/>
- *     <enumeration value="NP"/>
- *     <enumeration value="NR"/>
- *     <enumeration value="NU"/>
- *     <enumeration value="NZ"/>
- *     <enumeration value="OM"/>
- *     <enumeration value="PA"/>
- *     <enumeration value="PE"/>
- *     <enumeration value="PG"/>
- *     <enumeration value="PH"/>
- *     <enumeration value="PK"/>
- *     <enumeration value="PL"/>
- *     <enumeration value="PR"/>
- *     <enumeration value="PS"/>
- *     <enumeration value="PT"/>
- *     <enumeration value="PW"/>
- *     <enumeration value="PY"/>
- *     <enumeration value="QA"/>
- *     <enumeration value="RO"/>
- *     <enumeration value="RS"/>
- *     <enumeration value="RU"/>
- *     <enumeration value="RW"/>
- *     <enumeration value="SA"/>
- *     <enumeration value="SB"/>
- *     <enumeration value="SC"/>
- *     <enumeration value="SD"/>
- *     <enumeration value="SE"/>
- *     <enumeration value="SG"/>
- *     <enumeration value="SI"/>
- *     <enumeration value="SK"/>
- *     <enumeration value="SL"/>
- *     <enumeration value="SM"/>
- *     <enumeration value="SN"/>
- *     <enumeration value="SO"/>
- *     <enumeration value="SR"/>
- *     <enumeration value="ST"/>
- *     <enumeration value="SV"/>
- *     <enumeration value="SY"/>
- *     <enumeration value="SZ"/>
- *     <enumeration value="TD"/>
- *     <enumeration value="TG"/>
- *     <enumeration value="TH"/>
- *     <enumeration value="TJ"/>
- *     <enumeration value="TL"/>
- *     <enumeration value="TM"/>
- *     <enumeration value="TN"/>
- *     <enumeration value="TO"/>
- *     <enumeration value="TR"/>
- *     <enumeration value="TT"/>
- *     <enumeration value="TV"/>
- *     <enumeration value="TZ"/>
- *     <enumeration value="UA"/>
- *     <enumeration value="UG"/>
- *     <enumeration value="US"/>
- *     <enumeration value="UY"/>
- *     <enumeration value="UZ"/>
- *     <enumeration value="VA"/>
- *     <enumeration value="VC"/>
- *     <enumeration value="VE"/>
- *     <enumeration value="VN"/>
- *     <enumeration value="VU"/>
- *     <enumeration value="WS"/>
- *     <enumeration value="YE"/>
- *     <enumeration value="ZA"/>
- *     <enumeration value="ZM"/>
- *     <enumeration value="ZW"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "CountryType") -@XmlEnum -public enum CountryType { - - /** - * Andorra - * - */ - AD, - - /** - * United Arab Emirates - * - */ - AE, - - /** - * Afghanistan - * - */ - AF, - - /** - * Antigua and Barbuda - * - */ - AG, - - /** - * Albania - * - */ - AL, - - /** - * Armenia - * - */ - AM, - - /** - * Angola - * - */ - AO, - - /** - * Argentina - * - */ - AR, - - /** - * Austria - * - */ - AT, - - /** - * Australia - * - */ - AU, - - /** - * Azerbaijan - * - */ - AZ, - - /** - * Bosnia and Herzegovina - * - */ - BA, - - /** - * Barbados - * - */ - BB, - - /** - * Bangladesh - * - */ - BD, - - /** - * Belgium - * - */ - BE, - - /** - * Burkina Faso - * - */ - BF, - - /** - * Bulgaria - * - */ - BG, - - /** - * Bahrain - * - */ - BH, - - /** - * Burundi - * - */ - BI, - - /** - * Benin - * - */ - BJ, - - /** - * Brunei Darussalam - * - */ - BN, - - /** - * Bolivia - * - */ - BO, - - /** - * Brazil - * - */ - BR, - - /** - * Bahamas - * - */ - BS, - - /** - * Bhutan - * - */ - BT, - - /** - * Botswana - * - */ - BW, - - /** - * Belarus - * - */ - BY, - - /** - * Belize - * - */ - BZ, - - /** - * Canada - * - */ - CA, - - /** - * Congo, Democratic Republic of the - * - */ - CD, - - /** - * Central African Republic - * - */ - CF, - - /** - * Congo, Republic of the - * - */ - CG, - - /** - * Switzerland - * - */ - CH, - - /** - * Cote d/Ivoire - * - */ - CI, - - /** - * Chile - * - */ - CL, - - /** - * Cameroon - * - */ - CM, - - /** - * China - * - */ - CN, - - /** - * Colombia - * - */ - CO, - - /** - * Costa Rica - * - */ - CR, - - /** - * Cuba - * - */ - CU, - - /** - * Cape Verde - * - */ - CV, - - /** - * Cyprus - * - */ - CY, - - /** - * Czech Republic - * - */ - CZ, - - /** - * Germany - * - */ - DE, - - /** - * Djibouti - * - */ - DJ, - - /** - * Denmark - * - */ - DK, - - /** - * Dominica - * - */ - DM, - - /** - * Dominican Republic - * - */ - DO, - - /** - * Algeria - * - */ - DZ, - - /** - * Ecuador - * - */ - EC, - - /** - * Estonia - * - */ - EE, - - /** - * Egypt - * - */ - EG, - - /** - * Eritrea - * - */ - ER, - - /** - * Spain - * - */ - ES, - - /** - * Ethiopia - * - */ - ET, - - /** - * Finland - * - */ - FI, - - /** - * Fiji - * - */ - FJ, - - /** - * Federated States of Micronesia - * - */ - FM, - - /** - * France - * - */ - FR, - - /** - * Gabon - * - */ - GA, - - /** - * United Kingdom - * - */ - GB, - - /** - * Grenada - * - */ - GD, - - /** - * Georgia - * - */ - GE, - - /** - * Ghana - * - */ - GH, - - /** - * Greenland - * - */ - GL, - - /** - * Gambia - * - */ - GM, - - /** - * Guinea - * - */ - GN, - - /** - * Equatorial Guinea - * - */ - GQ, - - /** - * Greece - * - */ - GR, - - /** - * Guatemala - * - */ - GT, - - /** - * Guinea-Bissau - * - */ - GW, - - /** - * Guyana - * - */ - GY, - - /** - * Honduras - * - */ - HN, - - /** - * Croatia - * - */ - HR, - - /** - * Haiti - * - */ - HT, - - /** - * Hungary - * - */ - HU, - - /** - * Indonesia - * - */ - ID, - - /** - * Ireland - * - */ - IE, - - /** - * Israel - * - */ - IL, - - /** - * India - * - */ - IN, - - /** - * Iraq - * - */ - IQ, - - /** - * Iran - * - */ - IR, - - /** - * Iceland - * - */ - IS, - - /** - * Italy - * - */ - IT, - - /** - * Jamaica - * - */ - JM, - - /** - * Jordan - * - */ - JO, - - /** - * Japan - * - */ - JP, - - /** - * Kenya - * - */ - KE, - - /** - * Kyrgyzstan - * - */ - KG, - - /** - * Cambodia - * - */ - KH, - - /** - * Kiribati - * - */ - KI, - - /** - * Comoros - * - */ - KM, - - /** - * Saint Kitts and Nevis - * - */ - KN, - - /** - * Korea, Democratic People/s Republic - * - */ - KP, - - /** - * Korea, Republic of - * - */ - KR, - - /** - * Kuwait - * - */ - KW, - - /** - * Kazakstan - * - */ - KZ, - - /** - * Lao People/s Democratic Republic - * - */ - LA, - - /** - * Lebanon - * - */ - LB, - - /** - * Saint Lucia - * - */ - LC, - - /** - * Liechtenstein - * - */ - LI, - - /** - * Sri Lanka - * - */ - LK, - - /** - * Liberia - * - */ - LR, - - /** - * Lesotho - * - */ - LS, - - /** - * Lithuania - * - */ - LT, - - /** - * Luxembourg - * - */ - LU, - - /** - * Latvia - * - */ - LV, - - /** - * Libyan Arab Jamahiriya - * - */ - LY, - - /** - * Morocco - * - */ - MA, - - /** - * Monaco - * - */ - MC, - - /** - * Moldova, Republic of - * - */ - MD, - - /** - * Montenegro - * - */ - ME, - - /** - * Madagascar - * - */ - MG, - - /** - * Marshall Islands - * - */ - MH, - - /** - * Macedonia, the former Yugoslav Republic of - * - */ - MK, - - /** - * Mali - * - */ - ML, - - /** - * Myanmar - * - */ - MM, - - /** - * Mongolia - * - */ - MN, - - /** - * Mauritania - * - */ - MR, - - /** - * Malta - * - */ - MT, - - /** - * Mauritius - * - */ - MU, - - /** - * Maldives - * - */ - MV, - - /** - * Malawi - * - */ - MW, - - /** - * Mexico - * - */ - MX, - - /** - * Malaysia - * - */ - MY, - - /** - * Mozambique - * - */ - MZ, - - /** - * Namibia - * - */ - NA, - - /** - * Niger - * - */ - NE, - - /** - * Nigeria - * - */ - NG, - - /** - * Nicaragua - * - */ - NI, - - /** - * Netherlands - * - */ - NL, - - /** - * Norway - * - */ - NO, - - /** - * Nepal - * - */ - NP, - - /** - * Nauru - * - */ - NR, - - /** - * Niue - * - */ - NU, - - /** - * New Zealand - * - */ - NZ, - - /** - * Oman - * - */ - OM, - - /** - * Panama - * - */ - PA, - - /** - * Peru - * - */ - PE, - - /** - * Papua New Guinea - * - */ - PG, - - /** - * Philippines - * - */ - PH, - - /** - * Pakistan - * - */ - PK, - - /** - * Poland - * - */ - PL, - - /** - * Puerto Rico - * - */ - PR, - - /** - * Palestinian Territory, Occupied - * - */ - PS, - - /** - * Portugal - * - */ - PT, - - /** - * Palau - * - */ - PW, - - /** - * Paraguay - * - */ - PY, - - /** - * Qatar - * - */ - QA, - - /** - * Romania - * - */ - RO, - - /** - * Serbia - * - */ - RS, - - /** - * Russian Federation - * - */ - RU, - - /** - * Rwanda - * - */ - RW, - - /** - * Saudi Arabia - * - */ - SA, - - /** - * Solomon Islands - * - */ - SB, - - /** - * Seychelles - * - */ - SC, - - /** - * Sudan - * - */ - SD, - - /** - * Sweden - * - */ - SE, - - /** - * Singapore - * - */ - SG, - - /** - * Slovenia - * - */ - SI, - - /** - * Slovakia - * - */ - SK, - - /** - * Sierra Leone - * - */ - SL, - - /** - * San Marino - * - */ - SM, - - /** - * Senegal - * - */ - SN, - - /** - * Somalia - * - */ - SO, - - /** - * Suriname - * - */ - SR, - - /** - * Sao Tome and Principe - * - */ - ST, - - /** - * El Salvador - * - */ - SV, - - /** - * Syrian Arab Republic - * - */ - SY, - - /** - * Swaziland - * - */ - SZ, - - /** - * Chad - * - */ - TD, - - /** - * Togo - * - */ - TG, - - /** - * Thailand - * - */ - TH, - - /** - * Tajikistan - * - */ - TJ, - - /** - * Timor-Leste - * - */ - TL, - - /** - * Turkmenistan - * - */ - TM, - - /** - * Tunisia - * - */ - TN, - - /** - * Tonga - * - */ - TO, - - /** - * Turkey - * - */ - TR, - - /** - * Trindidad and Tobago - * - */ - TT, - - /** - * Tuvalu - * - */ - TV, - - /** - * Tanzania, United republic of - * - */ - TZ, - - /** - * Ukraina - * - */ - UA, - - /** - * Uganda - * - */ - UG, - - /** - * United States - * - */ - US, - - /** - * Uruguay - * - */ - UY, - - /** - * Uzbekistan - * - */ - UZ, - - /** - * Holy See (Vatican City State) - * - */ - VA, - - /** - * Saint Vincent and the Granadines - * - */ - VC, - - /** - * Venezuela - * - */ - VE, - - /** - * Viet Nam - * - */ - VN, - - /** - * Vanuatu - * - */ - VU, - - /** - * Samoa - * - */ - WS, - - /** - * Yemen - * - */ - YE, - - /** - * South Africa - * - */ - ZA, - - /** - * Zambia - * - */ - ZM, - - /** - * Zimbabwe - * - */ - ZW; - - public String value() { - return name(); - } - - public static CountryType fromValue(String v) { - return valueOf(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseStructureDiagramType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseStructureDiagramType.java deleted file mode 100644 index 1438d6f1e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseStructureDiagramType.java +++ /dev/null @@ -1,90 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Course structure diagram - * - *

- * Java class for CourseStructureDiagramType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseStructureDiagramType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CoursesGroups" type="{urn:crue:academic:xsd:language:diplomasupplement}CoursesGroupsType"/>
- *         <element name="CoursesUnits" type="{urn:crue:academic:xsd:language:diplomasupplement}CoursesUnitsType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseStructureDiagramType", propOrder = { "coursesGroups", "coursesUnits" }) -public class CourseStructureDiagramType { - - @XmlElement(name = "CoursesGroups", required = true) - protected CoursesGroupsType coursesGroups; - @XmlElement(name = "CoursesUnits") - protected CoursesUnitsType coursesUnits; - - /** - * Gets the value of the coursesGroups property. - * - * @return possible object is {@link CoursesGroupsType } - * - */ - public CoursesGroupsType getCoursesGroups() { - return coursesGroups; - } - - /** - * Sets the value of the coursesGroups property. - * - * @param value - * allowed object is {@link CoursesGroupsType } - * - */ - public void setCoursesGroups(CoursesGroupsType value) { - this.coursesGroups = value; - } - - /** - * Gets the value of the coursesUnits property. - * - * @return possible object is {@link CoursesUnitsType } - * - */ - public CoursesUnitsType getCoursesUnits() { - return coursesUnits; - } - - /** - * Sets the value of the coursesUnits property. - * - * @param value - * allowed object is {@link CoursesUnitsType } - * - */ - public void setCoursesUnits(CoursesUnitsType value) { - this.coursesUnits = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitLanguageOfInstructionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitLanguageOfInstructionType.java deleted file mode 100644 index 69e63c4d3..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitLanguageOfInstructionType.java +++ /dev/null @@ -1,90 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - * Language of instruction - * - *

- * Java class for CourseUnitLanguageOfInstructionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitLanguageOfInstructionType">
- *   <simpleContent>
- *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *       <attribute name="language" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}LanguageType" />
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitLanguageOfInstructionType", propOrder = { "value" }) -public class CourseUnitLanguageOfInstructionType { - - @XmlValue - protected String value; - @XmlAttribute(name = "language", required = true) - protected LanguageType language; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the language property. - * - * @return possible object is {@link LanguageType } - * - */ - public LanguageType getLanguage() { - return language; - } - - /** - * Sets the value of the language property. - * - * @param value - * allowed object is {@link LanguageType } - * - */ - public void setLanguage(LanguageType value) { - this.language = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitLanguagesOfInstructionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitLanguagesOfInstructionType.java deleted file mode 100644 index 94db5baa0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitLanguagesOfInstructionType.java +++ /dev/null @@ -1,74 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Language of instruction - * - *

- * Java class for CourseUnitLanguagesOfInstructionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitLanguagesOfInstructionType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Language" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseUnitLanguageOfInstructionType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitLanguagesOfInstructionType", propOrder = { "language" }) -public class CourseUnitLanguagesOfInstructionType { - - @XmlElement(name = "Language", required = true) - protected List language; - - /** - * Gets the value of the language property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the language property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getLanguage().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CourseUnitLanguageOfInstructionType } - * - * - */ - public List getLanguage() { - if (language == null) { - language = new ArrayList(); - } - return this.language; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitStudentPerformanceType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitStudentPerformanceType.java deleted file mode 100644 index 1a5562a63..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitStudentPerformanceType.java +++ /dev/null @@ -1,90 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Student performance - * - *

- * Java class for CourseUnitStudentPerformanceType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitStudentPerformanceType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="LocalGrade" type="{urn:crue:academic:xsd:language:diplomasupplement}LocalGradeType"/>
- *         <element name="ECTSGrade" type="{urn:crue:academic:xsd:language:diplomasupplement}ECTSGradingScaleType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitStudentPerformanceType", propOrder = { "localGrade", "ectsGrade" }) -public class CourseUnitStudentPerformanceType { - - @XmlElement(name = "LocalGrade", required = true) - protected LocalGradeType localGrade; - @XmlElement(name = "ECTSGrade") - protected ECTSGradingScaleType ectsGrade; - - /** - * Gets the value of the localGrade property. - * - * @return possible object is {@link LocalGradeType } - * - */ - public LocalGradeType getLocalGrade() { - return localGrade; - } - - /** - * Sets the value of the localGrade property. - * - * @param value - * allowed object is {@link LocalGradeType } - * - */ - public void setLocalGrade(LocalGradeType value) { - this.localGrade = value; - } - - /** - * Gets the value of the ectsGrade property. - * - * @return possible object is {@link ECTSGradingScaleType } - * - */ - public ECTSGradingScaleType getECTSGrade() { - return ectsGrade; - } - - /** - * Sets the value of the ectsGrade property. - * - * @param value - * allowed object is {@link ECTSGradingScaleType } - * - */ - public void setECTSGrade(ECTSGradingScaleType value) { - this.ectsGrade = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitType.java deleted file mode 100644 index 8c0d96fe2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitType.java +++ /dev/null @@ -1,1003 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - * Course unit - * - *

- * Java class for CourseUnitType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Code" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="ScientificArea" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" minOccurs="0"/>
- *         <element name="Title" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Theme" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" minOccurs="0"/>
- *         <element name="Type">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="type" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseUnitTypeType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="YearOfStudy" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="year" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="Level" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="eheaFramework" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}EHEAFrameworkType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="ECTSCredits" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" minOccurs="0"/>
- *         <element name="LocalCredits" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" minOccurs="0"/>
- *         <element name="Hours" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" minOccurs="0"/>
- *         <element name="LanguagesOfInstruction" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseUnitLanguagesOfInstructionType" minOccurs="0"/>
- *         <element name="ModeOfDelivery" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="modeOfDelivery" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}ModeOfDeliveryType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="WorkPlacements" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseUnitWorkPlacementsType" minOccurs="0"/>
- *         <element name="StudentPerformance" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseUnitStudentPerformanceType" minOccurs="0"/>
- *         <element name="NameOfLecturers" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="LearningOutcomes" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="PrerequisitesAndCorequisites" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="RecomendedOptionalProgrammeComponents" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="CourseContents" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="RecomendedOrRequiredReading" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="PlanedLearningActivitiesAndTeachingMethod" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="AssesmentMethodsAndCriteria" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="Observations" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="groupID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="institutionAdministeringStudiesID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="isRequiredByTheProgramme" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitType", propOrder = { "code", "scientificArea", "title", "theme", "type", "yearOfStudy", "level", "ectsCredits", "localCredits", "hours", "languagesOfInstruction", - "modeOfDelivery", "workPlacements", "studentPerformance", "nameOfLecturers", "learningOutcomes", "prerequisitesAndCorequisites", "recomendedOptionalProgrammeComponents", "courseContents", - "recomendedOrRequiredReading", "planedLearningActivitiesAndTeachingMethod", "assesmentMethodsAndCriteria", "observations" }) -public class CourseUnitType { - - @XmlElement(name = "Code", required = true) - protected String code; - @XmlElement(name = "ScientificArea") - protected String scientificArea; - @XmlElement(name = "Title", required = true) - protected String title; - @XmlElement(name = "Theme") - protected String theme; - @XmlElement(name = "Type", required = true) - protected CourseUnitType.Type type; - @XmlElement(name = "YearOfStudy") - protected CourseUnitType.YearOfStudy yearOfStudy; - @XmlElement(name = "Level") - protected CourseUnitType.Level level; - @XmlElement(name = "ECTSCredits") - protected BigDecimal ectsCredits; - @XmlElement(name = "LocalCredits") - protected BigDecimal localCredits; - @XmlElement(name = "Hours") - protected BigDecimal hours; - @XmlElement(name = "LanguagesOfInstruction") - protected CourseUnitLanguagesOfInstructionType languagesOfInstruction; - @XmlElement(name = "ModeOfDelivery") - protected CourseUnitType.ModeOfDelivery modeOfDelivery; - @XmlElement(name = "WorkPlacements") - protected CourseUnitWorkPlacementsType workPlacements; - @XmlElement(name = "StudentPerformance") - protected CourseUnitStudentPerformanceType studentPerformance; - @XmlElement(name = "NameOfLecturers") - protected RichTextTagType nameOfLecturers; - @XmlElement(name = "LearningOutcomes") - protected RichTextTagType learningOutcomes; - @XmlElement(name = "PrerequisitesAndCorequisites") - protected RichTextTagType prerequisitesAndCorequisites; - @XmlElement(name = "RecomendedOptionalProgrammeComponents") - protected RichTextTagType recomendedOptionalProgrammeComponents; - @XmlElement(name = "CourseContents") - protected RichTextTagType courseContents; - @XmlElement(name = "RecomendedOrRequiredReading") - protected RichTextTagType recomendedOrRequiredReading; - @XmlElement(name = "PlanedLearningActivitiesAndTeachingMethod") - protected RichTextTagType planedLearningActivitiesAndTeachingMethod; - @XmlElement(name = "AssesmentMethodsAndCriteria") - protected RichTextTagType assesmentMethodsAndCriteria; - @XmlElement(name = "Observations") - protected RichTextTagType observations; - @XmlAttribute(name = "groupID", required = true) - protected String groupID; - @XmlAttribute(name = "institutionAdministeringStudiesID", required = true) - protected String institutionAdministeringStudiesID; - @XmlAttribute(name = "isRequiredByTheProgramme") - protected Boolean isRequiredByTheProgramme; - - /** - * Gets the value of the code property. - * - * @return possible object is {@link String } - * - */ - public String getCode() { - return code; - } - - /** - * Sets the value of the code property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCode(String value) { - this.code = value; - } - - /** - * Gets the value of the scientificArea property. - * - * @return possible object is {@link String } - * - */ - public String getScientificArea() { - return scientificArea; - } - - /** - * Sets the value of the scientificArea property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setScientificArea(String value) { - this.scientificArea = value; - } - - /** - * Gets the value of the title property. - * - * @return possible object is {@link String } - * - */ - public String getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } - - /** - * Gets the value of the theme property. - * - * @return possible object is {@link String } - * - */ - public String getTheme() { - return theme; - } - - /** - * Sets the value of the theme property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTheme(String value) { - this.theme = value; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link CourseUnitType.Type } - * - */ - public CourseUnitType.Type getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link CourseUnitType.Type } - * - */ - public void setType(CourseUnitType.Type value) { - this.type = value; - } - - /** - * Gets the value of the yearOfStudy property. - * - * @return possible object is {@link CourseUnitType.YearOfStudy } - * - */ - public CourseUnitType.YearOfStudy getYearOfStudy() { - return yearOfStudy; - } - - /** - * Sets the value of the yearOfStudy property. - * - * @param value - * allowed object is {@link CourseUnitType.YearOfStudy } - * - */ - public void setYearOfStudy(CourseUnitType.YearOfStudy value) { - this.yearOfStudy = value; - } - - /** - * Gets the value of the level property. - * - * @return possible object is {@link CourseUnitType.Level } - * - */ - public CourseUnitType.Level getLevel() { - return level; - } - - /** - * Sets the value of the level property. - * - * @param value - * allowed object is {@link CourseUnitType.Level } - * - */ - public void setLevel(CourseUnitType.Level value) { - this.level = value; - } - - /** - * Gets the value of the ectsCredits property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getECTSCredits() { - return ectsCredits; - } - - /** - * Sets the value of the ectsCredits property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setECTSCredits(BigDecimal value) { - this.ectsCredits = value; - } - - /** - * Gets the value of the localCredits property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getLocalCredits() { - return localCredits; - } - - /** - * Sets the value of the localCredits property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setLocalCredits(BigDecimal value) { - this.localCredits = value; - } - - /** - * Gets the value of the hours property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getHours() { - return hours; - } - - /** - * Sets the value of the hours property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setHours(BigDecimal value) { - this.hours = value; - } - - /** - * Gets the value of the languagesOfInstruction property. - * - * @return possible object is {@link CourseUnitLanguagesOfInstructionType } - * - */ - public CourseUnitLanguagesOfInstructionType getLanguagesOfInstruction() { - return languagesOfInstruction; - } - - /** - * Sets the value of the languagesOfInstruction property. - * - * @param value - * allowed object is {@link CourseUnitLanguagesOfInstructionType } - * - */ - public void setLanguagesOfInstruction(CourseUnitLanguagesOfInstructionType value) { - this.languagesOfInstruction = value; - } - - /** - * Gets the value of the modeOfDelivery property. - * - * @return possible object is {@link CourseUnitType.ModeOfDelivery } - * - */ - public CourseUnitType.ModeOfDelivery getModeOfDelivery() { - return modeOfDelivery; - } - - /** - * Sets the value of the modeOfDelivery property. - * - * @param value - * allowed object is {@link CourseUnitType.ModeOfDelivery } - * - */ - public void setModeOfDelivery(CourseUnitType.ModeOfDelivery value) { - this.modeOfDelivery = value; - } - - /** - * Gets the value of the workPlacements property. - * - * @return possible object is {@link CourseUnitWorkPlacementsType } - * - */ - public CourseUnitWorkPlacementsType getWorkPlacements() { - return workPlacements; - } - - /** - * Sets the value of the workPlacements property. - * - * @param value - * allowed object is {@link CourseUnitWorkPlacementsType } - * - */ - public void setWorkPlacements(CourseUnitWorkPlacementsType value) { - this.workPlacements = value; - } - - /** - * Gets the value of the studentPerformance property. - * - * @return possible object is {@link CourseUnitStudentPerformanceType } - * - */ - public CourseUnitStudentPerformanceType getStudentPerformance() { - return studentPerformance; - } - - /** - * Sets the value of the studentPerformance property. - * - * @param value - * allowed object is {@link CourseUnitStudentPerformanceType } - * - */ - public void setStudentPerformance(CourseUnitStudentPerformanceType value) { - this.studentPerformance = value; - } - - /** - * Gets the value of the nameOfLecturers property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getNameOfLecturers() { - return nameOfLecturers; - } - - /** - * Sets the value of the nameOfLecturers property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setNameOfLecturers(RichTextTagType value) { - this.nameOfLecturers = value; - } - - /** - * Gets the value of the learningOutcomes property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getLearningOutcomes() { - return learningOutcomes; - } - - /** - * Sets the value of the learningOutcomes property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setLearningOutcomes(RichTextTagType value) { - this.learningOutcomes = value; - } - - /** - * Gets the value of the prerequisitesAndCorequisites property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getPrerequisitesAndCorequisites() { - return prerequisitesAndCorequisites; - } - - /** - * Sets the value of the prerequisitesAndCorequisites property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setPrerequisitesAndCorequisites(RichTextTagType value) { - this.prerequisitesAndCorequisites = value; - } - - /** - * Gets the value of the recomendedOptionalProgrammeComponents property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getRecomendedOptionalProgrammeComponents() { - return recomendedOptionalProgrammeComponents; - } - - /** - * Sets the value of the recomendedOptionalProgrammeComponents property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setRecomendedOptionalProgrammeComponents(RichTextTagType value) { - this.recomendedOptionalProgrammeComponents = value; - } - - /** - * Gets the value of the courseContents property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getCourseContents() { - return courseContents; - } - - /** - * Sets the value of the courseContents property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setCourseContents(RichTextTagType value) { - this.courseContents = value; - } - - /** - * Gets the value of the recomendedOrRequiredReading property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getRecomendedOrRequiredReading() { - return recomendedOrRequiredReading; - } - - /** - * Sets the value of the recomendedOrRequiredReading property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setRecomendedOrRequiredReading(RichTextTagType value) { - this.recomendedOrRequiredReading = value; - } - - /** - * Gets the value of the planedLearningActivitiesAndTeachingMethod property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getPlanedLearningActivitiesAndTeachingMethod() { - return planedLearningActivitiesAndTeachingMethod; - } - - /** - * Sets the value of the planedLearningActivitiesAndTeachingMethod property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setPlanedLearningActivitiesAndTeachingMethod(RichTextTagType value) { - this.planedLearningActivitiesAndTeachingMethod = value; - } - - /** - * Gets the value of the assesmentMethodsAndCriteria property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAssesmentMethodsAndCriteria() { - return assesmentMethodsAndCriteria; - } - - /** - * Sets the value of the assesmentMethodsAndCriteria property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAssesmentMethodsAndCriteria(RichTextTagType value) { - this.assesmentMethodsAndCriteria = value; - } - - /** - * Gets the value of the observations property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getObservations() { - return observations; - } - - /** - * Sets the value of the observations property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setObservations(RichTextTagType value) { - this.observations = value; - } - - /** - * Gets the value of the groupID property. - * - * @return possible object is {@link String } - * - */ - public String getGroupID() { - return groupID; - } - - /** - * Sets the value of the groupID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setGroupID(String value) { - this.groupID = value; - } - - /** - * Gets the value of the institutionAdministeringStudiesID property. - * - * @return possible object is {@link String } - * - */ - public String getInstitutionAdministeringStudiesID() { - return institutionAdministeringStudiesID; - } - - /** - * Sets the value of the institutionAdministeringStudiesID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setInstitutionAdministeringStudiesID(String value) { - this.institutionAdministeringStudiesID = value; - } - - /** - * Gets the value of the isRequiredByTheProgramme property. - * - * @return possible object is {@link Boolean } - * - */ - public boolean isIsRequiredByTheProgramme() { - if (isRequiredByTheProgramme == null) { - return true; - } else { - return isRequiredByTheProgramme; - } - } - - /** - * Sets the value of the isRequiredByTheProgramme property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setIsRequiredByTheProgramme(Boolean value) { - this.isRequiredByTheProgramme = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="eheaFramework" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}EHEAFrameworkType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Level { - - @XmlValue - protected String value; - @XmlAttribute(name = "eheaFramework", required = true) - protected EHEAFrameworkType eheaFramework; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the eheaFramework property. - * - * @return possible object is {@link EHEAFrameworkType } - * - */ - public EHEAFrameworkType getEheaFramework() { - return eheaFramework; - } - - /** - * Sets the value of the eheaFramework property. - * - * @param value - * allowed object is {@link EHEAFrameworkType } - * - */ - public void setEheaFramework(EHEAFrameworkType value) { - this.eheaFramework = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="modeOfDelivery" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}ModeOfDeliveryType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class ModeOfDelivery { - - @XmlValue - protected String value; - @XmlAttribute(name = "modeOfDelivery", required = true) - protected ModeOfDeliveryType modeOfDelivery; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the modeOfDelivery property. - * - * @return possible object is {@link ModeOfDeliveryType } - * - */ - public ModeOfDeliveryType getModeOfDelivery() { - return modeOfDelivery; - } - - /** - * Sets the value of the modeOfDelivery property. - * - * @param value - * allowed object is {@link ModeOfDeliveryType } - * - */ - public void setModeOfDelivery(ModeOfDeliveryType value) { - this.modeOfDelivery = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="type" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseUnitTypeType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Type { - - @XmlValue - protected String value; - @XmlAttribute(name = "type") - protected CourseUnitTypeType type; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link CourseUnitTypeType } - * - */ - public CourseUnitTypeType getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link CourseUnitTypeType } - * - */ - public void setType(CourseUnitTypeType value) { - this.type = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="year" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class YearOfStudy { - - @XmlValue - protected String value; - @XmlAttribute(name = "year", required = true) - protected BigDecimal year; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the year property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getYear() { - return year; - } - - /** - * Sets the value of the year property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setYear(BigDecimal value) { - this.year = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitTypeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitTypeType.java deleted file mode 100644 index 5978cb2c7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitTypeType.java +++ /dev/null @@ -1,68 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CourseUnitTypeType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="CourseUnitTypeType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="Compulsory"/>
- *     <enumeration value="Optional"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "CourseUnitTypeType") -@XmlEnum -public enum CourseUnitTypeType { - - /** - * Compulsory - * - */ - @XmlEnumValue("Compulsory") - COMPULSORY("Compulsory"), - - /** - * Optional - * - */ - @XmlEnumValue("Optional") - OPTIONAL("Optional"); - private final String value; - - CourseUnitTypeType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static CourseUnitTypeType fromValue(String v) { - for (CourseUnitTypeType c : CourseUnitTypeType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitWorkPlacementType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitWorkPlacementType.java deleted file mode 100644 index f2d424667..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitWorkPlacementType.java +++ /dev/null @@ -1,140 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - * Course unit work placement - * - *

- * Java class for CourseUnitWorkPlacementType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitWorkPlacementType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CollaboratingInstitution" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="DateFrom" type="{urn:crue:academic:xsd:language:diplomasupplement}DateType" minOccurs="0"/>
- *         <element name="DateTo" type="{urn:crue:academic:xsd:language:diplomasupplement}DateType" minOccurs="0"/>
- *         <element name="TrainingHours" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitWorkPlacementType", propOrder = { "collaboratingInstitution", "dateFrom", "dateTo", "trainingHours" }) -public class CourseUnitWorkPlacementType { - - @XmlElement(name = "CollaboratingInstitution", required = true) - protected String collaboratingInstitution; - @XmlElement(name = "DateFrom") - protected XMLGregorianCalendar dateFrom; - @XmlElement(name = "DateTo") - protected XMLGregorianCalendar dateTo; - @XmlElement(name = "TrainingHours") - protected BigDecimal trainingHours; - - /** - * Gets the value of the collaboratingInstitution property. - * - * @return possible object is {@link String } - * - */ - public String getCollaboratingInstitution() { - return collaboratingInstitution; - } - - /** - * Sets the value of the collaboratingInstitution property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCollaboratingInstitution(String value) { - this.collaboratingInstitution = value; - } - - /** - * Gets the value of the dateFrom property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateFrom() { - return dateFrom; - } - - /** - * Sets the value of the dateFrom property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateFrom(XMLGregorianCalendar value) { - this.dateFrom = value; - } - - /** - * Gets the value of the dateTo property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateTo() { - return dateTo; - } - - /** - * Sets the value of the dateTo property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateTo(XMLGregorianCalendar value) { - this.dateTo = value; - } - - /** - * Gets the value of the trainingHours property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getTrainingHours() { - return trainingHours; - } - - /** - * Sets the value of the trainingHours property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setTrainingHours(BigDecimal value) { - this.trainingHours = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitWorkPlacementsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitWorkPlacementsType.java deleted file mode 100644 index 9a894f184..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CourseUnitWorkPlacementsType.java +++ /dev/null @@ -1,74 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Course unit work placements - * - *

- * Java class for CourseUnitWorkPlacementsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitWorkPlacementsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="WorkPlacement" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseUnitWorkPlacementType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitWorkPlacementsType", propOrder = { "workPlacement" }) -public class CourseUnitWorkPlacementsType { - - @XmlElement(name = "WorkPlacement", required = true) - protected List workPlacement; - - /** - * Gets the value of the workPlacement property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the workPlacement property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getWorkPlacement().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CourseUnitWorkPlacementType } - * - * - */ - public List getWorkPlacement() { - if (workPlacement == null) { - workPlacement = new ArrayList(); - } - return this.workPlacement; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesAttendedInOtherInstitutionInMobilityProgramsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesAttendedInOtherInstitutionInMobilityProgramsType.java deleted file mode 100644 index de5325960..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesAttendedInOtherInstitutionInMobilityProgramsType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CoursesAttendedInOtherInstitutionInMobilityProgramsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CoursesAttendedInOtherInstitutionInMobilityProgramsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="MobilityProgramme" type="{urn:crue:academic:xsd:language:diplomasupplement}MobilityProgrammeType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoursesAttendedInOtherInstitutionInMobilityProgramsType", propOrder = { "mobilityProgramme" }) -public class CoursesAttendedInOtherInstitutionInMobilityProgramsType { - - @XmlElement(name = "MobilityProgramme", required = true) - protected List mobilityProgramme; - - /** - * Gets the value of the mobilityProgramme property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the mobilityProgramme property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getMobilityProgramme().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link MobilityProgrammeType } - * - * - */ - public List getMobilityProgramme() { - if (mobilityProgramme == null) { - mobilityProgramme = new ArrayList(); - } - return this.mobilityProgramme; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesGroupType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesGroupType.java deleted file mode 100644 index 8cafa0346..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesGroupType.java +++ /dev/null @@ -1,171 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Courses group - * - *

- * Java class for CoursesGroupType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CoursesGroupType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="HeaderInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="CoursesGroup" type="{urn:crue:academic:xsd:language:diplomasupplement}CoursesGroupType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="FooterInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="groupID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoursesGroupType", propOrder = { "name", "headerInformation", "coursesGroup", "footerInformation" }) -public class CoursesGroupType { - - @XmlElement(name = "Name", required = true) - protected String name; - @XmlElement(name = "HeaderInformation") - protected RichTextTagType headerInformation; - @XmlElement(name = "CoursesGroup") - protected List coursesGroup; - @XmlElement(name = "FooterInformation") - protected RichTextTagType footerInformation; - @XmlAttribute(name = "groupID", required = true) - protected String groupID; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the headerInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getHeaderInformation() { - return headerInformation; - } - - /** - * Sets the value of the headerInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setHeaderInformation(RichTextTagType value) { - this.headerInformation = value; - } - - /** - * Gets the value of the coursesGroup property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the coursesGroup property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getCoursesGroup().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CoursesGroupType } - * - * - */ - public List getCoursesGroup() { - if (coursesGroup == null) { - coursesGroup = new ArrayList(); - } - return this.coursesGroup; - } - - /** - * Gets the value of the footerInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getFooterInformation() { - return footerInformation; - } - - /** - * Sets the value of the footerInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setFooterInformation(RichTextTagType value) { - this.footerInformation = value; - } - - /** - * Gets the value of the groupID property. - * - * @return possible object is {@link String } - * - */ - public String getGroupID() { - return groupID; - } - - /** - * Sets the value of the groupID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setGroupID(String value) { - this.groupID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesGroupsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesGroupsType.java deleted file mode 100644 index 56ae13b33..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesGroupsType.java +++ /dev/null @@ -1,146 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Courses groups - * - *

- * Java class for CoursesGroupsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CoursesGroupsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" minOccurs="0"/>
- *         <element name="HeaderInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="CoursesGroup" type="{urn:crue:academic:xsd:language:diplomasupplement}CoursesGroupType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="FooterInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoursesGroupsType", propOrder = { "name", "headerInformation", "coursesGroup", "footerInformation" }) -public class CoursesGroupsType { - - @XmlElement(name = "Name") - protected String name; - @XmlElement(name = "HeaderInformation") - protected RichTextTagType headerInformation; - @XmlElement(name = "CoursesGroup") - protected List coursesGroup; - @XmlElement(name = "FooterInformation") - protected RichTextTagType footerInformation; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the headerInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getHeaderInformation() { - return headerInformation; - } - - /** - * Sets the value of the headerInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setHeaderInformation(RichTextTagType value) { - this.headerInformation = value; - } - - /** - * Gets the value of the coursesGroup property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the coursesGroup property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getCoursesGroup().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CoursesGroupType } - * - * - */ - public List getCoursesGroup() { - if (coursesGroup == null) { - coursesGroup = new ArrayList(); - } - return this.coursesGroup; - } - - /** - * Gets the value of the footerInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getFooterInformation() { - return footerInformation; - } - - /** - * Sets the value of the footerInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setFooterInformation(RichTextTagType value) { - this.footerInformation = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesUnitsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesUnitsType.java deleted file mode 100644 index 38ccacc0b..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/CoursesUnitsType.java +++ /dev/null @@ -1,74 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Course units - * - *

- * Java class for CoursesUnitsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CoursesUnitsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CourseUnit" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseUnitType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoursesUnitsType", propOrder = { "courseUnit" }) -public class CoursesUnitsType { - - @XmlElement(name = "CourseUnit", required = true) - protected List courseUnit; - - /** - * Gets the value of the courseUnit property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the courseUnit property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getCourseUnit().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CourseUnitType } - * - * - */ - public List getCourseUnit() { - if (courseUnit == null) { - courseUnit = new ArrayList(); - } - return this.courseUnit; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/DiplomaSupplementType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/DiplomaSupplementType.java deleted file mode 100644 index 57e9a4dfb..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/DiplomaSupplementType.java +++ /dev/null @@ -1,367 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig.SignatureType; - -/** - * Diploma Supplement - * - *

- * Java class for DiplomaSupplementType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="DiplomaSupplementType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="InformationIdentifyingTheHolderOfTheQualification" type="{urn:crue:academic:xsd:language:diplomasupplement}InformationIdentifyingTheHolderOfTheQualificationType"/>
- *         <element name="InformationIdentifyingTheQualification" type="{urn:crue:academic:xsd:language:diplomasupplement}InformationIdentifyingTheQualificationType"/>
- *         <element name="InformationOnTheLevelOfTheQualification" type="{urn:crue:academic:xsd:language:diplomasupplement}InformationOnTheLevelOfTheQualificationType"/>
- *         <element name="InformationOnTheContentsAndResultsGained" type="{urn:crue:academic:xsd:language:diplomasupplement}InformationOnTheContentsAndResultsGainedType"/>
- *         <element name="InformationOnTheFunctionOfTheQualification" type="{urn:crue:academic:xsd:language:diplomasupplement}InformationOnTheFunctionOfTheQualificationType"/>
- *         <element name="AdditionalInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}AdditionalInformationType"/>
- *         <element name="CertificationOfTheSupplement" type="{urn:crue:academic:xsd:language:diplomasupplement}CertificationOfTheSupplementType"/>
- *         <element name="InformationOnTheNationalHigherEducationSystem" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType"/>
- *         <element name="Attachments" type="{urn:crue:academic:xsd:language:diplomasupplement}AttachmentsType" minOccurs="0"/>
- *         <element name="ExtensionContent" type="{urn:crue:academic:xsd:language:diplomasupplement}ExtensionContentType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Signature" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="language" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}LanguageType" />
- *       <attribute name="isTheOriginalLanguage" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "DiplomaSupplementType", propOrder = { "informationIdentifyingTheHolderOfTheQualification", "informationIdentifyingTheQualification", "informationOnTheLevelOfTheQualification", - "informationOnTheContentsAndResultsGained", "informationOnTheFunctionOfTheQualification", "additionalInformation", "certificationOfTheSupplement", - "informationOnTheNationalHigherEducationSystem", "attachments", "extensionContent", "signature" }) -public class DiplomaSupplementType { - - @XmlElement(name = "InformationIdentifyingTheHolderOfTheQualification", required = true) - protected InformationIdentifyingTheHolderOfTheQualificationType informationIdentifyingTheHolderOfTheQualification; - @XmlElement(name = "InformationIdentifyingTheQualification", required = true) - protected InformationIdentifyingTheQualificationType informationIdentifyingTheQualification; - @XmlElement(name = "InformationOnTheLevelOfTheQualification", required = true) - protected InformationOnTheLevelOfTheQualificationType informationOnTheLevelOfTheQualification; - @XmlElement(name = "InformationOnTheContentsAndResultsGained", required = true) - protected InformationOnTheContentsAndResultsGainedType informationOnTheContentsAndResultsGained; - @XmlElement(name = "InformationOnTheFunctionOfTheQualification", required = true) - protected InformationOnTheFunctionOfTheQualificationType informationOnTheFunctionOfTheQualification; - @XmlElement(name = "AdditionalInformation", required = true) - protected AdditionalInformationType additionalInformation; - @XmlElement(name = "CertificationOfTheSupplement", required = true) - protected CertificationOfTheSupplementType certificationOfTheSupplement; - @XmlElement(name = "InformationOnTheNationalHigherEducationSystem", required = true) - protected RichTextTagType informationOnTheNationalHigherEducationSystem; - @XmlElement(name = "Attachments") - protected AttachmentsType attachments; - @XmlElement(name = "ExtensionContent") - protected List extensionContent; - @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#") - protected List signature; - @XmlAttribute(name = "language", required = true) - protected LanguageType language; - @XmlAttribute(name = "isTheOriginalLanguage", required = true) - protected boolean isTheOriginalLanguage; - - /** - * Gets the value of the informationIdentifyingTheHolderOfTheQualification property. - * - * @return possible object is {@link InformationIdentifyingTheHolderOfTheQualificationType } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType getInformationIdentifyingTheHolderOfTheQualification() { - return informationIdentifyingTheHolderOfTheQualification; - } - - /** - * Sets the value of the informationIdentifyingTheHolderOfTheQualification property. - * - * @param value - * allowed object is {@link InformationIdentifyingTheHolderOfTheQualificationType } - * - */ - public void setInformationIdentifyingTheHolderOfTheQualification(InformationIdentifyingTheHolderOfTheQualificationType value) { - this.informationIdentifyingTheHolderOfTheQualification = value; - } - - /** - * Gets the value of the informationIdentifyingTheQualification property. - * - * @return possible object is {@link InformationIdentifyingTheQualificationType } - * - */ - public InformationIdentifyingTheQualificationType getInformationIdentifyingTheQualification() { - return informationIdentifyingTheQualification; - } - - /** - * Sets the value of the informationIdentifyingTheQualification property. - * - * @param value - * allowed object is {@link InformationIdentifyingTheQualificationType } - * - */ - public void setInformationIdentifyingTheQualification(InformationIdentifyingTheQualificationType value) { - this.informationIdentifyingTheQualification = value; - } - - /** - * Gets the value of the informationOnTheLevelOfTheQualification property. - * - * @return possible object is {@link InformationOnTheLevelOfTheQualificationType } - * - */ - public InformationOnTheLevelOfTheQualificationType getInformationOnTheLevelOfTheQualification() { - return informationOnTheLevelOfTheQualification; - } - - /** - * Sets the value of the informationOnTheLevelOfTheQualification property. - * - * @param value - * allowed object is {@link InformationOnTheLevelOfTheQualificationType } - * - */ - public void setInformationOnTheLevelOfTheQualification(InformationOnTheLevelOfTheQualificationType value) { - this.informationOnTheLevelOfTheQualification = value; - } - - /** - * Gets the value of the informationOnTheContentsAndResultsGained property. - * - * @return possible object is {@link InformationOnTheContentsAndResultsGainedType } - * - */ - public InformationOnTheContentsAndResultsGainedType getInformationOnTheContentsAndResultsGained() { - return informationOnTheContentsAndResultsGained; - } - - /** - * Sets the value of the informationOnTheContentsAndResultsGained property. - * - * @param value - * allowed object is {@link InformationOnTheContentsAndResultsGainedType } - * - */ - public void setInformationOnTheContentsAndResultsGained(InformationOnTheContentsAndResultsGainedType value) { - this.informationOnTheContentsAndResultsGained = value; - } - - /** - * Gets the value of the informationOnTheFunctionOfTheQualification property. - * - * @return possible object is {@link InformationOnTheFunctionOfTheQualificationType } - * - */ - public InformationOnTheFunctionOfTheQualificationType getInformationOnTheFunctionOfTheQualification() { - return informationOnTheFunctionOfTheQualification; - } - - /** - * Sets the value of the informationOnTheFunctionOfTheQualification property. - * - * @param value - * allowed object is {@link InformationOnTheFunctionOfTheQualificationType } - * - */ - public void setInformationOnTheFunctionOfTheQualification(InformationOnTheFunctionOfTheQualificationType value) { - this.informationOnTheFunctionOfTheQualification = value; - } - - /** - * Gets the value of the additionalInformation property. - * - * @return possible object is {@link AdditionalInformationType } - * - */ - public AdditionalInformationType getAdditionalInformation() { - return additionalInformation; - } - - /** - * Sets the value of the additionalInformation property. - * - * @param value - * allowed object is {@link AdditionalInformationType } - * - */ - public void setAdditionalInformation(AdditionalInformationType value) { - this.additionalInformation = value; - } - - /** - * Gets the value of the certificationOfTheSupplement property. - * - * @return possible object is {@link CertificationOfTheSupplementType } - * - */ - public CertificationOfTheSupplementType getCertificationOfTheSupplement() { - return certificationOfTheSupplement; - } - - /** - * Sets the value of the certificationOfTheSupplement property. - * - * @param value - * allowed object is {@link CertificationOfTheSupplementType } - * - */ - public void setCertificationOfTheSupplement(CertificationOfTheSupplementType value) { - this.certificationOfTheSupplement = value; - } - - /** - * Gets the value of the informationOnTheNationalHigherEducationSystem property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getInformationOnTheNationalHigherEducationSystem() { - return informationOnTheNationalHigherEducationSystem; - } - - /** - * Sets the value of the informationOnTheNationalHigherEducationSystem property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setInformationOnTheNationalHigherEducationSystem(RichTextTagType value) { - this.informationOnTheNationalHigherEducationSystem = value; - } - - /** - * Gets the value of the attachments property. - * - * @return possible object is {@link AttachmentsType } - * - */ - public AttachmentsType getAttachments() { - return attachments; - } - - /** - * Sets the value of the attachments property. - * - * @param value - * allowed object is {@link AttachmentsType } - * - */ - public void setAttachments(AttachmentsType value) { - this.attachments = value; - } - - /** - * Gets the value of the extensionContent property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the extensionContent property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getExtensionContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link ExtensionContentType } - * - * - */ - public List getExtensionContent() { - if (extensionContent == null) { - extensionContent = new ArrayList(); - } - return this.extensionContent; - } - - /** - * Digital signature Gets the value of the signature property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the signature property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getSignature().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link SignatureType } - * - * - */ - public List getSignature() { - if (signature == null) { - signature = new ArrayList(); - } - return this.signature; - } - - /** - * Gets the value of the language property. - * - * @return possible object is {@link LanguageType } - * - */ - public LanguageType getLanguage() { - return language; - } - - /** - * Sets the value of the language property. - * - * @param value - * allowed object is {@link LanguageType } - * - */ - public void setLanguage(LanguageType value) { - this.language = value; - } - - /** - * Gets the value of the isTheOriginalLanguage property. - * - */ - public boolean isIsTheOriginalLanguage() { - return isTheOriginalLanguage; - } - - /** - * Sets the value of the isTheOriginalLanguage property. - * - */ - public void setIsTheOriginalLanguage(boolean value) { - this.isTheOriginalLanguage = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ECTSGradingScaleType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ECTSGradingScaleType.java deleted file mode 100644 index 7916ead8d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ECTSGradingScaleType.java +++ /dev/null @@ -1,90 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ECTSGradingScaleType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="ECTSGradingScaleType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="A"/>
- *     <enumeration value="B"/>
- *     <enumeration value="C"/>
- *     <enumeration value="D"/>
- *     <enumeration value="E"/>
- *     <enumeration value="FX"/>
- *     <enumeration value="F"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "ECTSGradingScaleType") -@XmlEnum -public enum ECTSGradingScaleType { - - /** - * Top 10% - * - */ - A, - - /** - * Next 25% - * - */ - B, - - /** - * Next 30% - * - */ - C, - - /** - * Next 25% - * - */ - D, - - /** - * Lowest 10% - * - */ - E, - - /** - * Fail - * - */ - FX, - - /** - * Fail - * - */ - F; - - public String value() { - return name(); - } - - public static ECTSGradingScaleType fromValue(String v) { - return valueOf(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/EHEAFrameworkType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/EHEAFrameworkType.java deleted file mode 100644 index 49a5a74ee..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/EHEAFrameworkType.java +++ /dev/null @@ -1,76 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for EHEAFrameworkType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="EHEAFrameworkType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="FirstCycle"/>
- *     <enumeration value="SecondCycle"/>
- *     <enumeration value="ThirdCycle"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "EHEAFrameworkType") -@XmlEnum -public enum EHEAFrameworkType { - - /** - * First Cycle - * - */ - @XmlEnumValue("FirstCycle") - FIRST_CYCLE("FirstCycle"), - - /** - * Second Cycle - * - */ - @XmlEnumValue("SecondCycle") - SECOND_CYCLE("SecondCycle"), - - /** - * Third Cycle - * - */ - @XmlEnumValue("ThirdCycle") - THIRD_CYCLE("ThirdCycle"); - private final String value; - - EHEAFrameworkType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static EHEAFrameworkType fromValue(String v) { - for (EHEAFrameworkType c : EHEAFrameworkType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ExtensionContentType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ExtensionContentType.java deleted file mode 100644 index 588017469..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ExtensionContentType.java +++ /dev/null @@ -1,102 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - -/** - * Extension content - * - *

- * Java class for ExtensionContentType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ExtensionContentType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence maxOccurs="unbounded" minOccurs="0">
- *         <any processContents='lax'/>
- *       </sequence>
- *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ExtensionContentType", propOrder = { "content" }) -public class ExtensionContentType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "id") - protected String id; - - /** - * Extension content Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } {@link Element } {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/FamilyNameType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/FamilyNameType.java deleted file mode 100644 index 7efeaaf15..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/FamilyNameType.java +++ /dev/null @@ -1,74 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Family name(s) - * - *

- * Java class for FamilyNameType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="FamilyNameType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Surname" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "FamilyNameType", propOrder = { "surname" }) -public class FamilyNameType { - - @XmlElement(name = "Surname", required = true) - protected List surname; - - /** - * Gets the value of the surname property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the surname property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getSurname().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getSurname() { - if (surname == null) { - surname = new ArrayList(); - } - return this.surname; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GenderType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GenderType.java deleted file mode 100644 index 8aa5feaf0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GenderType.java +++ /dev/null @@ -1,68 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for GenderType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="GenderType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="Female"/>
- *     <enumeration value="Male"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "GenderType") -@XmlEnum -public enum GenderType { - - /** - * Female - * - */ - @XmlEnumValue("Female") - FEMALE("Female"), - - /** - * Male - * - */ - @XmlEnumValue("Male") - MALE("Male"); - private final String value; - - GenderType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static GenderType fromValue(String v) { - for (GenderType c : GenderType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GivenNameType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GivenNameType.java deleted file mode 100644 index 169c94455..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GivenNameType.java +++ /dev/null @@ -1,74 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Given name(s) - * - *

- * Java class for GivenNameType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="GivenNameType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "GivenNameType", propOrder = { "name" }) -public class GivenNameType { - - @XmlElement(name = "Name", required = true) - protected List name; - - /** - * Gets the value of the name property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the name property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getName().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getName() { - if (name == null) { - name = new ArrayList(); - } - return this.name; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GradingSchemeAndGradeDistributionGuidanceType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GradingSchemeAndGradeDistributionGuidanceType.java deleted file mode 100644 index a853aec65..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/GradingSchemeAndGradeDistributionGuidanceType.java +++ /dev/null @@ -1,90 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Grading scheme and grade distribution guidance - * - *

- * Java class for GradingSchemeAndGradeDistributionGuidanceType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="GradingSchemeAndGradeDistributionGuidanceType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="GradingScheme" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType"/>
- *         <element name="GradeDistributionGuidance" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "GradingSchemeAndGradeDistributionGuidanceType", propOrder = { "gradingScheme", "gradeDistributionGuidance" }) -public class GradingSchemeAndGradeDistributionGuidanceType { - - @XmlElement(name = "GradingScheme", required = true) - protected RichTextTagType gradingScheme; - @XmlElement(name = "GradeDistributionGuidance") - protected RichTextTagType gradeDistributionGuidance; - - /** - * Gets the value of the gradingScheme property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getGradingScheme() { - return gradingScheme; - } - - /** - * Sets the value of the gradingScheme property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setGradingScheme(RichTextTagType value) { - this.gradingScheme = value; - } - - /** - * Gets the value of the gradeDistributionGuidance property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getGradeDistributionGuidance() { - return gradeDistributionGuidance; - } - - /** - * Sets the value of the gradeDistributionGuidance property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setGradeDistributionGuidance(RichTextTagType value) { - this.gradeDistributionGuidance = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ImageMimeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ImageMimeType.java deleted file mode 100644 index 4908eab0a..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ImageMimeType.java +++ /dev/null @@ -1,92 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ImageMimeType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="ImageMimeType">
- *   <restriction base="{urn:crue:academic:xsd:language:diplomasupplement}MimeType">
- *     <enumeration value="image/gif"/>
- *     <enumeration value="image/jpeg"/>
- *     <enumeration value="image/pjpeg"/>
- *     <enumeration value="image/png"/>
- *     <enumeration value="image/tiff"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "ImageMimeType") -@XmlEnum(MimeType.class) -public enum ImageMimeType { - - /** - * GIF image - * - */ - @XmlEnumValue("image/gif") - IMAGE_GIF(MimeType.IMAGE_GIF), - - /** - * JPEG JFIF image - * - */ - @XmlEnumValue("image/jpeg") - IMAGE_JPEG(MimeType.IMAGE_JPEG), - - /** - * JPEG JFIF image - * - */ - @XmlEnumValue("image/pjpeg") - IMAGE_PJPEG(MimeType.IMAGE_PJPEG), - - /** - * Portable Network Graphics - * - */ - @XmlEnumValue("image/png") - IMAGE_PNG(MimeType.IMAGE_PNG), - - /** - * Tag Image File Format - * - */ - @XmlEnumValue("image/tiff") - IMAGE_TIFF(MimeType.IMAGE_TIFF); - private final MimeType value; - - ImageMimeType(MimeType v) { - value = v; - } - - public MimeType value() { - return value; - } - - public static ImageMimeType fromValue(MimeType v) { - for (ImageMimeType c : ImageMimeType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v.toString()); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationIdentifyingTheHolderOfTheQualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationIdentifyingTheHolderOfTheQualificationType.java deleted file mode 100644 index f43574139..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationIdentifyingTheHolderOfTheQualificationType.java +++ /dev/null @@ -1,378 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - * Information identifying the holder of the qualification - * - *

- * Java class for InformationIdentifyingTheHolderOfTheQualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationIdentifyingTheHolderOfTheQualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="FamilyName" type="{urn:crue:academic:xsd:language:diplomasupplement}FamilyNameType"/>
- *         <element name="GivenName" type="{urn:crue:academic:xsd:language:diplomasupplement}GivenNameType"/>
- *         <element name="DateOfBirth" type="{urn:crue:academic:xsd:language:diplomasupplement}DateType"/>
- *         <element name="StudentIdentificationNumber" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" minOccurs="0"/>
- *         <element name="CountryOfBirth" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="country" type="{urn:crue:academic:xsd:language:diplomasupplement}CountryType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="PlaceOfBirth" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" minOccurs="0"/>
- *         <element name="Gender" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="gender" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}GenderType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationIdentifyingTheHolderOfTheQualificationType", propOrder = { "familyName", "givenName", "dateOfBirth", "studentIdentificationNumber", "countryOfBirth", "placeOfBirth", - "gender" }) -public class InformationIdentifyingTheHolderOfTheQualificationType { - - @XmlElement(name = "FamilyName", required = true) - protected FamilyNameType familyName; - @XmlElement(name = "GivenName", required = true) - protected GivenNameType givenName; - @XmlElement(name = "DateOfBirth", required = true) - protected XMLGregorianCalendar dateOfBirth; - @XmlElement(name = "StudentIdentificationNumber") - protected String studentIdentificationNumber; - @XmlElement(name = "CountryOfBirth") - protected InformationIdentifyingTheHolderOfTheQualificationType.CountryOfBirth countryOfBirth; - @XmlElement(name = "PlaceOfBirth") - protected String placeOfBirth; - @XmlElement(name = "Gender") - protected InformationIdentifyingTheHolderOfTheQualificationType.Gender gender; - - /** - * Gets the value of the familyName property. - * - * @return possible object is {@link FamilyNameType } - * - */ - public FamilyNameType getFamilyName() { - return familyName; - } - - /** - * Sets the value of the familyName property. - * - * @param value - * allowed object is {@link FamilyNameType } - * - */ - public void setFamilyName(FamilyNameType value) { - this.familyName = value; - } - - /** - * Gets the value of the givenName property. - * - * @return possible object is {@link GivenNameType } - * - */ - public GivenNameType getGivenName() { - return givenName; - } - - /** - * Sets the value of the givenName property. - * - * @param value - * allowed object is {@link GivenNameType } - * - */ - public void setGivenName(GivenNameType value) { - this.givenName = value; - } - - /** - * Gets the value of the dateOfBirth property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateOfBirth() { - return dateOfBirth; - } - - /** - * Sets the value of the dateOfBirth property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateOfBirth(XMLGregorianCalendar value) { - this.dateOfBirth = value; - } - - /** - * Gets the value of the studentIdentificationNumber property. - * - * @return possible object is {@link String } - * - */ - public String getStudentIdentificationNumber() { - return studentIdentificationNumber; - } - - /** - * Sets the value of the studentIdentificationNumber property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStudentIdentificationNumber(String value) { - this.studentIdentificationNumber = value; - } - - /** - * Gets the value of the countryOfBirth property. - * - * @return possible object is {@link InformationIdentifyingTheHolderOfTheQualificationType.CountryOfBirth } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType.CountryOfBirth getCountryOfBirth() { - return countryOfBirth; - } - - /** - * Sets the value of the countryOfBirth property. - * - * @param value - * allowed object is {@link InformationIdentifyingTheHolderOfTheQualificationType.CountryOfBirth } - * - */ - public void setCountryOfBirth(InformationIdentifyingTheHolderOfTheQualificationType.CountryOfBirth value) { - this.countryOfBirth = value; - } - - /** - * Gets the value of the placeOfBirth property. - * - * @return possible object is {@link String } - * - */ - public String getPlaceOfBirth() { - return placeOfBirth; - } - - /** - * Sets the value of the placeOfBirth property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setPlaceOfBirth(String value) { - this.placeOfBirth = value; - } - - /** - * Gets the value of the gender property. - * - * @return possible object is {@link InformationIdentifyingTheHolderOfTheQualificationType.Gender } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType.Gender getGender() { - return gender; - } - - /** - * Sets the value of the gender property. - * - * @param value - * allowed object is {@link InformationIdentifyingTheHolderOfTheQualificationType.Gender } - * - */ - public void setGender(InformationIdentifyingTheHolderOfTheQualificationType.Gender value) { - this.gender = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="country" type="{urn:crue:academic:xsd:language:diplomasupplement}CountryType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class CountryOfBirth { - - @XmlValue - protected String value; - @XmlAttribute(name = "country") - protected CountryType country; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link CountryType } - * - */ - public CountryType getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link CountryType } - * - */ - public void setCountry(CountryType value) { - this.country = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="gender" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}GenderType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Gender { - - @XmlValue - protected String value; - @XmlAttribute(name = "gender", required = true) - protected GenderType gender; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the gender property. - * - * @return possible object is {@link GenderType } - * - */ - public GenderType getGender() { - return gender; - } - - /** - * Sets the value of the gender property. - * - * @param value - * allowed object is {@link GenderType } - * - */ - public void setGender(GenderType value) { - this.gender = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationIdentifyingTheQualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationIdentifyingTheQualificationType.java deleted file mode 100644 index 31a38bbc4..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationIdentifyingTheQualificationType.java +++ /dev/null @@ -1,187 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Information identifying the qualification - * - *

- * Java class for InformationIdentifyingTheQualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationIdentifyingTheQualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Qualification" type="{urn:crue:academic:xsd:language:diplomasupplement}QualificationType"/>
- *         <element name="TitleConferred" type="{urn:crue:academic:xsd:language:diplomasupplement}TitleConferredType" minOccurs="0"/>
- *         <element name="MainFieldsOfStudy" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType"/>
- *         <element name="NameAndStatusOfAwardingInstitution" type="{urn:crue:academic:xsd:language:diplomasupplement}NameAndStatusOfAwardingInstitutionType"/>
- *         <element name="NameAndStatusOfInstitutionAdministeringStudies" type="{urn:crue:academic:xsd:language:diplomasupplement}NameAndStatusOfInstitutionAdministeringStudiesType"/>
- *         <element name="LanguagesOfInstructionAndExamination" type="{urn:crue:academic:xsd:language:diplomasupplement}LanguagesOfInstructionAndExaminationType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationIdentifyingTheQualificationType", propOrder = { "qualification", "titleConferred", "mainFieldsOfStudy", "nameAndStatusOfAwardingInstitution", - "nameAndStatusOfInstitutionAdministeringStudies", "languagesOfInstructionAndExamination" }) -public class InformationIdentifyingTheQualificationType { - - @XmlElement(name = "Qualification", required = true) - protected QualificationType qualification; - @XmlElement(name = "TitleConferred") - protected TitleConferredType titleConferred; - @XmlElement(name = "MainFieldsOfStudy", required = true) - protected RichTextTagType mainFieldsOfStudy; - @XmlElement(name = "NameAndStatusOfAwardingInstitution", required = true) - protected NameAndStatusOfAwardingInstitutionType nameAndStatusOfAwardingInstitution; - @XmlElement(name = "NameAndStatusOfInstitutionAdministeringStudies", required = true) - protected NameAndStatusOfInstitutionAdministeringStudiesType nameAndStatusOfInstitutionAdministeringStudies; - @XmlElement(name = "LanguagesOfInstructionAndExamination", required = true) - protected LanguagesOfInstructionAndExaminationType languagesOfInstructionAndExamination; - - /** - * Gets the value of the qualification property. - * - * @return possible object is {@link QualificationType } - * - */ - public QualificationType getQualification() { - return qualification; - } - - /** - * Sets the value of the qualification property. - * - * @param value - * allowed object is {@link QualificationType } - * - */ - public void setQualification(QualificationType value) { - this.qualification = value; - } - - /** - * Gets the value of the titleConferred property. - * - * @return possible object is {@link TitleConferredType } - * - */ - public TitleConferredType getTitleConferred() { - return titleConferred; - } - - /** - * Sets the value of the titleConferred property. - * - * @param value - * allowed object is {@link TitleConferredType } - * - */ - public void setTitleConferred(TitleConferredType value) { - this.titleConferred = value; - } - - /** - * Gets the value of the mainFieldsOfStudy property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getMainFieldsOfStudy() { - return mainFieldsOfStudy; - } - - /** - * Sets the value of the mainFieldsOfStudy property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setMainFieldsOfStudy(RichTextTagType value) { - this.mainFieldsOfStudy = value; - } - - /** - * Gets the value of the nameAndStatusOfAwardingInstitution property. - * - * @return possible object is {@link NameAndStatusOfAwardingInstitutionType } - * - */ - public NameAndStatusOfAwardingInstitutionType getNameAndStatusOfAwardingInstitution() { - return nameAndStatusOfAwardingInstitution; - } - - /** - * Sets the value of the nameAndStatusOfAwardingInstitution property. - * - * @param value - * allowed object is {@link NameAndStatusOfAwardingInstitutionType } - * - */ - public void setNameAndStatusOfAwardingInstitution(NameAndStatusOfAwardingInstitutionType value) { - this.nameAndStatusOfAwardingInstitution = value; - } - - /** - * Gets the value of the nameAndStatusOfInstitutionAdministeringStudies property. - * - * @return possible object is {@link NameAndStatusOfInstitutionAdministeringStudiesType } - * - */ - public NameAndStatusOfInstitutionAdministeringStudiesType getNameAndStatusOfInstitutionAdministeringStudies() { - return nameAndStatusOfInstitutionAdministeringStudies; - } - - /** - * Sets the value of the nameAndStatusOfInstitutionAdministeringStudies property. - * - * @param value - * allowed object is {@link NameAndStatusOfInstitutionAdministeringStudiesType } - * - */ - public void setNameAndStatusOfInstitutionAdministeringStudies(NameAndStatusOfInstitutionAdministeringStudiesType value) { - this.nameAndStatusOfInstitutionAdministeringStudies = value; - } - - /** - * Gets the value of the languagesOfInstructionAndExamination property. - * - * @return possible object is {@link LanguagesOfInstructionAndExaminationType } - * - */ - public LanguagesOfInstructionAndExaminationType getLanguagesOfInstructionAndExamination() { - return languagesOfInstructionAndExamination; - } - - /** - * Sets the value of the languagesOfInstructionAndExamination property. - * - * @param value - * allowed object is {@link LanguagesOfInstructionAndExaminationType } - * - */ - public void setLanguagesOfInstructionAndExamination(LanguagesOfInstructionAndExaminationType value) { - this.languagesOfInstructionAndExamination = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheContentsAndResultsGainedType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheContentsAndResultsGainedType.java deleted file mode 100644 index 274a01e32..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheContentsAndResultsGainedType.java +++ /dev/null @@ -1,221 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Information on the contents and results gained - * - *

- * Java class for InformationOnTheContentsAndResultsGainedType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationOnTheContentsAndResultsGainedType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="ModeOfStudy">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
- *                 <attribute name="modeOfStudy" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}ModeOfStudyType" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *         <element name="ProgrammeRequirements" type="{urn:crue:academic:xsd:language:diplomasupplement}ProgrammeRequirementsType"/>
- *         <element name="ProgrammeDetails" type="{urn:crue:academic:xsd:language:diplomasupplement}ProgrammeDetailsType"/>
- *         <element name="GradingSchemeAndGradeDistributionGuidance" type="{urn:crue:academic:xsd:language:diplomasupplement}GradingSchemeAndGradeDistributionGuidanceType"/>
- *         <element name="OverallClassificationOfTheQualification" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationOnTheContentsAndResultsGainedType", propOrder = { "modeOfStudy", "programmeRequirements", "programmeDetails", "gradingSchemeAndGradeDistributionGuidance", - "overallClassificationOfTheQualification" }) -public class InformationOnTheContentsAndResultsGainedType { - - @XmlElement(name = "ModeOfStudy", required = true) - protected InformationOnTheContentsAndResultsGainedType.ModeOfStudy modeOfStudy; - @XmlElement(name = "ProgrammeRequirements", required = true) - protected ProgrammeRequirementsType programmeRequirements; - @XmlElement(name = "ProgrammeDetails", required = true) - protected ProgrammeDetailsType programmeDetails; - @XmlElement(name = "GradingSchemeAndGradeDistributionGuidance", required = true) - protected GradingSchemeAndGradeDistributionGuidanceType gradingSchemeAndGradeDistributionGuidance; - @XmlElement(name = "OverallClassificationOfTheQualification", required = true) - protected RichTextTagType overallClassificationOfTheQualification; - - /** - * Gets the value of the modeOfStudy property. - * - * @return possible object is {@link InformationOnTheContentsAndResultsGainedType.ModeOfStudy } - * - */ - public InformationOnTheContentsAndResultsGainedType.ModeOfStudy getModeOfStudy() { - return modeOfStudy; - } - - /** - * Sets the value of the modeOfStudy property. - * - * @param value - * allowed object is {@link InformationOnTheContentsAndResultsGainedType.ModeOfStudy } - * - */ - public void setModeOfStudy(InformationOnTheContentsAndResultsGainedType.ModeOfStudy value) { - this.modeOfStudy = value; - } - - /** - * Gets the value of the programmeRequirements property. - * - * @return possible object is {@link ProgrammeRequirementsType } - * - */ - public ProgrammeRequirementsType getProgrammeRequirements() { - return programmeRequirements; - } - - /** - * Sets the value of the programmeRequirements property. - * - * @param value - * allowed object is {@link ProgrammeRequirementsType } - * - */ - public void setProgrammeRequirements(ProgrammeRequirementsType value) { - this.programmeRequirements = value; - } - - /** - * Gets the value of the programmeDetails property. - * - * @return possible object is {@link ProgrammeDetailsType } - * - */ - public ProgrammeDetailsType getProgrammeDetails() { - return programmeDetails; - } - - /** - * Sets the value of the programmeDetails property. - * - * @param value - * allowed object is {@link ProgrammeDetailsType } - * - */ - public void setProgrammeDetails(ProgrammeDetailsType value) { - this.programmeDetails = value; - } - - /** - * Gets the value of the gradingSchemeAndGradeDistributionGuidance property. - * - * @return possible object is {@link GradingSchemeAndGradeDistributionGuidanceType } - * - */ - public GradingSchemeAndGradeDistributionGuidanceType getGradingSchemeAndGradeDistributionGuidance() { - return gradingSchemeAndGradeDistributionGuidance; - } - - /** - * Sets the value of the gradingSchemeAndGradeDistributionGuidance property. - * - * @param value - * allowed object is {@link GradingSchemeAndGradeDistributionGuidanceType } - * - */ - public void setGradingSchemeAndGradeDistributionGuidance(GradingSchemeAndGradeDistributionGuidanceType value) { - this.gradingSchemeAndGradeDistributionGuidance = value; - } - - /** - * Gets the value of the overallClassificationOfTheQualification property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getOverallClassificationOfTheQualification() { - return overallClassificationOfTheQualification; - } - - /** - * Sets the value of the overallClassificationOfTheQualification property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setOverallClassificationOfTheQualification(RichTextTagType value) { - this.overallClassificationOfTheQualification = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
-	 *       <attribute name="modeOfStudy" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}ModeOfStudyType" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class ModeOfStudy extends RichTextTagType { - - @XmlAttribute(name = "modeOfStudy", required = true) - protected ModeOfStudyType modeOfStudy; - - /** - * Gets the value of the modeOfStudy property. - * - * @return possible object is {@link ModeOfStudyType } - * - */ - public ModeOfStudyType getModeOfStudy() { - return modeOfStudy; - } - - /** - * Sets the value of the modeOfStudy property. - * - * @param value - * allowed object is {@link ModeOfStudyType } - * - */ - public void setModeOfStudy(ModeOfStudyType value) { - this.modeOfStudy = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheFunctionOfTheQualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheFunctionOfTheQualificationType.java deleted file mode 100644 index 383caae19..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheFunctionOfTheQualificationType.java +++ /dev/null @@ -1,148 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Information on the function of the qualification type - * - *

- * Java class for InformationOnTheFunctionOfTheQualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationOnTheFunctionOfTheQualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="AccessToFurtherStudy" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType"/>
- *         <element name="ProfessionalStatus" minOccurs="0">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
- *                 <attribute name="isRegulatedProfession" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationOnTheFunctionOfTheQualificationType", propOrder = { "accessToFurtherStudy", "professionalStatus" }) -public class InformationOnTheFunctionOfTheQualificationType { - - @XmlElement(name = "AccessToFurtherStudy", required = true) - protected RichTextTagType accessToFurtherStudy; - @XmlElement(name = "ProfessionalStatus") - protected InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus professionalStatus; - - /** - * Gets the value of the accessToFurtherStudy property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAccessToFurtherStudy() { - return accessToFurtherStudy; - } - - /** - * Sets the value of the accessToFurtherStudy property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAccessToFurtherStudy(RichTextTagType value) { - this.accessToFurtherStudy = value; - } - - /** - * Gets the value of the professionalStatus property. - * - * @return possible object is {@link InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus } - * - */ - public InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus getProfessionalStatus() { - return professionalStatus; - } - - /** - * Sets the value of the professionalStatus property. - * - * @param value - * allowed object is {@link InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus } - * - */ - public void setProfessionalStatus(InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus value) { - this.professionalStatus = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
-	 *       <attribute name="isRegulatedProfession" type="{http://www.w3.org/2001/XMLSchema}boolean" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class ProfessionalStatus extends RichTextTagType { - - @XmlAttribute(name = "isRegulatedProfession") - protected Boolean isRegulatedProfession; - - /** - * Gets the value of the isRegulatedProfession property. - * - * @return possible object is {@link Boolean } - * - */ - public Boolean isIsRegulatedProfession() { - return isRegulatedProfession; - } - - /** - * Sets the value of the isRegulatedProfession property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setIsRegulatedProfession(Boolean value) { - this.isRegulatedProfession = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheLevelOfTheQualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheLevelOfTheQualificationType.java deleted file mode 100644 index 27282fe36..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InformationOnTheLevelOfTheQualificationType.java +++ /dev/null @@ -1,355 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Information on the level of the qualification - * - *

- * Java class for InformationOnTheLevelOfTheQualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationOnTheLevelOfTheQualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Level">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
- *                 <attribute name="isced1997" type="{urn:crue:academic:xsd:language:diplomasupplement}ISCED1997Type" />
- *                 <attribute name="isced2011" type="{urn:crue:academic:xsd:language:diplomasupplement}ISCED2011Type" />
- *                 <attribute name="eheaFramework" type="{urn:crue:academic:xsd:language:diplomasupplement}EHEAFrameworkType" />
- *                 <attribute name="nfq" type="{urn:crue:academic:xsd:language:diplomasupplement}NFQType" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *         <element name="OfficialLengthOfProgramme">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
- *                 <attribute name="ectsCredits" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" />
- *                 <attribute name="years" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" />
- *                 <attribute name="semesters" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveIntegerType" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *         <element name="AccessRequirements" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationOnTheLevelOfTheQualificationType", propOrder = { "level", "officialLengthOfProgramme", "accessRequirements" }) -public class InformationOnTheLevelOfTheQualificationType { - - @XmlElement(name = "Level", required = true) - protected InformationOnTheLevelOfTheQualificationType.Level level; - @XmlElement(name = "OfficialLengthOfProgramme", required = true) - protected InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme officialLengthOfProgramme; - @XmlElement(name = "AccessRequirements", required = true) - protected RichTextTagType accessRequirements; - - /** - * Gets the value of the level property. - * - * @return possible object is {@link InformationOnTheLevelOfTheQualificationType.Level } - * - */ - public InformationOnTheLevelOfTheQualificationType.Level getLevel() { - return level; - } - - /** - * Sets the value of the level property. - * - * @param value - * allowed object is {@link InformationOnTheLevelOfTheQualificationType.Level } - * - */ - public void setLevel(InformationOnTheLevelOfTheQualificationType.Level value) { - this.level = value; - } - - /** - * Gets the value of the officialLengthOfProgramme property. - * - * @return possible object is {@link InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme } - * - */ - public InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme getOfficialLengthOfProgramme() { - return officialLengthOfProgramme; - } - - /** - * Sets the value of the officialLengthOfProgramme property. - * - * @param value - * allowed object is {@link InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme } - * - */ - public void setOfficialLengthOfProgramme(InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme value) { - this.officialLengthOfProgramme = value; - } - - /** - * Gets the value of the accessRequirements property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAccessRequirements() { - return accessRequirements; - } - - /** - * Sets the value of the accessRequirements property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAccessRequirements(RichTextTagType value) { - this.accessRequirements = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
-	 *       <attribute name="isced1997" type="{urn:crue:academic:xsd:language:diplomasupplement}ISCED1997Type" />
-	 *       <attribute name="isced2011" type="{urn:crue:academic:xsd:language:diplomasupplement}ISCED2011Type" />
-	 *       <attribute name="eheaFramework" type="{urn:crue:academic:xsd:language:diplomasupplement}EHEAFrameworkType" />
-	 *       <attribute name="nfq" type="{urn:crue:academic:xsd:language:diplomasupplement}NFQType" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Level extends RichTextTagType { - - @XmlAttribute(name = "isced1997") - protected String isced1997; - @XmlAttribute(name = "isced2011") - protected String isced2011; - @XmlAttribute(name = "eheaFramework") - protected EHEAFrameworkType eheaFramework; - @XmlAttribute(name = "nfq") - protected String nfq; - - /** - * Gets the value of the isced1997 property. - * - * @return possible object is {@link String } - * - */ - public String getIsced1997() { - return isced1997; - } - - /** - * Sets the value of the isced1997 property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setIsced1997(String value) { - this.isced1997 = value; - } - - /** - * Gets the value of the isced2011 property. - * - * @return possible object is {@link String } - * - */ - public String getIsced2011() { - return isced2011; - } - - /** - * Sets the value of the isced2011 property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setIsced2011(String value) { - this.isced2011 = value; - } - - /** - * Gets the value of the eheaFramework property. - * - * @return possible object is {@link EHEAFrameworkType } - * - */ - public EHEAFrameworkType getEheaFramework() { - return eheaFramework; - } - - /** - * Sets the value of the eheaFramework property. - * - * @param value - * allowed object is {@link EHEAFrameworkType } - * - */ - public void setEheaFramework(EHEAFrameworkType value) { - this.eheaFramework = value; - } - - /** - * Gets the value of the nfq property. - * - * @return possible object is {@link String } - * - */ - public String getNfq() { - return nfq; - } - - /** - * Sets the value of the nfq property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNfq(String value) { - this.nfq = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
-	 *       <attribute name="ectsCredits" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" />
-	 *       <attribute name="years" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" />
-	 *       <attribute name="semesters" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveIntegerType" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class OfficialLengthOfProgramme extends RichTextTagType { - - @XmlAttribute(name = "ectsCredits") - protected BigDecimal ectsCredits; - @XmlAttribute(name = "years", required = true) - protected BigDecimal years; - @XmlAttribute(name = "semesters") - protected Integer semesters; - - /** - * Gets the value of the ectsCredits property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getEctsCredits() { - return ectsCredits; - } - - /** - * Sets the value of the ectsCredits property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setEctsCredits(BigDecimal value) { - this.ectsCredits = value; - } - - /** - * Gets the value of the years property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getYears() { - return years; - } - - /** - * Sets the value of the years property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setYears(BigDecimal value) { - this.years = value; - } - - /** - * Gets the value of the semesters property. - * - * @return possible object is {@link Integer } - * - */ - public Integer getSemesters() { - return semesters; - } - - /** - * Sets the value of the semesters property. - * - * @param value - * allowed object is {@link Integer } - * - */ - public void setSemesters(Integer value) { - this.semesters = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InstitutionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InstitutionType.java deleted file mode 100644 index a99aca0f7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/InstitutionType.java +++ /dev/null @@ -1,407 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlIDREF; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - * Name and status of the institution - * - *

- * Java class for InstitutionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InstitutionType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Status" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Country">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="country" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}CountryType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="AdditionalInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *         <element name="ContactInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}ContactInformationType" minOccurs="0"/>
- *         <element name="AttachedImageRef" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *       <attribute name="nationalID" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" />
- *       <attribute name="erasmusID" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InstitutionType", propOrder = { "name", "status", "country", "additionalInformation", "contactInformation", "attachedImageRef" }) -@XmlSeeAlso({ eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.NameAndStatusOfAwardingInstitutionType.AwardingInstitution.class, - eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies.class }) -public class InstitutionType { - - @XmlElement(name = "Name", required = true) - protected String name; - @XmlElement(name = "Status", required = true) - protected String status; - @XmlElement(name = "Country", required = true) - protected InstitutionType.Country country; - @XmlElement(name = "AdditionalInformation") - protected RichTextTagType additionalInformation; - @XmlElement(name = "ContactInformation") - protected ContactInformationType contactInformation; - @XmlElement(name = "AttachedImageRef") - protected InstitutionType.AttachedImageRef attachedImageRef; - @XmlAttribute(name = "nationalID") - protected String nationalID; - @XmlAttribute(name = "erasmusID") - protected String erasmusID; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the status property. - * - * @return possible object is {@link String } - * - */ - public String getStatus() { - return status; - } - - /** - * Sets the value of the status property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStatus(String value) { - this.status = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link InstitutionType.Country } - * - */ - public InstitutionType.Country getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link InstitutionType.Country } - * - */ - public void setCountry(InstitutionType.Country value) { - this.country = value; - } - - /** - * Gets the value of the additionalInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAdditionalInformation() { - return additionalInformation; - } - - /** - * Sets the value of the additionalInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAdditionalInformation(RichTextTagType value) { - this.additionalInformation = value; - } - - /** - * Gets the value of the contactInformation property. - * - * @return possible object is {@link ContactInformationType } - * - */ - public ContactInformationType getContactInformation() { - return contactInformation; - } - - /** - * Sets the value of the contactInformation property. - * - * @param value - * allowed object is {@link ContactInformationType } - * - */ - public void setContactInformation(ContactInformationType value) { - this.contactInformation = value; - } - - /** - * Gets the value of the attachedImageRef property. - * - * @return possible object is {@link InstitutionType.AttachedImageRef } - * - */ - public InstitutionType.AttachedImageRef getAttachedImageRef() { - return attachedImageRef; - } - - /** - * Sets the value of the attachedImageRef property. - * - * @param value - * allowed object is {@link InstitutionType.AttachedImageRef } - * - */ - public void setAttachedImageRef(InstitutionType.AttachedImageRef value) { - this.attachedImageRef = value; - } - - /** - * Gets the value of the nationalID property. - * - * @return possible object is {@link String } - * - */ - public String getNationalID() { - return nationalID; - } - - /** - * Sets the value of the nationalID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNationalID(String value) { - this.nationalID = value; - } - - /** - * Gets the value of the erasmusID property. - * - * @return possible object is {@link String } - * - */ - public String getErasmusID() { - return erasmusID; - } - - /** - * Sets the value of the erasmusID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setErasmusID(String value) { - this.erasmusID = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class AttachedImageRef { - - @XmlValue - protected String value; - @XmlAttribute(name = "attachedID", required = true) - @XmlIDREF - @XmlSchemaType(name = "IDREF") - protected Object attachedID; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the attachedID property. - * - * @return possible object is {@link Object } - * - */ - public Object getAttachedID() { - return attachedID; - } - - /** - * Sets the value of the attachedID property. - * - * @param value - * allowed object is {@link Object } - * - */ - public void setAttachedID(Object value) { - this.attachedID = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="country" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}CountryType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Country { - - @XmlValue - protected String value; - @XmlAttribute(name = "country", required = true) - protected CountryType country; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link CountryType } - * - */ - public CountryType getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link CountryType } - * - */ - public void setCountry(CountryType value) { - this.country = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LanguageType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LanguageType.java deleted file mode 100644 index 7efdf9488..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LanguageType.java +++ /dev/null @@ -1,836 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for LanguageType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="LanguageType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="ab"/>
- *     <enumeration value="af"/>
- *     <enumeration value="an"/>
- *     <enumeration value="ar"/>
- *     <enumeration value="as"/>
- *     <enumeration value="az"/>
- *     <enumeration value="be"/>
- *     <enumeration value="bg"/>
- *     <enumeration value="bn"/>
- *     <enumeration value="bo"/>
- *     <enumeration value="br"/>
- *     <enumeration value="bs"/>
- *     <enumeration value="ca"/>
- *     <enumeration value="ce"/>
- *     <enumeration value="co"/>
- *     <enumeration value="cs"/>
- *     <enumeration value="cy"/>
- *     <enumeration value="da"/>
- *     <enumeration value="de"/>
- *     <enumeration value="el"/>
- *     <enumeration value="en"/>
- *     <enumeration value="es"/>
- *     <enumeration value="et"/>
- *     <enumeration value="eu"/>
- *     <enumeration value="fa"/>
- *     <enumeration value="fi"/>
- *     <enumeration value="fj"/>
- *     <enumeration value="fo"/>
- *     <enumeration value="fr"/>
- *     <enumeration value="fy"/>
- *     <enumeration value="ga"/>
- *     <enumeration value="gd"/>
- *     <enumeration value="gl"/>
- *     <enumeration value="gv"/>
- *     <enumeration value="grc"/>
- *     <enumeration value="gsw"/>
- *     <enumeration value="he"/>
- *     <enumeration value="hi"/>
- *     <enumeration value="hr"/>
- *     <enumeration value="ht"/>
- *     <enumeration value="hu"/>
- *     <enumeration value="hy"/>
- *     <enumeration value="id"/>
- *     <enumeration value="is"/>
- *     <enumeration value="it"/>
- *     <enumeration value="ja"/>
- *     <enumeration value="jv"/>
- *     <enumeration value="ka"/>
- *     <enumeration value="kg"/>
- *     <enumeration value="ko"/>
- *     <enumeration value="ku"/>
- *     <enumeration value="kw"/>
- *     <enumeration value="ky"/>
- *     <enumeration value="lb"/>
- *     <enumeration value="li"/>
- *     <enumeration value="ln"/>
- *     <enumeration value="lt"/>
- *     <enumeration value="lv"/>
- *     <enumeration value="mg"/>
- *     <enumeration value="mk"/>
- *     <enumeration value="mn"/>
- *     <enumeration value="mo"/>
- *     <enumeration value="ms"/>
- *     <enumeration value="mt"/>
- *     <enumeration value="my"/>
- *     <enumeration value="nb"/>
- *     <enumeration value="ne"/>
- *     <enumeration value="nl"/>
- *     <enumeration value="nn"/>
- *     <enumeration value="no"/>
- *     <enumeration value="pl"/>
- *     <enumeration value="pt"/>
- *     <enumeration value="rm"/>
- *     <enumeration value="ro"/>
- *     <enumeration value="ru"/>
- *     <enumeration value="sc"/>
- *     <enumeration value="se"/>
- *     <enumeration value="sk"/>
- *     <enumeration value="sl"/>
- *     <enumeration value="so"/>
- *     <enumeration value="sq"/>
- *     <enumeration value="sr"/>
- *     <enumeration value="sv"/>
- *     <enumeration value="sw"/>
- *     <enumeration value="tk"/>
- *     <enumeration value="tr"/>
- *     <enumeration value="ty"/>
- *     <enumeration value="uk"/>
- *     <enumeration value="ur"/>
- *     <enumeration value="uz"/>
- *     <enumeration value="vi"/>
- *     <enumeration value="yi"/>
- *     <enumeration value="zh"/>
- *     <enumeration value="cu"/>
- *     <enumeration value="eo"/>
- *     <enumeration value="la"/>
- *     <enumeration value="oc"/>
- *     <enumeration value="vo"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "LanguageType") -@XmlEnum -public enum LanguageType { - - /** - * Abkhazian - * - */ - @XmlEnumValue("ab") - AB("ab"), - - /** - * Afrikaans - * - */ - @XmlEnumValue("af") - AF("af"), - - /** - * Aragonese - * - */ - @XmlEnumValue("an") - AN("an"), - - /** - * Arabic - * - */ - @XmlEnumValue("ar") - AR("ar"), - - /** - * Assamese - * - */ - @XmlEnumValue("as") - AS("as"), - - /** - * Azerbaijani - * - */ - @XmlEnumValue("az") - AZ("az"), - - /** - * Belarusian - * - */ - @XmlEnumValue("be") - BE("be"), - - /** - * Bulgarian - * - */ - @XmlEnumValue("bg") - BG("bg"), - - /** - * Bengali - * - */ - @XmlEnumValue("bn") - BN("bn"), - - /** - * Tibetan - * - */ - @XmlEnumValue("bo") - BO("bo"), - - /** - * Breton - * - */ - @XmlEnumValue("br") - BR("br"), - - /** - * Bosnian - * - */ - @XmlEnumValue("bs") - BS("bs"), - - /** - * Catalan / Valencian - * - */ - @XmlEnumValue("ca") - CA("ca"), - - /** - * Chechen - * - */ - @XmlEnumValue("ce") - CE("ce"), - - /** - * Corsican - * - */ - @XmlEnumValue("co") - CO("co"), - - /** - * Czech - * - */ - @XmlEnumValue("cs") - CS("cs"), - - /** - * Welsh - * - */ - @XmlEnumValue("cy") - CY("cy"), - - /** - * Danish - * - */ - @XmlEnumValue("da") - DA("da"), - - /** - * German - * - */ - @XmlEnumValue("de") - DE("de"), - - /** - * Greek - * - */ - @XmlEnumValue("el") - EL("el"), - - /** - * English - * - */ - @XmlEnumValue("en") - EN("en"), - - /** - * Spanish / Castilian - * - */ - @XmlEnumValue("es") - ES("es"), - - /** - * Estonian - * - */ - @XmlEnumValue("et") - ET("et"), - - /** - * Basque - * - */ - @XmlEnumValue("eu") - EU("eu"), - - /** - * Persian - * - */ - @XmlEnumValue("fa") - FA("fa"), - - /** - * Finnish - * - */ - @XmlEnumValue("fi") - FI("fi"), - - /** - * Fijian - * - */ - @XmlEnumValue("fj") - FJ("fj"), - - /** - * Faroese - * - */ - @XmlEnumValue("fo") - FO("fo"), - - /** - * French - * - */ - @XmlEnumValue("fr") - FR("fr"), - - /** - * Western Frisian - * - */ - @XmlEnumValue("fy") - FY("fy"), - - /** - * Irish - * - */ - @XmlEnumValue("ga") - GA("ga"), - - /** - * Gaelic / Scottish Gaelic - * - */ - @XmlEnumValue("gd") - GD("gd"), - - /** - * Galician - * - */ - @XmlEnumValue("gl") - GL("gl"), - - /** - * Manx - * - */ - @XmlEnumValue("gv") - GV("gv"), - - /** - * Ancient Greek - * - */ - @XmlEnumValue("grc") - GRC("grc"), - - /** - * Alemanic; Swiss German - * - */ - @XmlEnumValue("gsw") - GSW("gsw"), - - /** - * Hebrew - * - */ - @XmlEnumValue("he") - HE("he"), - - /** - * Hindi - * - */ - @XmlEnumValue("hi") - HI("hi"), - - /** - * Croatian - * - */ - @XmlEnumValue("hr") - HR("hr"), - - /** - * Haitian; Haitian Creole - * - */ - @XmlEnumValue("ht") - HT("ht"), - - /** - * Hungarian - * - */ - @XmlEnumValue("hu") - HU("hu"), - - /** - * Armenian - * - */ - @XmlEnumValue("hy") - HY("hy"), - - /** - * Indonesian - * - */ - @XmlEnumValue("id") - ID("id"), - - /** - * Icelandic - * - */ - @XmlEnumValue("is") - IS("is"), - - /** - * Italian - * - */ - @XmlEnumValue("it") - IT("it"), - - /** - * Japanese - * - */ - @XmlEnumValue("ja") - JA("ja"), - - /** - * Javanese - * - */ - @XmlEnumValue("jv") - JV("jv"), - - /** - * Georgian - * - */ - @XmlEnumValue("ka") - KA("ka"), - - /** - * Kongo - * - */ - @XmlEnumValue("kg") - KG("kg"), - - /** - * Korean - * - */ - @XmlEnumValue("ko") - KO("ko"), - - /** - * Kurdish - * - */ - @XmlEnumValue("ku") - KU("ku"), - - /** - * Cornish - * - */ - @XmlEnumValue("kw") - KW("kw"), - - /** - * Kirghiz - * - */ - @XmlEnumValue("ky") - KY("ky"), - - /** - * Luxembourgish; Letzeburgesch - * - */ - @XmlEnumValue("lb") - LB("lb"), - - /** - * Limburgan; Limburger; Limburgish - * - */ - @XmlEnumValue("li") - LI("li"), - - /** - * Lingala - * - */ - @XmlEnumValue("ln") - LN("ln"), - - /** - * Lithuanian - * - */ - @XmlEnumValue("lt") - LT("lt"), - - /** - * Latvian - * - */ - @XmlEnumValue("lv") - LV("lv"), - - /** - * Malagasy - * - */ - @XmlEnumValue("mg") - MG("mg"), - - /** - * Macedonian - * - */ - @XmlEnumValue("mk") - MK("mk"), - - /** - * Mongolian - * - */ - @XmlEnumValue("mn") - MN("mn"), - - /** - * Moldavian - * - */ - @XmlEnumValue("mo") - MO("mo"), - - /** - * Malay - * - */ - @XmlEnumValue("ms") - MS("ms"), - - /** - * Maltese - * - */ - @XmlEnumValue("mt") - MT("mt"), - - /** - * Burmese - * - */ - @XmlEnumValue("my") - MY("my"), - - /** - * Norwegian - * - */ - @XmlEnumValue("nb") - NB("nb"), - - /** - * Nepali - * - */ - @XmlEnumValue("ne") - NE("ne"), - - /** - * Dutch - * - */ - @XmlEnumValue("nl") - NL("nl"), - - /** - * Norwegian (Nynorsk) - * - */ - @XmlEnumValue("nn") - NN("nn"), - - /** - * Norwegian - * - */ - @XmlEnumValue("no") - NO("no"), - - /** - * Polish - * - */ - @XmlEnumValue("pl") - PL("pl"), - - /** - * Portuguese - * - */ - @XmlEnumValue("pt") - PT("pt"), - - /** - * Raeto-Romance - * - */ - @XmlEnumValue("rm") - RM("rm"), - - /** - * Romanian - * - */ - @XmlEnumValue("ro") - RO("ro"), - - /** - * Russian - * - */ - @XmlEnumValue("ru") - RU("ru"), - - /** - * Sardinian - * - */ - @XmlEnumValue("sc") - SC("sc"), - - /** - * Northern Sami - * - */ - @XmlEnumValue("se") - SE("se"), - - /** - * Slovak - * - */ - @XmlEnumValue("sk") - SK("sk"), - - /** - * Slovenian - * - */ - @XmlEnumValue("sl") - SL("sl"), - - /** - * Somali - * - */ - @XmlEnumValue("so") - SO("so"), - - /** - * Albanian - * - */ - @XmlEnumValue("sq") - SQ("sq"), - - /** - * Serbian - * - */ - @XmlEnumValue("sr") - SR("sr"), - - /** - * Swedish - * - */ - @XmlEnumValue("sv") - SV("sv"), - - /** - * Swahili - * - */ - @XmlEnumValue("sw") - SW("sw"), - - /** - * Turkmen - * - */ - @XmlEnumValue("tk") - TK("tk"), - - /** - * Turkish - * - */ - @XmlEnumValue("tr") - TR("tr"), - - /** - * Tahitian - * - */ - @XmlEnumValue("ty") - TY("ty"), - - /** - * Ukrainian - * - */ - @XmlEnumValue("uk") - UK("uk"), - - /** - * Urdu - * - */ - @XmlEnumValue("ur") - UR("ur"), - - /** - * Uzbek - * - */ - @XmlEnumValue("uz") - UZ("uz"), - - /** - * Vietnamese - * - */ - @XmlEnumValue("vi") - VI("vi"), - - /** - * Yiddish - * - */ - @XmlEnumValue("yi") - YI("yi"), - - /** - * Chinese - * - */ - @XmlEnumValue("zh") - ZH("zh"), - - /** - * Church Slavic - * - */ - @XmlEnumValue("cu") - CU("cu"), - - /** - * Esperanto - * - */ - @XmlEnumValue("eo") - EO("eo"), - - /** - * Latin - * - */ - @XmlEnumValue("la") - LA("la"), - - /** - * Occitan (post 1500); - * - */ - @XmlEnumValue("oc") - OC("oc"), - - /** - * VVola - * - */ - @XmlEnumValue("vo") - VO("vo"); - private final String value; - - LanguageType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static LanguageType fromValue(String v) { - for (LanguageType c : LanguageType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LanguagesOfInstructionAndExaminationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LanguagesOfInstructionAndExaminationType.java deleted file mode 100644 index 6920b52de..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LanguagesOfInstructionAndExaminationType.java +++ /dev/null @@ -1,158 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Language of instruction and examination - * - *

- * Java class for LanguagesOfInstructionAndExaminationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="LanguagesOfInstructionAndExaminationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Language" maxOccurs="unbounded">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
- *                 <attribute name="language" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}LanguageType" />
- *                 <attribute name="percent" type="{urn:crue:academic:xsd:language:diplomasupplement}PercentType" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "LanguagesOfInstructionAndExaminationType", propOrder = { "language" }) -public class LanguagesOfInstructionAndExaminationType { - - @XmlElement(name = "Language", required = true) - protected List language; - - /** - * Gets the value of the language property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the language property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getLanguage().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link LanguagesOfInstructionAndExaminationType.Language } - * - * - */ - public List getLanguage() { - if (language == null) { - language = new ArrayList(); - } - return this.language; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType">
-	 *       <attribute name="language" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}LanguageType" />
-	 *       <attribute name="percent" type="{urn:crue:academic:xsd:language:diplomasupplement}PercentType" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Language extends RichTextTagType { - - @XmlAttribute(name = "language", required = true) - protected LanguageType language; - @XmlAttribute(name = "percent") - protected BigDecimal percent; - - /** - * Gets the value of the language property. - * - * @return possible object is {@link LanguageType } - * - */ - public LanguageType getLanguage() { - return language; - } - - /** - * Sets the value of the language property. - * - * @param value - * allowed object is {@link LanguageType } - * - */ - public void setLanguage(LanguageType value) { - this.language = value; - } - - /** - * Gets the value of the percent property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getPercent() { - return percent; - } - - /** - * Sets the value of the percent property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setPercent(BigDecimal value) { - this.percent = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LocalGradeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LocalGradeType.java deleted file mode 100644 index 49291e403..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/LocalGradeType.java +++ /dev/null @@ -1,223 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - * Local grade - * - *

- * Java class for LocalGradeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="LocalGradeType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="AcademicYear" type="{urn:crue:academic:xsd:language:diplomasupplement}AcademicYearType"/>
- *         <element name="DateIssued" type="{urn:crue:academic:xsd:language:diplomasupplement}DateType" minOccurs="0"/>
- *         <element name="Grade" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Source" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="source" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}SourceGradeType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "LocalGradeType", propOrder = { "academicYear", "dateIssued", "grade", "source" }) -public class LocalGradeType { - - @XmlElement(name = "AcademicYear", required = true) - protected String academicYear; - @XmlElement(name = "DateIssued") - protected XMLGregorianCalendar dateIssued; - @XmlElement(name = "Grade", required = true) - protected String grade; - @XmlElement(name = "Source") - protected LocalGradeType.Source source; - - /** - * Gets the value of the academicYear property. - * - * @return possible object is {@link String } - * - */ - public String getAcademicYear() { - return academicYear; - } - - /** - * Sets the value of the academicYear property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAcademicYear(String value) { - this.academicYear = value; - } - - /** - * Gets the value of the dateIssued property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateIssued() { - return dateIssued; - } - - /** - * Sets the value of the dateIssued property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateIssued(XMLGregorianCalendar value) { - this.dateIssued = value; - } - - /** - * Gets the value of the grade property. - * - * @return possible object is {@link String } - * - */ - public String getGrade() { - return grade; - } - - /** - * Sets the value of the grade property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setGrade(String value) { - this.grade = value; - } - - /** - * Gets the value of the source property. - * - * @return possible object is {@link LocalGradeType.Source } - * - */ - public LocalGradeType.Source getSource() { - return source; - } - - /** - * Sets the value of the source property. - * - * @param value - * allowed object is {@link LocalGradeType.Source } - * - */ - public void setSource(LocalGradeType.Source value) { - this.source = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="source" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}SourceGradeType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Source { - - @XmlValue - protected String value; - @XmlAttribute(name = "source", required = true) - protected SourceGradeType source; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the source property. - * - * @return possible object is {@link SourceGradeType } - * - */ - public SourceGradeType getSource() { - return source; - } - - /** - * Sets the value of the source property. - * - * @param value - * allowed object is {@link SourceGradeType } - * - */ - public void setSource(SourceGradeType value) { - this.source = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MimeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MimeType.java deleted file mode 100644 index c4e131862..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MimeType.java +++ /dev/null @@ -1,108 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for MimeType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="MimeType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="image/gif"/>
- *     <enumeration value="image/jpeg"/>
- *     <enumeration value="image/pjpeg"/>
- *     <enumeration value="image/png"/>
- *     <enumeration value="image/tiff"/>
- *     <enumeration value="text/html"/>
- *     <enumeration value="application/pdf"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "MimeType") -@XmlEnum -public enum MimeType { - - /** - * GIF image - * - */ - @XmlEnumValue("image/gif") - IMAGE_GIF("image/gif"), - - /** - * JPEG JFIF image - * - */ - @XmlEnumValue("image/jpeg") - IMAGE_JPEG("image/jpeg"), - - /** - * JPEG JFIF image - * - */ - @XmlEnumValue("image/pjpeg") - IMAGE_PJPEG("image/pjpeg"), - - /** - * Portable Network Graphics - * - */ - @XmlEnumValue("image/png") - IMAGE_PNG("image/png"), - - /** - * Tag Image File Format - * - */ - @XmlEnumValue("image/tiff") - IMAGE_TIFF("image/tiff"), - - /** - * HTML - * - */ - @XmlEnumValue("text/html") - TEXT_HTML("text/html"), - - /** - * Portable Document Format - * - */ - @XmlEnumValue("application/pdf") - APPLICATION_PDF("application/pdf"); - private final String value; - - MimeType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static MimeType fromValue(String v) { - for (MimeType c : MimeType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeCourseUnitType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeCourseUnitType.java deleted file mode 100644 index 9ed52c50d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeCourseUnitType.java +++ /dev/null @@ -1,251 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - * Mobility programme course unit - * - *

- * Java class for MobilityProgrammeCourseUnitType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="MobilityProgrammeCourseUnitType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Code" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" minOccurs="0"/>
- *         <element name="Title">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="language" type="{urn:crue:academic:xsd:language:diplomasupplement}LanguageType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="ECTSCredits" type="{urn:crue:academic:xsd:language:diplomasupplement}PositiveDecimalType" minOccurs="0"/>
- *         <element name="AdditionalInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="isInTheLearningAgreement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MobilityProgrammeCourseUnitType", propOrder = { "code", "title", "ectsCredits", "additionalInformation" }) -public class MobilityProgrammeCourseUnitType { - - @XmlElement(name = "Code") - protected String code; - @XmlElement(name = "Title", required = true) - protected MobilityProgrammeCourseUnitType.Title title; - @XmlElement(name = "ECTSCredits") - protected BigDecimal ectsCredits; - @XmlElement(name = "AdditionalInformation") - protected RichTextTagType additionalInformation; - @XmlAttribute(name = "isInTheLearningAgreement") - protected Boolean isInTheLearningAgreement; - - /** - * Gets the value of the code property. - * - * @return possible object is {@link String } - * - */ - public String getCode() { - return code; - } - - /** - * Sets the value of the code property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCode(String value) { - this.code = value; - } - - /** - * Gets the value of the title property. - * - * @return possible object is {@link MobilityProgrammeCourseUnitType.Title } - * - */ - public MobilityProgrammeCourseUnitType.Title getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is {@link MobilityProgrammeCourseUnitType.Title } - * - */ - public void setTitle(MobilityProgrammeCourseUnitType.Title value) { - this.title = value; - } - - /** - * Gets the value of the ectsCredits property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getECTSCredits() { - return ectsCredits; - } - - /** - * Sets the value of the ectsCredits property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setECTSCredits(BigDecimal value) { - this.ectsCredits = value; - } - - /** - * Gets the value of the additionalInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAdditionalInformation() { - return additionalInformation; - } - - /** - * Sets the value of the additionalInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAdditionalInformation(RichTextTagType value) { - this.additionalInformation = value; - } - - /** - * Gets the value of the isInTheLearningAgreement property. - * - * @return possible object is {@link Boolean } - * - */ - public boolean isIsInTheLearningAgreement() { - if (isInTheLearningAgreement == null) { - return true; - } else { - return isInTheLearningAgreement; - } - } - - /** - * Sets the value of the isInTheLearningAgreement property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setIsInTheLearningAgreement(Boolean value) { - this.isInTheLearningAgreement = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="language" type="{urn:crue:academic:xsd:language:diplomasupplement}LanguageType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Title { - - @XmlValue - protected String value; - @XmlAttribute(name = "language") - protected LanguageType language; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the language property. - * - * @return possible object is {@link LanguageType } - * - */ - public LanguageType getLanguage() { - return language; - } - - /** - * Sets the value of the language property. - * - * @param value - * allowed object is {@link LanguageType } - * - */ - public void setLanguage(LanguageType value) { - this.language = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeCoursesUnitsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeCoursesUnitsType.java deleted file mode 100644 index 4ec7f4424..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeCoursesUnitsType.java +++ /dev/null @@ -1,74 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Mobility programme courses units - * - *

- * Java class for MobilityProgrammeCoursesUnitsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="MobilityProgrammeCoursesUnitsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CourseUnit" type="{urn:crue:academic:xsd:language:diplomasupplement}MobilityProgrammeCourseUnitType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MobilityProgrammeCoursesUnitsType", propOrder = { "courseUnit" }) -public class MobilityProgrammeCoursesUnitsType { - - @XmlElement(name = "CourseUnit", required = true) - protected List courseUnit; - - /** - * Gets the value of the courseUnit property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the courseUnit property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getCourseUnit().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link MobilityProgrammeCourseUnitType } - * - * - */ - public List getCourseUnit() { - if (courseUnit == null) { - courseUnit = new ArrayList(); - } - return this.courseUnit; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeType.java deleted file mode 100644 index 02528aea2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MobilityProgrammeType.java +++ /dev/null @@ -1,319 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - * Mobility programme - * - *

- * Java class for MobilityProgrammeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="MobilityProgrammeType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Type" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="FieldOfStudy" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" minOccurs="0"/>
- *         <element name="Country">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="country" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}CountryType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="ReceivingInstitutionName" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="AcademicYear" type="{urn:crue:academic:xsd:language:diplomasupplement}AcademicYearType"/>
- *         <element name="DateFrom" type="{urn:crue:academic:xsd:language:diplomasupplement}DateType" minOccurs="0"/>
- *         <element name="DateTo" type="{urn:crue:academic:xsd:language:diplomasupplement}DateType" minOccurs="0"/>
- *         <element name="CoursesUnits" type="{urn:crue:academic:xsd:language:diplomasupplement}MobilityProgrammeCoursesUnitsType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MobilityProgrammeType", propOrder = { "type", "fieldOfStudy", "country", "receivingInstitutionName", "academicYear", "dateFrom", "dateTo", "coursesUnits" }) -public class MobilityProgrammeType { - - @XmlElement(name = "Type", required = true) - protected String type; - @XmlElement(name = "FieldOfStudy") - protected String fieldOfStudy; - @XmlElement(name = "Country", required = true) - protected MobilityProgrammeType.Country country; - @XmlElement(name = "ReceivingInstitutionName", required = true) - protected String receivingInstitutionName; - @XmlElement(name = "AcademicYear", required = true) - protected String academicYear; - @XmlElement(name = "DateFrom") - protected XMLGregorianCalendar dateFrom; - @XmlElement(name = "DateTo") - protected XMLGregorianCalendar dateTo; - @XmlElement(name = "CoursesUnits", required = true) - protected MobilityProgrammeCoursesUnitsType coursesUnits; - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the fieldOfStudy property. - * - * @return possible object is {@link String } - * - */ - public String getFieldOfStudy() { - return fieldOfStudy; - } - - /** - * Sets the value of the fieldOfStudy property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setFieldOfStudy(String value) { - this.fieldOfStudy = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link MobilityProgrammeType.Country } - * - */ - public MobilityProgrammeType.Country getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link MobilityProgrammeType.Country } - * - */ - public void setCountry(MobilityProgrammeType.Country value) { - this.country = value; - } - - /** - * Gets the value of the receivingInstitutionName property. - * - * @return possible object is {@link String } - * - */ - public String getReceivingInstitutionName() { - return receivingInstitutionName; - } - - /** - * Sets the value of the receivingInstitutionName property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setReceivingInstitutionName(String value) { - this.receivingInstitutionName = value; - } - - /** - * Gets the value of the academicYear property. - * - * @return possible object is {@link String } - * - */ - public String getAcademicYear() { - return academicYear; - } - - /** - * Sets the value of the academicYear property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAcademicYear(String value) { - this.academicYear = value; - } - - /** - * Gets the value of the dateFrom property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateFrom() { - return dateFrom; - } - - /** - * Sets the value of the dateFrom property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateFrom(XMLGregorianCalendar value) { - this.dateFrom = value; - } - - /** - * Gets the value of the dateTo property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateTo() { - return dateTo; - } - - /** - * Sets the value of the dateTo property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateTo(XMLGregorianCalendar value) { - this.dateTo = value; - } - - /** - * Gets the value of the coursesUnits property. - * - * @return possible object is {@link MobilityProgrammeCoursesUnitsType } - * - */ - public MobilityProgrammeCoursesUnitsType getCoursesUnits() { - return coursesUnits; - } - - /** - * Sets the value of the coursesUnits property. - * - * @param value - * allowed object is {@link MobilityProgrammeCoursesUnitsType } - * - */ - public void setCoursesUnits(MobilityProgrammeCoursesUnitsType value) { - this.coursesUnits = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="country" use="required" type="{urn:crue:academic:xsd:language:diplomasupplement}CountryType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Country { - - @XmlValue - protected String value; - @XmlAttribute(name = "country", required = true) - protected CountryType country; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link CountryType } - * - */ - public CountryType getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link CountryType } - * - */ - public void setCountry(CountryType value) { - this.country = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ModeOfDeliveryType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ModeOfDeliveryType.java deleted file mode 100644 index 23a4152de..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ModeOfDeliveryType.java +++ /dev/null @@ -1,68 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ModeOfDeliveryType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="ModeOfDeliveryType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="FaceToFace"/>
- *     <enumeration value="DistanceLearning"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "ModeOfDeliveryType") -@XmlEnum -public enum ModeOfDeliveryType { - - /** - * Face-to-face - * - */ - @XmlEnumValue("FaceToFace") - FACE_TO_FACE("FaceToFace"), - - /** - * Distance learning - * - */ - @XmlEnumValue("DistanceLearning") - DISTANCE_LEARNING("DistanceLearning"); - private final String value; - - ModeOfDeliveryType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static ModeOfDeliveryType fromValue(String v) { - for (ModeOfDeliveryType c : ModeOfDeliveryType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ModeOfStudyType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ModeOfStudyType.java deleted file mode 100644 index 5cb0d2646..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ModeOfStudyType.java +++ /dev/null @@ -1,92 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ModeOfStudyType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="ModeOfStudyType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="FullTime"/>
- *     <enumeration value="ParTime"/>
- *     <enumeration value="Distance"/>
- *     <enumeration value="eLearning"/>
- *     <enumeration value="Another"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "ModeOfStudyType") -@XmlEnum -public enum ModeOfStudyType { - - /** - * Full time - * - */ - @XmlEnumValue("FullTime") - FULL_TIME("FullTime"), - - /** - * Par time - * - */ - @XmlEnumValue("ParTime") - PAR_TIME("ParTime"), - - /** - * Distance - * - */ - @XmlEnumValue("Distance") - DISTANCE("Distance"), - - /** - * eLearning - * - */ - @XmlEnumValue("eLearning") - E_LEARNING("eLearning"), - - /** - * Another - * - */ - @XmlEnumValue("Another") - ANOTHER("Another"); - private final String value; - - ModeOfStudyType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static ModeOfStudyType fromValue(String v) { - for (ModeOfStudyType c : ModeOfStudyType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MultilingualDiplomaSupplementType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MultilingualDiplomaSupplementType.java deleted file mode 100644 index ab83f154e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/MultilingualDiplomaSupplementType.java +++ /dev/null @@ -1,105 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig.SignatureType; - -/** - * Multilingual Diploma Supplement (DS) - * - *

- * Java class for MultilingualDiplomaSupplementType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="MultilingualDiplomaSupplementType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{urn:crue:academic:xsd:language:diplomasupplement}DiplomaSupplement" maxOccurs="unbounded" minOccurs="2"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Signature" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MultilingualDiplomaSupplementType", propOrder = { "diplomaSupplement", "signature" }) -public class MultilingualDiplomaSupplementType { - - @XmlElement(name = "DiplomaSupplement", required = true) - protected List diplomaSupplement; - @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#") - protected List signature; - - /** - * Diploma Supplement Gets the value of the diplomaSupplement property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the diplomaSupplement property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getDiplomaSupplement().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link DiplomaSupplementType } - * - * - */ - public List getDiplomaSupplement() { - if (diplomaSupplement == null) { - diplomaSupplement = new ArrayList(); - } - return this.diplomaSupplement; - } - - /** - * Digital signature Gets the value of the signature property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the signature property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getSignature().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link SignatureType } - * - * - */ - public List getSignature() { - if (signature == null) { - signature = new ArrayList(); - } - return this.signature; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/NameAndStatusOfAwardingInstitutionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/NameAndStatusOfAwardingInstitutionType.java deleted file mode 100644 index 8424677c1..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/NameAndStatusOfAwardingInstitutionType.java +++ /dev/null @@ -1,132 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Name and status of awarding institution - * - *

- * Java class for NameAndStatusOfAwardingInstitutionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="NameAndStatusOfAwardingInstitutionType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="AwardingInstitution" maxOccurs="unbounded">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:crue:academic:xsd:language:diplomasupplement}InstitutionType">
- *                 <attribute name="awardingInstitutionID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "NameAndStatusOfAwardingInstitutionType", propOrder = { "awardingInstitution" }) -public class NameAndStatusOfAwardingInstitutionType { - - @XmlElement(name = "AwardingInstitution", required = true) - protected List awardingInstitution; - - /** - * Gets the value of the awardingInstitution property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the awardingInstitution property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getAwardingInstitution().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link NameAndStatusOfAwardingInstitutionType.AwardingInstitution } - * - * - */ - public List getAwardingInstitution() { - if (awardingInstitution == null) { - awardingInstitution = new ArrayList(); - } - return this.awardingInstitution; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:crue:academic:xsd:language:diplomasupplement}InstitutionType">
-	 *       <attribute name="awardingInstitutionID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class AwardingInstitution extends InstitutionType { - - @XmlAttribute(name = "awardingInstitutionID", required = true) - protected String awardingInstitutionID; - - /** - * Gets the value of the awardingInstitutionID property. - * - * @return possible object is {@link String } - * - */ - public String getAwardingInstitutionID() { - return awardingInstitutionID; - } - - /** - * Sets the value of the awardingInstitutionID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAwardingInstitutionID(String value) { - this.awardingInstitutionID = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/NameAndStatusOfInstitutionAdministeringStudiesType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/NameAndStatusOfInstitutionAdministeringStudiesType.java deleted file mode 100644 index 90225c9a0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/NameAndStatusOfInstitutionAdministeringStudiesType.java +++ /dev/null @@ -1,132 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Name and status of institution administering studies - * - *

- * Java class for NameAndStatusOfInstitutionAdministeringStudiesType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="NameAndStatusOfInstitutionAdministeringStudiesType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="InstitutionAdministeringStudies" maxOccurs="unbounded">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:crue:academic:xsd:language:diplomasupplement}InstitutionType">
- *                 <attribute name="institutionAdministeringStudiesID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "NameAndStatusOfInstitutionAdministeringStudiesType", propOrder = { "institutionAdministeringStudies" }) -public class NameAndStatusOfInstitutionAdministeringStudiesType { - - @XmlElement(name = "InstitutionAdministeringStudies", required = true) - protected List institutionAdministeringStudies; - - /** - * Gets the value of the institutionAdministeringStudies property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the institutionAdministeringStudies property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getInstitutionAdministeringStudies().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies } - * - * - */ - public List getInstitutionAdministeringStudies() { - if (institutionAdministeringStudies == null) { - institutionAdministeringStudies = new ArrayList(); - } - return this.institutionAdministeringStudies; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:crue:academic:xsd:language:diplomasupplement}InstitutionType">
-	 *       <attribute name="institutionAdministeringStudiesID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class InstitutionAdministeringStudies extends InstitutionType { - - @XmlAttribute(name = "institutionAdministeringStudiesID", required = true) - protected String institutionAdministeringStudiesID; - - /** - * Gets the value of the institutionAdministeringStudiesID property. - * - * @return possible object is {@link String } - * - */ - public String getInstitutionAdministeringStudiesID() { - return institutionAdministeringStudiesID; - } - - /** - * Sets the value of the institutionAdministeringStudiesID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setInstitutionAdministeringStudiesID(String value) { - this.institutionAdministeringStudiesID = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ObjectFactory.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ObjectFactory.java deleted file mode 100644 index 83b337368..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ObjectFactory.java +++ /dev/null @@ -1,647 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - -/** - * This object contains factory methods for each Java content interface and Java element interface generated in the crue.academic.xsd.language.diplomasupplement package. - *

- * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. The Java representation of XML content can consist of schema derived interfaces - * and classes representing the binding of schema type definitions, element declarations and model groups. Factory methods for each of these are provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _MultilingualDiplomaSupplement_QNAME = new QName("urn:crue:academic:xsd:language:diplomasupplement", "MultilingualDiplomaSupplement"); - private final static QName _DiplomaSupplement_QNAME = new QName("urn:crue:academic:xsd:language:diplomasupplement", "DiplomaSupplement"); - private final static QName _RichTextTagTypeItalic_QNAME = new QName("urn:crue:academic:xsd:language:diplomasupplement", "Italic"); - private final static QName _RichTextTagTypeBreakLine_QNAME = new QName("urn:crue:academic:xsd:language:diplomasupplement", "BreakLine"); - private final static QName _RichTextTagTypeAttachedRef_QNAME = new QName("urn:crue:academic:xsd:language:diplomasupplement", "AttachedRef"); - private final static QName _RichTextTagTypeUnderline_QNAME = new QName("urn:crue:academic:xsd:language:diplomasupplement", "Underline"); - private final static QName _RichTextTagTypeBold_QNAME = new QName("urn:crue:academic:xsd:language:diplomasupplement", "Bold"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: crue.academic.xsd.language.diplomasupplement - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link AddressType } - * - */ - public AddressType createAddressType() { - return new AddressType(); - } - - /** - * Create an instance of {@link LanguagesOfInstructionAndExaminationType } - * - */ - public LanguagesOfInstructionAndExaminationType createLanguagesOfInstructionAndExaminationType() { - return new LanguagesOfInstructionAndExaminationType(); - } - - /** - * Create an instance of {@link RichTextTagType } - * - */ - public RichTextTagType createRichTextTagType() { - return new RichTextTagType(); - } - - /** - * Create an instance of {@link MobilityProgrammeType } - * - */ - public MobilityProgrammeType createMobilityProgrammeType() { - return new MobilityProgrammeType(); - } - - /** - * Create an instance of {@link NameAndStatusOfInstitutionAdministeringStudiesType } - * - */ - public NameAndStatusOfInstitutionAdministeringStudiesType createNameAndStatusOfInstitutionAdministeringStudiesType() { - return new NameAndStatusOfInstitutionAdministeringStudiesType(); - } - - /** - * Create an instance of {@link InstitutionType } - * - */ - public InstitutionType createInstitutionType() { - return new InstitutionType(); - } - - /** - * Create an instance of {@link MobilityProgrammeCourseUnitType } - * - */ - public MobilityProgrammeCourseUnitType createMobilityProgrammeCourseUnitType() { - return new MobilityProgrammeCourseUnitType(); - } - - /** - * Create an instance of {@link InformationIdentifyingTheHolderOfTheQualificationType } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType createInformationIdentifyingTheHolderOfTheQualificationType() { - return new InformationIdentifyingTheHolderOfTheQualificationType(); - } - - /** - * Create an instance of {@link CourseUnitType } - * - */ - public CourseUnitType createCourseUnitType() { - return new CourseUnitType(); - } - - /** - * Create an instance of {@link LocalGradeType } - * - */ - public LocalGradeType createLocalGradeType() { - return new LocalGradeType(); - } - - /** - * Create an instance of {@link InformationOnTheContentsAndResultsGainedType } - * - */ - public InformationOnTheContentsAndResultsGainedType createInformationOnTheContentsAndResultsGainedType() { - return new InformationOnTheContentsAndResultsGainedType(); - } - - /** - * Create an instance of {@link InformationOnTheLevelOfTheQualificationType } - * - */ - public InformationOnTheLevelOfTheQualificationType createInformationOnTheLevelOfTheQualificationType() { - return new InformationOnTheLevelOfTheQualificationType(); - } - - /** - * Create an instance of {@link NameAndStatusOfAwardingInstitutionType } - * - */ - public NameAndStatusOfAwardingInstitutionType createNameAndStatusOfAwardingInstitutionType() { - return new NameAndStatusOfAwardingInstitutionType(); - } - - /** - * Create an instance of {@link InformationOnTheFunctionOfTheQualificationType } - * - */ - public InformationOnTheFunctionOfTheQualificationType createInformationOnTheFunctionOfTheQualificationType() { - return new InformationOnTheFunctionOfTheQualificationType(); - } - - /** - * Create an instance of {@link MultilingualDiplomaSupplementType } - * - */ - public MultilingualDiplomaSupplementType createMultilingualDiplomaSupplementType() { - return new MultilingualDiplomaSupplementType(); - } - - /** - * Create an instance of {@link DiplomaSupplementType } - * - */ - public DiplomaSupplementType createDiplomaSupplementType() { - return new DiplomaSupplementType(); - } - - /** - * Create an instance of {@link ExtensionContentType } - * - */ - public ExtensionContentType createExtensionContentType() { - return new ExtensionContentType(); - } - - /** - * Create an instance of {@link AttachedImageURLType } - * - */ - public AttachedImageURLType createAttachedImageURLType() { - return new AttachedImageURLType(); - } - - /** - * Create an instance of {@link CourseStructureDiagramType } - * - */ - public CourseStructureDiagramType createCourseStructureDiagramType() { - return new CourseStructureDiagramType(); - } - - /** - * Create an instance of {@link CourseUnitWorkPlacementType } - * - */ - public CourseUnitWorkPlacementType createCourseUnitWorkPlacementType() { - return new CourseUnitWorkPlacementType(); - } - - /** - * Create an instance of {@link InformationIdentifyingTheQualificationType } - * - */ - public InformationIdentifyingTheQualificationType createInformationIdentifyingTheQualificationType() { - return new InformationIdentifyingTheQualificationType(); - } - - /** - * Create an instance of {@link MobilityProgrammeCoursesUnitsType } - * - */ - public MobilityProgrammeCoursesUnitsType createMobilityProgrammeCoursesUnitsType() { - return new MobilityProgrammeCoursesUnitsType(); - } - - /** - * Create an instance of {@link QualificationType } - * - */ - public QualificationType createQualificationType() { - return new QualificationType(); - } - - /** - * Create an instance of {@link CertificationOfTheSupplementType } - * - */ - public CertificationOfTheSupplementType createCertificationOfTheSupplementType() { - return new CertificationOfTheSupplementType(); - } - - /** - * Create an instance of {@link AttachedFileURLType } - * - */ - public AttachedFileURLType createAttachedFileURLType() { - return new AttachedFileURLType(); - } - - /** - * Create an instance of {@link ProgrammeRequirementsType } - * - */ - public ProgrammeRequirementsType createProgrammeRequirementsType() { - return new ProgrammeRequirementsType(); - } - - /** - * Create an instance of {@link CourseUnitWorkPlacementsType } - * - */ - public CourseUnitWorkPlacementsType createCourseUnitWorkPlacementsType() { - return new CourseUnitWorkPlacementsType(); - } - - /** - * Create an instance of {@link AdditionalInformationType } - * - */ - public AdditionalInformationType createAdditionalInformationType() { - return new AdditionalInformationType(); - } - - /** - * Create an instance of {@link GradingSchemeAndGradeDistributionGuidanceType } - * - */ - public GradingSchemeAndGradeDistributionGuidanceType createGradingSchemeAndGradeDistributionGuidanceType() { - return new GradingSchemeAndGradeDistributionGuidanceType(); - } - - /** - * Create an instance of {@link AttachmentsType } - * - */ - public AttachmentsType createAttachmentsType() { - return new AttachmentsType(); - } - - /** - * Create an instance of {@link CourseUnitLanguageOfInstructionType } - * - */ - public CourseUnitLanguageOfInstructionType createCourseUnitLanguageOfInstructionType() { - return new CourseUnitLanguageOfInstructionType(); - } - - /** - * Create an instance of {@link CoursesAttendedInOtherInstitutionInMobilityProgramsType } - * - */ - public CoursesAttendedInOtherInstitutionInMobilityProgramsType createCoursesAttendedInOtherInstitutionInMobilityProgramsType() { - return new CoursesAttendedInOtherInstitutionInMobilityProgramsType(); - } - - /** - * Create an instance of {@link FamilyNameType } - * - */ - public FamilyNameType createFamilyNameType() { - return new FamilyNameType(); - } - - /** - * Create an instance of {@link CoursesGroupsType } - * - */ - public CoursesGroupsType createCoursesGroupsType() { - return new CoursesGroupsType(); - } - - /** - * Create an instance of {@link TitleConferredType } - * - */ - public TitleConferredType createTitleConferredType() { - return new TitleConferredType(); - } - - /** - * Create an instance of {@link OfficialStampType } - * - */ - public OfficialStampType createOfficialStampType() { - return new OfficialStampType(); - } - - /** - * Create an instance of {@link CourseUnitStudentPerformanceType } - * - */ - public CourseUnitStudentPerformanceType createCourseUnitStudentPerformanceType() { - return new CourseUnitStudentPerformanceType(); - } - - /** - * Create an instance of {@link GivenNameType } - * - */ - public GivenNameType createGivenNameType() { - return new GivenNameType(); - } - - /** - * Create an instance of {@link CoursesUnitsType } - * - */ - public CoursesUnitsType createCoursesUnitsType() { - return new CoursesUnitsType(); - } - - /** - * Create an instance of {@link ProgrammeDetailsType } - * - */ - public ProgrammeDetailsType createProgrammeDetailsType() { - return new ProgrammeDetailsType(); - } - - /** - * Create an instance of {@link OfficialCertifyingType } - * - */ - public OfficialCertifyingType createOfficialCertifyingType() { - return new OfficialCertifyingType(); - } - - /** - * Create an instance of {@link CourseUnitLanguagesOfInstructionType } - * - */ - public CourseUnitLanguagesOfInstructionType createCourseUnitLanguagesOfInstructionType() { - return new CourseUnitLanguagesOfInstructionType(); - } - - /** - * Create an instance of {@link AttachedImageDataType } - * - */ - public AttachedImageDataType createAttachedImageDataType() { - return new AttachedImageDataType(); - } - - /** - * Create an instance of {@link AttachedType } - * - */ - public AttachedType createAttachedType() { - return new AttachedType(); - } - - /** - * Create an instance of {@link CoursesGroupType } - * - */ - public CoursesGroupType createCoursesGroupType() { - return new CoursesGroupType(); - } - - /** - * Create an instance of {@link AttachedFileDataType } - * - */ - public AttachedFileDataType createAttachedFileDataType() { - return new AttachedFileDataType(); - } - - /** - * Create an instance of {@link ContactInformationType } - * - */ - public ContactInformationType createContactInformationType() { - return new ContactInformationType(); - } - - /** - * Create an instance of {@link OfficialsCertifyingType } - * - */ - public OfficialsCertifyingType createOfficialsCertifyingType() { - return new OfficialsCertifyingType(); - } - - /** - * Create an instance of {@link AddressType.Country } - * - */ - public AddressType.Country createAddressTypeCountry() { - return new AddressType.Country(); - } - - /** - * Create an instance of {@link LanguagesOfInstructionAndExaminationType.Language } - * - */ - public LanguagesOfInstructionAndExaminationType.Language createLanguagesOfInstructionAndExaminationTypeLanguage() { - return new LanguagesOfInstructionAndExaminationType.Language(); - } - - /** - * Create an instance of {@link RichTextTagType.AttachedRef } - * - */ - public RichTextTagType.AttachedRef createRichTextTagTypeAttachedRef() { - return new RichTextTagType.AttachedRef(); - } - - /** - * Create an instance of {@link MobilityProgrammeType.Country } - * - */ - public MobilityProgrammeType.Country createMobilityProgrammeTypeCountry() { - return new MobilityProgrammeType.Country(); - } - - /** - * Create an instance of {@link NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies } - * - */ - public NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies createNameAndStatusOfInstitutionAdministeringStudiesTypeInstitutionAdministeringStudies() { - return new NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies(); - } - - /** - * Create an instance of {@link InstitutionType.Country } - * - */ - public InstitutionType.Country createInstitutionTypeCountry() { - return new InstitutionType.Country(); - } - - /** - * Create an instance of {@link InstitutionType.AttachedImageRef } - * - */ - public InstitutionType.AttachedImageRef createInstitutionTypeAttachedImageRef() { - return new InstitutionType.AttachedImageRef(); - } - - /** - * Create an instance of {@link MobilityProgrammeCourseUnitType.Title } - * - */ - public MobilityProgrammeCourseUnitType.Title createMobilityProgrammeCourseUnitTypeTitle() { - return new MobilityProgrammeCourseUnitType.Title(); - } - - /** - * Create an instance of {@link InformationIdentifyingTheHolderOfTheQualificationType.CountryOfBirth } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType.CountryOfBirth createInformationIdentifyingTheHolderOfTheQualificationTypeCountryOfBirth() { - return new InformationIdentifyingTheHolderOfTheQualificationType.CountryOfBirth(); - } - - /** - * Create an instance of {@link InformationIdentifyingTheHolderOfTheQualificationType.Gender } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType.Gender createInformationIdentifyingTheHolderOfTheQualificationTypeGender() { - return new InformationIdentifyingTheHolderOfTheQualificationType.Gender(); - } - - /** - * Create an instance of {@link CourseUnitType.Type } - * - */ - public CourseUnitType.Type createCourseUnitTypeType() { - return new CourseUnitType.Type(); - } - - /** - * Create an instance of {@link CourseUnitType.YearOfStudy } - * - */ - public CourseUnitType.YearOfStudy createCourseUnitTypeYearOfStudy() { - return new CourseUnitType.YearOfStudy(); - } - - /** - * Create an instance of {@link CourseUnitType.Level } - * - */ - public CourseUnitType.Level createCourseUnitTypeLevel() { - return new CourseUnitType.Level(); - } - - /** - * Create an instance of {@link CourseUnitType.ModeOfDelivery } - * - */ - public CourseUnitType.ModeOfDelivery createCourseUnitTypeModeOfDelivery() { - return new CourseUnitType.ModeOfDelivery(); - } - - /** - * Create an instance of {@link LocalGradeType.Source } - * - */ - public LocalGradeType.Source createLocalGradeTypeSource() { - return new LocalGradeType.Source(); - } - - /** - * Create an instance of {@link InformationOnTheContentsAndResultsGainedType.ModeOfStudy } - * - */ - public InformationOnTheContentsAndResultsGainedType.ModeOfStudy createInformationOnTheContentsAndResultsGainedTypeModeOfStudy() { - return new InformationOnTheContentsAndResultsGainedType.ModeOfStudy(); - } - - /** - * Create an instance of {@link InformationOnTheLevelOfTheQualificationType.Level } - * - */ - public InformationOnTheLevelOfTheQualificationType.Level createInformationOnTheLevelOfTheQualificationTypeLevel() { - return new InformationOnTheLevelOfTheQualificationType.Level(); - } - - /** - * Create an instance of {@link InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme } - * - */ - public InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme createInformationOnTheLevelOfTheQualificationTypeOfficialLengthOfProgramme() { - return new InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme(); - } - - /** - * Create an instance of {@link NameAndStatusOfAwardingInstitutionType.AwardingInstitution } - * - */ - public NameAndStatusOfAwardingInstitutionType.AwardingInstitution createNameAndStatusOfAwardingInstitutionTypeAwardingInstitution() { - return new NameAndStatusOfAwardingInstitutionType.AwardingInstitution(); - } - - /** - * Create an instance of {@link InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus } - * - */ - public InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus createInformationOnTheFunctionOfTheQualificationTypeProfessionalStatus() { - return new InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link MultilingualDiplomaSupplementType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:crue:academic:xsd:language:diplomasupplement", name = "MultilingualDiplomaSupplement") - public JAXBElement createMultilingualDiplomaSupplement(MultilingualDiplomaSupplementType value) { - return new JAXBElement(_MultilingualDiplomaSupplement_QNAME, MultilingualDiplomaSupplementType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DiplomaSupplementType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:crue:academic:xsd:language:diplomasupplement", name = "DiplomaSupplement") - public JAXBElement createDiplomaSupplement(DiplomaSupplementType value) { - return new JAXBElement(_DiplomaSupplement_QNAME, DiplomaSupplementType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:crue:academic:xsd:language:diplomasupplement", name = "Italic", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeItalic(String value) { - return new JAXBElement(_RichTextTagTypeItalic_QNAME, String.class, RichTextTagType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:crue:academic:xsd:language:diplomasupplement", name = "BreakLine", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeBreakLine(String value) { - return new JAXBElement(_RichTextTagTypeBreakLine_QNAME, String.class, RichTextTagType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RichTextTagType.AttachedRef }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:crue:academic:xsd:language:diplomasupplement", name = "AttachedRef", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeAttachedRef(RichTextTagType.AttachedRef value) { - return new JAXBElement(_RichTextTagTypeAttachedRef_QNAME, RichTextTagType.AttachedRef.class, RichTextTagType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:crue:academic:xsd:language:diplomasupplement", name = "Underline", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeUnderline(String value) { - return new JAXBElement(_RichTextTagTypeUnderline_QNAME, String.class, RichTextTagType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:crue:academic:xsd:language:diplomasupplement", name = "Bold", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeBold(String value) { - return new JAXBElement(_RichTextTagTypeBold_QNAME, String.class, RichTextTagType.class, value); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialCertifyingType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialCertifyingType.java deleted file mode 100644 index ddf4b7ecc..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialCertifyingType.java +++ /dev/null @@ -1,139 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Official certifying the DS - * - *

- * Java class for OfficialCertifyingType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="OfficialCertifyingType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="FamilyName" type="{urn:crue:academic:xsd:language:diplomasupplement}FamilyNameType"/>
- *         <element name="GivenName" type="{urn:crue:academic:xsd:language:diplomasupplement}GivenNameType"/>
- *         <element name="Capacity" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *       </sequence>
- *       <attribute name="awardingInstitutionID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OfficialCertifyingType", propOrder = { "familyName", "givenName", "capacity" }) -public class OfficialCertifyingType { - - @XmlElement(name = "FamilyName", required = true) - protected FamilyNameType familyName; - @XmlElement(name = "GivenName", required = true) - protected GivenNameType givenName; - @XmlElement(name = "Capacity", required = true) - protected String capacity; - @XmlAttribute(name = "awardingInstitutionID", required = true) - protected String awardingInstitutionID; - - /** - * Gets the value of the familyName property. - * - * @return possible object is {@link FamilyNameType } - * - */ - public FamilyNameType getFamilyName() { - return familyName; - } - - /** - * Sets the value of the familyName property. - * - * @param value - * allowed object is {@link FamilyNameType } - * - */ - public void setFamilyName(FamilyNameType value) { - this.familyName = value; - } - - /** - * Gets the value of the givenName property. - * - * @return possible object is {@link GivenNameType } - * - */ - public GivenNameType getGivenName() { - return givenName; - } - - /** - * Sets the value of the givenName property. - * - * @param value - * allowed object is {@link GivenNameType } - * - */ - public void setGivenName(GivenNameType value) { - this.givenName = value; - } - - /** - * Gets the value of the capacity property. - * - * @return possible object is {@link String } - * - */ - public String getCapacity() { - return capacity; - } - - /** - * Sets the value of the capacity property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCapacity(String value) { - this.capacity = value; - } - - /** - * Gets the value of the awardingInstitutionID property. - * - * @return possible object is {@link String } - * - */ - public String getAwardingInstitutionID() { - return awardingInstitutionID; - } - - /** - * Sets the value of the awardingInstitutionID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAwardingInstitutionID(String value) { - this.awardingInstitutionID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialStampType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialStampType.java deleted file mode 100644 index f92a005d3..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialStampType.java +++ /dev/null @@ -1,91 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Official stamp or seal of the institution - * - *

- * Java class for OfficialStampType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="OfficialStampType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *       </sequence>
- *       <attribute name="awardingInstitutionID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OfficialStampType", propOrder = { "description" }) -public class OfficialStampType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlAttribute(name = "awardingInstitutionID", required = true) - protected String awardingInstitutionID; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the awardingInstitutionID property. - * - * @return possible object is {@link String } - * - */ - public String getAwardingInstitutionID() { - return awardingInstitutionID; - } - - /** - * Sets the value of the awardingInstitutionID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAwardingInstitutionID(String value) { - this.awardingInstitutionID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialsCertifyingType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialsCertifyingType.java deleted file mode 100644 index c77b684c3..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/OfficialsCertifyingType.java +++ /dev/null @@ -1,74 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Officials certifying - * - *

- * Java class for OfficialsCertifyingType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="OfficialsCertifyingType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="OfficialCertifying" type="{urn:crue:academic:xsd:language:diplomasupplement}OfficialCertifyingType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OfficialsCertifyingType", propOrder = { "officialCertifying" }) -public class OfficialsCertifyingType { - - @XmlElement(name = "OfficialCertifying", required = true) - protected List officialCertifying; - - /** - * Gets the value of the officialCertifying property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the officialCertifying property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getOfficialCertifying().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link OfficialCertifyingType } - * - * - */ - public List getOfficialCertifying() { - if (officialCertifying == null) { - officialCertifying = new ArrayList(); - } - return this.officialCertifying; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ProgrammeDetailsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ProgrammeDetailsType.java deleted file mode 100644 index 9c2ac3744..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ProgrammeDetailsType.java +++ /dev/null @@ -1,90 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Programme details - * - *

- * Java class for ProgrammeDetailsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ProgrammeDetailsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CourseStructureDiagram" type="{urn:crue:academic:xsd:language:diplomasupplement}CourseStructureDiagramType"/>
- *         <element name="CoursesAttendedInOtherInstitutionInMobilityPrograms" type="{urn:crue:academic:xsd:language:diplomasupplement}CoursesAttendedInOtherInstitutionInMobilityProgramsType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ProgrammeDetailsType", propOrder = { "courseStructureDiagram", "coursesAttendedInOtherInstitutionInMobilityPrograms" }) -public class ProgrammeDetailsType { - - @XmlElement(name = "CourseStructureDiagram", required = true) - protected CourseStructureDiagramType courseStructureDiagram; - @XmlElement(name = "CoursesAttendedInOtherInstitutionInMobilityPrograms") - protected CoursesAttendedInOtherInstitutionInMobilityProgramsType coursesAttendedInOtherInstitutionInMobilityPrograms; - - /** - * Gets the value of the courseStructureDiagram property. - * - * @return possible object is {@link CourseStructureDiagramType } - * - */ - public CourseStructureDiagramType getCourseStructureDiagram() { - return courseStructureDiagram; - } - - /** - * Sets the value of the courseStructureDiagram property. - * - * @param value - * allowed object is {@link CourseStructureDiagramType } - * - */ - public void setCourseStructureDiagram(CourseStructureDiagramType value) { - this.courseStructureDiagram = value; - } - - /** - * Gets the value of the coursesAttendedInOtherInstitutionInMobilityPrograms property. - * - * @return possible object is {@link CoursesAttendedInOtherInstitutionInMobilityProgramsType } - * - */ - public CoursesAttendedInOtherInstitutionInMobilityProgramsType getCoursesAttendedInOtherInstitutionInMobilityPrograms() { - return coursesAttendedInOtherInstitutionInMobilityPrograms; - } - - /** - * Sets the value of the coursesAttendedInOtherInstitutionInMobilityPrograms property. - * - * @param value - * allowed object is {@link CoursesAttendedInOtherInstitutionInMobilityProgramsType } - * - */ - public void setCoursesAttendedInOtherInstitutionInMobilityPrograms(CoursesAttendedInOtherInstitutionInMobilityProgramsType value) { - this.coursesAttendedInOtherInstitutionInMobilityPrograms = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ProgrammeRequirementsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ProgrammeRequirementsType.java deleted file mode 100644 index e21a8d821..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/ProgrammeRequirementsType.java +++ /dev/null @@ -1,90 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Programme requirements - * - *

- * Java class for ProgrammeRequirementsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ProgrammeRequirementsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Requirements" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType"/>
- *         <element name="KeyLearningOutcomes" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ProgrammeRequirementsType", propOrder = { "requirements", "keyLearningOutcomes" }) -public class ProgrammeRequirementsType { - - @XmlElement(name = "Requirements", required = true) - protected RichTextTagType requirements; - @XmlElement(name = "KeyLearningOutcomes") - protected RichTextTagType keyLearningOutcomes; - - /** - * Gets the value of the requirements property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getRequirements() { - return requirements; - } - - /** - * Sets the value of the requirements property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setRequirements(RichTextTagType value) { - this.requirements = value; - } - - /** - * Gets the value of the keyLearningOutcomes property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getKeyLearningOutcomes() { - return keyLearningOutcomes; - } - - /** - * Sets the value of the keyLearningOutcomes property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setKeyLearningOutcomes(RichTextTagType value) { - this.keyLearningOutcomes = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/QualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/QualificationType.java deleted file mode 100644 index 4414ef05d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/QualificationType.java +++ /dev/null @@ -1,139 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Qualification - * - *

- * Java class for QualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="QualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="AdditionalInformation" type="{urn:crue:academic:xsd:language:diplomasupplement}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="localID" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" />
- *       <attribute name="nationalID" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "QualificationType", propOrder = { "name", "additionalInformation" }) -public class QualificationType { - - @XmlElement(name = "Name", required = true) - protected String name; - @XmlElement(name = "AdditionalInformation") - protected RichTextTagType additionalInformation; - @XmlAttribute(name = "localID") - protected String localID; - @XmlAttribute(name = "nationalID") - protected String nationalID; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the additionalInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAdditionalInformation() { - return additionalInformation; - } - - /** - * Sets the value of the additionalInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAdditionalInformation(RichTextTagType value) { - this.additionalInformation = value; - } - - /** - * Gets the value of the localID property. - * - * @return possible object is {@link String } - * - */ - public String getLocalID() { - return localID; - } - - /** - * Sets the value of the localID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLocalID(String value) { - this.localID = value; - } - - /** - * Gets the value of the nationalID property. - * - * @return possible object is {@link String } - * - */ - public String getNationalID() { - return nationalID; - } - - /** - * Sets the value of the nationalID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNationalID(String value) { - this.nationalID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/RichTextTagType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/RichTextTagType.java deleted file mode 100644 index 68c5ec627..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/RichTextTagType.java +++ /dev/null @@ -1,182 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlIDREF; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - * Rich text tag - * - *

- * Java class for RichTextTagType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="RichTextTagType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded" minOccurs="0">
- *         <element name="Bold" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="BreakLine" type="{urn:crue:academic:xsd:language:diplomasupplement}EmptyType"/>
- *         <element name="Italic" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="Underline" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *         <element name="AttachedRef">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
- *                 <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </choice>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "RichTextTagType", propOrder = { "content" }) -@XmlSeeAlso({ eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus.class, - eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.InformationOnTheLevelOfTheQualificationType.Level.class, - eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme.class, - eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.InformationOnTheContentsAndResultsGainedType.ModeOfStudy.class, - eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.LanguagesOfInstructionAndExaminationType.Language.class }) -public class RichTextTagType { - - @XmlElementRefs({ @XmlElementRef(name = "Underline", namespace = "urn:crue:academic:xsd:language:diplomasupplement", type = JAXBElement.class, required = false), - @XmlElementRef(name = "AttachedRef", namespace = "urn:crue:academic:xsd:language:diplomasupplement", type = JAXBElement.class, required = false), - @XmlElementRef(name = "BreakLine", namespace = "urn:crue:academic:xsd:language:diplomasupplement", type = JAXBElement.class, required = false), - @XmlElementRef(name = "Bold", namespace = "urn:crue:academic:xsd:language:diplomasupplement", type = JAXBElement.class, required = false), - @XmlElementRef(name = "Italic", namespace = "urn:crue:academic:xsd:language:diplomasupplement", type = JAXBElement.class, required = false) }) - @XmlMixed - protected List content; - - /** - * Rich text tag Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link JAXBElement }{@code <}{@link String }{@code >} {@link String } {@link JAXBElement }{@code <}{@link RichTextTagType.AttachedRef } - * {@code >} {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement }{@code <}{@link String }{@code >} - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:crue:academic:xsd:language:diplomasupplement>PlainTextType">
-	 *       <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class AttachedRef { - - @XmlValue - protected String value; - @XmlAttribute(name = "attachedID", required = true) - @XmlIDREF - @XmlSchemaType(name = "IDREF") - protected Object attachedID; - - /** - * Plain text constraint - * - * Non empty text - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the attachedID property. - * - * @return possible object is {@link Object } - * - */ - public Object getAttachedID() { - return attachedID; - } - - /** - * Sets the value of the attachedID property. - * - * @param value - * allowed object is {@link Object } - * - */ - public void setAttachedID(Object value) { - this.attachedID = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/SourceGradeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/SourceGradeType.java deleted file mode 100644 index f9bb1708d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/SourceGradeType.java +++ /dev/null @@ -1,76 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for SourceGradeType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="SourceGradeType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="Recognized"/>
- *     <enumeration value="MobilityProgramme"/>
- *     <enumeration value="Another"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "SourceGradeType") -@XmlEnum -public enum SourceGradeType { - - /** - * Recognized - * - */ - @XmlEnumValue("Recognized") - RECOGNIZED("Recognized"), - - /** - * Course unit attended in mobility programme - * - */ - @XmlEnumValue("MobilityProgramme") - MOBILITY_PROGRAMME("MobilityProgramme"), - - /** - * Another - * - */ - @XmlEnumValue("Another") - ANOTHER("Another"); - private final String value; - - SourceGradeType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static SourceGradeType fromValue(String v) { - for (SourceGradeType c : SourceGradeType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/TitleConferredType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/TitleConferredType.java deleted file mode 100644 index 4bb02cd12..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/TitleConferredType.java +++ /dev/null @@ -1,66 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - * Title conferred - * - *

- * Java class for TitleConferredType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="TitleConferredType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:crue:academic:xsd:language:diplomasupplement}PlainTextType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TitleConferredType", propOrder = { "name" }) -public class TitleConferredType { - - @XmlElement(name = "Name", required = true) - protected String name; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/package-info.java deleted file mode 100644 index 84b6707b7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/crue/academic/xsd/language/diplomasupplement/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -@javax.xml.bind.annotation.XmlSchema(namespace = "urn:crue:academic:xsd:language:diplomasupplement", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement; - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/AcTitleType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/AcTitleType.java deleted file mode 100644 index 14d28d64e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/AcTitleType.java +++ /dev/null @@ -1,83 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for acTitleType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="acTitleType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="titleNormalised" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}titleNormalisedType"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "acTitleType", propOrder = { "titleNormalised", "aqaa" }) -public class AcTitleType { - - @XmlElement(required = true) - protected String titleNormalised; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the titleNormalised property. - * - * @return possible object is {@link String } - * - */ - public String getTitleNormalised() { - return titleNormalised; - } - - /** - * Sets the value of the titleNormalised property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTitleNormalised(String value) { - this.titleNormalised = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/AttributeStatusType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/AttributeStatusType.java deleted file mode 100644 index fe44adaac..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/AttributeStatusType.java +++ /dev/null @@ -1,60 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for AttributeStatusType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="AttributeStatusType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="Available"/>
- *     <enumeration value="NotAvailable"/>
- *     <enumeration value="Withheld"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "AttributeStatusType") -@XmlEnum -public enum AttributeStatusType { - - @XmlEnumValue("Available") - AVAILABLE("Available"), @XmlEnumValue("NotAvailable") - NOT_AVAILABLE("NotAvailable"), @XmlEnumValue("Withheld") - WITHHELD("Withheld"); - private final String value; - - AttributeStatusType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static AttributeStatusType fromValue(String v) { - for (AttributeStatusType c : AttributeStatusType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/CanonicalAddressType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/CanonicalAddressType.java deleted file mode 100644 index 981884efa..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/CanonicalAddressType.java +++ /dev/null @@ -1,231 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - *

- * Java class for canonicalAddressType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="canonicalAddressType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="countryCodeAddress" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}CountryCodeType"/>
- *         <element name="state" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="municipalityCode" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="town" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="postalCode" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="streetName" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="streetNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="apartmentNumber" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "canonicalAddressType", propOrder = { "countryCodeAddress", "state", "municipalityCode", "town", "postalCode", "streetName", "streetNumber", "apartmentNumber" }) -public class CanonicalAddressType { - - @XmlElement(required = true) - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - protected String countryCodeAddress; - protected String state; - protected String municipalityCode; - @XmlElement(required = true) - protected String town; - @XmlElement(required = true) - protected String postalCode; - @XmlElement(required = true) - protected String streetName; - protected String streetNumber; - protected String apartmentNumber; - - /** - * Gets the value of the countryCodeAddress property. - * - * @return possible object is {@link String } - * - */ - public String getCountryCodeAddress() { - return countryCodeAddress; - } - - /** - * Sets the value of the countryCodeAddress property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCountryCodeAddress(String value) { - this.countryCodeAddress = value; - } - - /** - * Gets the value of the state property. - * - * @return possible object is {@link String } - * - */ - public String getState() { - return state; - } - - /** - * Sets the value of the state property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setState(String value) { - this.state = value; - } - - /** - * Gets the value of the municipalityCode property. - * - * @return possible object is {@link String } - * - */ - public String getMunicipalityCode() { - return municipalityCode; - } - - /** - * Sets the value of the municipalityCode property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setMunicipalityCode(String value) { - this.municipalityCode = value; - } - - /** - * Gets the value of the town property. - * - * @return possible object is {@link String } - * - */ - public String getTown() { - return town; - } - - /** - * Sets the value of the town property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTown(String value) { - this.town = value; - } - - /** - * Gets the value of the postalCode property. - * - * @return possible object is {@link String } - * - */ - public String getPostalCode() { - return postalCode; - } - - /** - * Sets the value of the postalCode property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setPostalCode(String value) { - this.postalCode = value; - } - - /** - * Gets the value of the streetName property. - * - * @return possible object is {@link String } - * - */ - public String getStreetName() { - return streetName; - } - - /** - * Sets the value of the streetName property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStreetName(String value) { - this.streetName = value; - } - - /** - * Gets the value of the streetNumber property. - * - * @return possible object is {@link String } - * - */ - public String getStreetNumber() { - return streetNumber; - } - - /** - * Sets the value of the streetNumber property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStreetNumber(String value) { - this.streetNumber = value; - } - - /** - * Gets the value of the apartmentNumber property. - * - * @return possible object is {@link String } - * - */ - public String getApartmentNumber() { - return apartmentNumber; - } - - /** - * Sets the value of the apartmentNumber property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setApartmentNumber(String value) { - this.apartmentNumber = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/CurrentStudiesType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/CurrentStudiesType.java deleted file mode 100644 index 58e4bf02b..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/CurrentStudiesType.java +++ /dev/null @@ -1,179 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.GeneralDiplomaType; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.MultilingualGeneralDiplomaType; - -/** - *

- * Java class for currentStudiesType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="currentStudiesType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <choice>
- *           <element ref="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}MultilingualGeneralDiploma"/>
- *           <element ref="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}GeneralDiploma"/>
- *         </choice>
- *         <element name="yearOfStudy" type="{http://www.w3.org/2001/XMLSchema}integer"/>
- *         <element name="isEligibleForInternship" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *         <any minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "currentStudiesType", propOrder = { "multilingualGeneralDiploma", "generalDiploma", "yearOfStudy", "isEligibleForInternship", "aqaa", "any" }) -public class CurrentStudiesType { - - @XmlElement(name = "MultilingualGeneralDiploma", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma") - protected MultilingualGeneralDiplomaType multilingualGeneralDiploma; - @XmlElement(name = "GeneralDiploma", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma") - protected GeneralDiplomaType generalDiploma; - @XmlElement(required = true) - protected BigInteger yearOfStudy; - protected boolean isEligibleForInternship; - @XmlElement(name = "AQAA") - protected int aqaa; - @XmlAnyElement(lax = true) - protected Object any; - - /** - * Gets the value of the multilingualGeneralDiploma property. - * - * @return possible object is {@link MultilingualGeneralDiplomaType } - * - */ - public MultilingualGeneralDiplomaType getMultilingualGeneralDiploma() { - return multilingualGeneralDiploma; - } - - /** - * Sets the value of the multilingualGeneralDiploma property. - * - * @param value - * allowed object is {@link MultilingualGeneralDiplomaType } - * - */ - public void setMultilingualGeneralDiploma(MultilingualGeneralDiplomaType value) { - this.multilingualGeneralDiploma = value; - } - - /** - * Gets the value of the generalDiploma property. - * - * @return possible object is {@link GeneralDiplomaType } - * - */ - public GeneralDiplomaType getGeneralDiploma() { - return generalDiploma; - } - - /** - * Sets the value of the generalDiploma property. - * - * @param value - * allowed object is {@link GeneralDiplomaType } - * - */ - public void setGeneralDiploma(GeneralDiplomaType value) { - this.generalDiploma = value; - } - - /** - * Gets the value of the yearOfStudy property. - * - * @return possible object is {@link BigInteger } - * - */ - public BigInteger getYearOfStudy() { - return yearOfStudy; - } - - /** - * Sets the value of the yearOfStudy property. - * - * @param value - * allowed object is {@link BigInteger } - * - */ - public void setYearOfStudy(BigInteger value) { - this.yearOfStudy = value; - } - - /** - * Gets the value of the isEligibleForInternship property. - * - */ - public boolean isIsEligibleForInternship() { - return isEligibleForInternship; - } - - /** - * Sets the value of the isEligibleForInternship property. - * - */ - public void setIsEligibleForInternship(boolean value) { - this.isEligibleForInternship = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - - /** - * Gets the value of the any property. - * - * @return possible object is {@link Object } - * - */ - public Object getAny() { - return any; - } - - /** - * Sets the value of the any property. - * - * @param value - * allowed object is {@link Object } - * - */ - public void setAny(Object value) { - this.any = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/DiplomaSupplementType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/DiplomaSupplementType.java deleted file mode 100644 index c02ffc01f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/DiplomaSupplementType.java +++ /dev/null @@ -1,185 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.MultilingualDiplomaSupplementType; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.GeneralDiplomaType; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.MultilingualGeneralDiplomaType; - -/** - *

- * Java class for diplomaSupplementType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="diplomaSupplementType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <choice>
- *           <element ref="{urn:crue:academic:xsd:language:diplomasupplement}MultilingualDiplomaSupplement"/>
- *           <element ref="{urn:crue:academic:xsd:language:diplomasupplement}DiplomaSupplement"/>
- *           <element ref="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}MultilingualGeneralDiploma"/>
- *           <element ref="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}GeneralDiploma"/>
- *         </choice>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *         <any minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "diplomaSupplementType", propOrder = { "multilingualDiplomaSupplement", "diplomaSupplement", "multilingualGeneralDiploma", "generalDiploma", "aqaa", "any" }) -public class DiplomaSupplementType { - - @XmlElement(name = "MultilingualDiplomaSupplement", namespace = "urn:crue:academic:xsd:language:diplomasupplement") - protected MultilingualDiplomaSupplementType multilingualDiplomaSupplement; - @XmlElement(name = "DiplomaSupplement", namespace = "urn:crue:academic:xsd:language:diplomasupplement") - protected eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.DiplomaSupplementType diplomaSupplement; - @XmlElement(name = "MultilingualGeneralDiploma", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma") - protected MultilingualGeneralDiplomaType multilingualGeneralDiploma; - @XmlElement(name = "GeneralDiploma", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma") - protected GeneralDiplomaType generalDiploma; - @XmlElement(name = "AQAA") - protected int aqaa; - @XmlAnyElement(lax = true) - protected Object any; - - /** - * Gets the value of the multilingualDiplomaSupplement property. - * - * @return possible object is {@link MultilingualDiplomaSupplementType } - * - */ - public MultilingualDiplomaSupplementType getMultilingualDiplomaSupplement() { - return multilingualDiplomaSupplement; - } - - /** - * Sets the value of the multilingualDiplomaSupplement property. - * - * @param value - * allowed object is {@link MultilingualDiplomaSupplementType } - * - */ - public void setMultilingualDiplomaSupplement(MultilingualDiplomaSupplementType value) { - this.multilingualDiplomaSupplement = value; - } - - /** - * Gets the value of the diplomaSupplement property. - * - * @return possible object is {@link crue.academic.xsd.language.diplomasupplement.DiplomaSupplementType } - * - */ - public eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.DiplomaSupplementType getDiplomaSupplement() { - return diplomaSupplement; - } - - /** - * Sets the value of the diplomaSupplement property. - * - * @param value - * allowed object is {@link crue.academic.xsd.language.diplomasupplement.DiplomaSupplementType } - * - */ - public void setDiplomaSupplement(eu.stork.peps.complex.attributes.crue.academic.xsd.language.diplomasupplement.DiplomaSupplementType value) { - this.diplomaSupplement = value; - } - - /** - * Gets the value of the multilingualGeneralDiploma property. - * - * @return possible object is {@link MultilingualGeneralDiplomaType } - * - */ - public MultilingualGeneralDiplomaType getMultilingualGeneralDiploma() { - return multilingualGeneralDiploma; - } - - /** - * Sets the value of the multilingualGeneralDiploma property. - * - * @param value - * allowed object is {@link MultilingualGeneralDiplomaType } - * - */ - public void setMultilingualGeneralDiploma(MultilingualGeneralDiplomaType value) { - this.multilingualGeneralDiploma = value; - } - - /** - * Gets the value of the generalDiploma property. - * - * @return possible object is {@link GeneralDiplomaType } - * - */ - public GeneralDiplomaType getGeneralDiploma() { - return generalDiploma; - } - - /** - * Sets the value of the generalDiploma property. - * - * @param value - * allowed object is {@link GeneralDiplomaType } - * - */ - public void setGeneralDiploma(GeneralDiplomaType value) { - this.generalDiploma = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - - /** - * Gets the value of the any property. - * - * @return possible object is {@link Object } - * - */ - public Object getAny() { - return any; - } - - /** - * Sets the value of the any property. - * - * @param value - * allowed object is {@link Object } - * - */ - public void setAny(Object value) { - this.any = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/Habilitation.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/Habilitation.java deleted file mode 100644 index dcb37d8f6..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/Habilitation.java +++ /dev/null @@ -1,83 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for habilitation complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="habilitation">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="ability" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "habilitation", propOrder = { "ability", "aqaa" }) -public class Habilitation { - - @XmlElement(required = true) - protected String ability; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the ability property. - * - * @return possible object is {@link String } - * - */ - public String getAbility() { - return ability; - } - - /** - * Sets the value of the ability property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAbility(String value) { - this.ability = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HabilitationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HabilitationType.java deleted file mode 100644 index 736d68b61..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HabilitationType.java +++ /dev/null @@ -1,83 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for habilitationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="habilitationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="ability" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "habilitationType", propOrder = { "ability", "aqaa" }) -public class HabilitationType { - - @XmlElement(required = true) - protected String ability; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the ability property. - * - * @return possible object is {@link String } - * - */ - public String getAbility() { - return ability; - } - - /** - * Sets the value of the ability property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAbility(String value) { - this.ability = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HasAccountInBankType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HasAccountInBankType.java deleted file mode 100644 index 4130094a2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HasAccountInBankType.java +++ /dev/null @@ -1,83 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for hasAccountInBankType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="hasAccountInBankType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="bankName" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "hasAccountInBankType", propOrder = { "bankName", "aqaa" }) -public class HasAccountInBankType { - - @XmlElement(required = true) - protected String bankName; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the bankName property. - * - * @return possible object is {@link String } - * - */ - public String getBankName() { - return bankName; - } - - /** - * Sets the value of the bankName property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setBankName(String value) { - this.bankName = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HasDegreeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HasDegreeType.java deleted file mode 100644 index c9e387823..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/HasDegreeType.java +++ /dev/null @@ -1,156 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for hasDegreeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="hasDegreeType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="study" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}studyType"/>
- *         <element name="level" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}LevelType"/>
- *         <element name="yearObtained" type="{http://www.w3.org/2001/XMLSchema}integer"/>
- *         <element name="nameOfInstitution" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "hasDegreeType", propOrder = { "study", "level", "yearObtained", "nameOfInstitution", "aqaa" }) -public class HasDegreeType { - - @XmlElement(required = true) - protected String study; - @XmlElement(required = true) - protected String level; - @XmlElement(required = true) - protected BigInteger yearObtained; - @XmlElement(required = true) - protected String nameOfInstitution; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the study property. - * - * @return possible object is {@link String } - * - */ - public String getStudy() { - return study; - } - - /** - * Sets the value of the study property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStudy(String value) { - this.study = value; - } - - /** - * Gets the value of the level property. - * - * @return possible object is {@link String } - * - */ - public String getLevel() { - return level; - } - - /** - * Sets the value of the level property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLevel(String value) { - this.level = value; - } - - /** - * Gets the value of the yearObtained property. - * - * @return possible object is {@link BigInteger } - * - */ - public BigInteger getYearObtained() { - return yearObtained; - } - - /** - * Sets the value of the yearObtained property. - * - * @param value - * allowed object is {@link BigInteger } - * - */ - public void setYearObtained(BigInteger value) { - this.yearObtained = value; - } - - /** - * Gets the value of the nameOfInstitution property. - * - * @return possible object is {@link String } - * - */ - public String getNameOfInstitution() { - return nameOfInstitution; - } - - /** - * Sets the value of the nameOfInstitution property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNameOfInstitution(String value) { - this.nameOfInstitution = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsAcademicStaffType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsAcademicStaffType.java deleted file mode 100644 index 6ce45f90d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsAcademicStaffType.java +++ /dev/null @@ -1,130 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for isAcademicStaffType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="isAcademicStaffType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="nameOfInstitution" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="occupation" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}occupationType"/>
- *         <element name="knowledgeArea" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "isAcademicStaffType", propOrder = { "nameOfInstitution", "occupation", "knowledgeArea", "aqaa" }) -public class IsAcademicStaffType { - - @XmlElement(required = true) - protected String nameOfInstitution; - @XmlElement(required = true) - protected String occupation; - protected String knowledgeArea; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the nameOfInstitution property. - * - * @return possible object is {@link String } - * - */ - public String getNameOfInstitution() { - return nameOfInstitution; - } - - /** - * Sets the value of the nameOfInstitution property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNameOfInstitution(String value) { - this.nameOfInstitution = value; - } - - /** - * Gets the value of the occupation property. - * - * @return possible object is {@link String } - * - */ - public String getOccupation() { - return occupation; - } - - /** - * Sets the value of the occupation property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setOccupation(String value) { - this.occupation = value; - } - - /** - * Gets the value of the knowledgeArea property. - * - * @return possible object is {@link String } - * - */ - public String getKnowledgeArea() { - return knowledgeArea; - } - - /** - * Sets the value of the knowledgeArea property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setKnowledgeArea(String value) { - this.knowledgeArea = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsAdminStaffType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsAdminStaffType.java deleted file mode 100644 index b48f6192f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsAdminStaffType.java +++ /dev/null @@ -1,83 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for isAdminStaffType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="isAdminStaffType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="adminStaff" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "isAdminStaffType", propOrder = { "adminStaff", "aqaa" }) -public class IsAdminStaffType { - - @XmlElement(required = true) - protected String adminStaff; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the adminStaff property. - * - * @return possible object is {@link String } - * - */ - public String getAdminStaff() { - return adminStaff; - } - - /** - * Sets the value of the adminStaff property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAdminStaff(String value) { - this.adminStaff = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsCourseCoordinatorType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsCourseCoordinatorType.java deleted file mode 100644 index 492acfbec..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsCourseCoordinatorType.java +++ /dev/null @@ -1,83 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for isCourseCoordinatorType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="isCourseCoordinatorType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="courseCoodinator" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "isCourseCoordinatorType", propOrder = { "courseCoodinator", "aqaa" }) -public class IsCourseCoordinatorType { - - @XmlElement(required = true) - protected String courseCoodinator; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the courseCoodinator property. - * - * @return possible object is {@link String } - * - */ - public String getCourseCoodinator() { - return courseCoodinator; - } - - /** - * Sets the value of the courseCoodinator property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCourseCoodinator(String value) { - this.courseCoodinator = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHealthCareProfessionalDeprecatedType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHealthCareProfessionalDeprecatedType.java deleted file mode 100644 index a448a7bbe..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHealthCareProfessionalDeprecatedType.java +++ /dev/null @@ -1,131 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.11.27 at 06:17:01 PM CET -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for isHealthCareProfessional_deprecatedType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="isHealthCareProfessional_deprecatedType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="nameOfOrganisation" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element ref="{urn:eu:stork:names:tc:STORK:1.0:assertion}HCPType"/>
- *         <element ref="{urn:eu:stork:names:tc:STORK:1.0:assertion}specialisation"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "isHealthCareProfessional_deprecatedType", propOrder = { "nameOfOrganisation", "hcpType", "specialisation", "aqaa" }) -public class IsHealthCareProfessionalDeprecatedType { - - @XmlElement(required = true) - protected String nameOfOrganisation; - @XmlElement(name = "HCPType", required = true) - protected String hcpType; - @XmlElement(required = true) - protected String specialisation; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the nameOfOrganisation property. - * - * @return possible object is {@link String } - * - */ - public String getNameOfOrganisation() { - return nameOfOrganisation; - } - - /** - * Sets the value of the nameOfOrganisation property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNameOfOrganisation(String value) { - this.nameOfOrganisation = value; - } - - /** - * Gets the value of the hcpType property. - * - * @return possible object is {@link String } - * - */ - public String getHCPType() { - return hcpType; - } - - /** - * Sets the value of the hcpType property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setHCPType(String value) { - this.hcpType = value; - } - - /** - * Gets the value of the specialisation property. - * - * @return possible object is {@link String } - * - */ - public String getSpecialisation() { - return specialisation; - } - - /** - * Sets the value of the specialisation property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setSpecialisation(String value) { - this.specialisation = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHealthCareProfessionalType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHealthCareProfessionalType.java deleted file mode 100644 index 02379d8b0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsHealthCareProfessionalType.java +++ /dev/null @@ -1,154 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.11.27 at 06:17:01 PM CET -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for isHealthCareProfessionalType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="isHealthCareProfessionalType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="typeOfHCP">
- *           <simpleType>
- *             <restriction base="{http://www.w3.org/2001/XMLSchema}anyURI">
- *               <enumeration value="dentist"/>
- *               <enumeration value="nurse"/>
- *               <enumeration value="pharmacist"/>
- *               <enumeration value="physician"/>
- *               <enumeration value="nurse midwife"/>
- *               <enumeration value="admission clerk"/>
- *               <enumeration value="ancillary services"/>
- *               <enumeration value="clinical services"/>
- *             </restriction>
- *           </simpleType>
- *         </element>
- *         <element name="nameOfOrganisation" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="typeOfOrganisation">
- *           <simpleType>
- *             <restriction base="{http://www.w3.org/2001/XMLSchema}anyURI">
- *               <enumeration value="Hospital"/>
- *               <enumeration value="Resident Physician"/>
- *               <enumeration value="Pharmacy"/>
- *               <enumeration value="Other"/>
- *               <enumeration value="Unknown"/>
- *             </restriction>
- *           </simpleType>
- *         </element>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "isHealthCareProfessionalType", propOrder = { "typeOfHCP", "nameOfOrganisation", "typeOfOrganisation", "aqaa" }) -public class IsHealthCareProfessionalType { - - @XmlElement(required = true) - protected String typeOfHCP; - @XmlElement(required = true) - protected String nameOfOrganisation; - @XmlElement(required = true) - protected String typeOfOrganisation; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the typeOfHCP property. - * - * @return possible object is {@link String } - * - */ - public String getTypeOfHCP() { - return typeOfHCP; - } - - /** - * Sets the value of the typeOfHCP property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTypeOfHCP(String value) { - this.typeOfHCP = value; - } - - /** - * Gets the value of the nameOfOrganisation property. - * - * @return possible object is {@link String } - * - */ - public String getNameOfOrganisation() { - return nameOfOrganisation; - } - - /** - * Sets the value of the nameOfOrganisation property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNameOfOrganisation(String value) { - this.nameOfOrganisation = value; - } - - /** - * Gets the value of the typeOfOrganisation property. - * - * @return possible object is {@link String } - * - */ - public String getTypeOfOrganisation() { - return typeOfOrganisation; - } - - /** - * Sets the value of the typeOfOrganisation property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTypeOfOrganisation(String value) { - this.typeOfOrganisation = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsStudentType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsStudentType.java deleted file mode 100644 index 02fed8bc8..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsStudentType.java +++ /dev/null @@ -1,129 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for isStudentType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="isStudentType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{urn:eu:stork:names:tc:STORK:1.0:assertion}study" minOccurs="0"/>
- *         <element name="nameOfInstitution" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="course" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "isStudentType", propOrder = { "study", "nameOfInstitution", "course", "aqaa" }) -public class IsStudentType { - - protected String study; - @XmlElement(required = true) - protected String nameOfInstitution; - protected String course; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the study property. - * - * @return possible object is {@link String } - * - */ - public String getStudy() { - return study; - } - - /** - * Sets the value of the study property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStudy(String value) { - this.study = value; - } - - /** - * Gets the value of the nameOfInstitution property. - * - * @return possible object is {@link String } - * - */ - public String getNameOfInstitution() { - return nameOfInstitution; - } - - /** - * Sets the value of the nameOfInstitution property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNameOfInstitution(String value) { - this.nameOfInstitution = value; - } - - /** - * Gets the value of the course property. - * - * @return possible object is {@link String } - * - */ - public String getCourse() { - return course; - } - - /** - * Sets the value of the course property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCourse(String value) { - this.course = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsTeacherOfType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsTeacherOfType.java deleted file mode 100644 index 9de9d18c9..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/IsTeacherOfType.java +++ /dev/null @@ -1,131 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for isTeacherOfType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="isTeacherOfType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="nameOfInstitution" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="course" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="role" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}teacherRoleType"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "isTeacherOfType", propOrder = { "nameOfInstitution", "course", "role", "aqaa" }) -public class IsTeacherOfType { - - @XmlElement(required = true) - protected String nameOfInstitution; - @XmlElement(required = true) - protected String course; - @XmlElement(required = true) - protected String role; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the nameOfInstitution property. - * - * @return possible object is {@link String } - * - */ - public String getNameOfInstitution() { - return nameOfInstitution; - } - - /** - * Sets the value of the nameOfInstitution property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNameOfInstitution(String value) { - this.nameOfInstitution = value; - } - - /** - * Gets the value of the course property. - * - * @return possible object is {@link String } - * - */ - public String getCourse() { - return course; - } - - /** - * Sets the value of the course property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCourse(String value) { - this.course = value; - } - - /** - * Gets the value of the role property. - * - * @return possible object is {@link String } - * - */ - public String getRole() { - return role; - } - - /** - * Sets the value of the role property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setRole(String value) { - this.role = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/MandateContentType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/MandateContentType.java deleted file mode 100644 index 824e79c70..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/MandateContentType.java +++ /dev/null @@ -1,276 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.10.29 at 02:15:24 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for mandateContentType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="mandateContentType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="typePower" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="typeOfPower" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="timeRestriction" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}TimeRestrictionType"/>
- *         <element name="isJoined" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="isJoint" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="isChained" type="{http://www.w3.org/2001/XMLSchema}boolean"/>
- *         <element name="originalMandateType" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="originalMandate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *         <element name="transactionLimit" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}TransactionLimitRestrictionType"/>
- *         <element name="AQAA" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}QualityAuthenticationAssuranceLevelType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "mandateContentType", propOrder = { "typePower", "typeOfPower", "timeRestriction", "transactionLimit", "isJoined", "isJoint", "isChained", "originalMandateType", "originalMandate", - "aqaa" }) -public class MandateContentType { - - @XmlElement(required = true) - protected String typePower; - @XmlElement(required = true) - protected String typeOfPower; - @XmlElement(required = true) - protected TimeRestrictionType timeRestriction; - @XmlElement(required = true) - protected String isJoined; - @XmlElement(required = true) - protected String isJoint; - protected boolean isChained; - @XmlElement(required = true) - protected byte[] originalMandate; - @XmlElement(required = true) - protected String originalMandateType; - @XmlElement(required = true) - protected TransactionLimitRestrictionType transactionLimit; - @XmlElement(name = "AQAA") - protected int aqaa; - - /** - * Gets the value of the typePower property. - * - * @return possible object is {@link String } - * - */ - public String getTypePower() { - return typePower; - } - - /** - * Sets the value of the typePower property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTypePower(String value) { - this.typePower = value; - this.typeOfPower = value; - } - - /** - * Gets the value of the typeOfPower property. - * - * @return possible object is {@link String } - * - */ - public String getTypeOfPower() { - return typeOfPower; - } - - /** - * Sets the value of the typeOfPower property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTypeOfPower(String value) { - this.typeOfPower = value; - this.typePower = value; - } - - /** - * Gets the value of the timeRestriction property. - * - * @return possible object is {@link TimeRestrictionType } - * - */ - public TimeRestrictionType getTimeRestriction() { - return timeRestriction; - } - - /** - * Sets the value of the timeRestriction property. - * - * @param value - * allowed object is {@link TimeRestrictionType } - * - */ - public void setTimeRestriction(TimeRestrictionType value) { - this.timeRestriction = value; - } - - /** - * Gets the value of the isJoined property. - * - * @return possible object is {@link String } - * - */ - public String getIsJoined() { - return isJoined; - } - - /** - * Sets the value of the isJoined property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setIsJoined(String value) { - this.isJoined = value; - this.isJoint = value; - } - - /** - * Gets the value of the isJoint property. - * - * @return possible object is {@link String } - * - */ - public String getIsJoint() { - return isJoint; - } - - /** - * Sets the value of the isJoint property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setIsJoint(String value) { - this.isJoint = value; - this.isJoined = value; - } - - /** - * Gets the value of the isChained property. - * - */ - public boolean isIsChained() { - return isChained; - } - - /** - * Sets the value of the isChained property. - * - */ - public void setIsChained(boolean value) { - this.isChained = value; - } - - public void setIschained(boolean value) { - setIsChained(value); - } - - /** - * Gets the value of the originalMandate property. - * - * @return possible object is byte[] - */ - public byte[] getOriginalMandate() { - return originalMandate; - } - - /** - * Sets the value of the originalMandate property. - * - * @param value - * allowed object is byte[] - */ - public void setOriginalMandate(byte[] value) { - this.originalMandate = value; - } - - /** - * Gets the value of the originalMandateType property. - * - * @return possible object is {@link String } - * - */ - public String getOriginalMandateType() { - return originalMandateType; - } - - /** - * Sets the value of the originalMandateType property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setOriginalMandateType(String value) { - this.originalMandateType = value; - } - - /** - * Gets the value of the transactionLimit property. - * - * @return possible object is {@link TransactionLimitRestrictionType } - * - */ - public TransactionLimitRestrictionType getTransactionLimit() { - return transactionLimit; - } - - /** - * Sets the value of the transactionLimit property. - * - * @param value - * allowed object is {@link TransactionLimitRestrictionType } - * - */ - public void setTransactionLimit(TransactionLimitRestrictionType value) { - this.transactionLimit = value; - } - - /** - * Gets the value of the aqaa property. - * - */ - public int getAQAA() { - return aqaa; - } - - /** - * Sets the value of the aqaa property. - * - */ - public void setAQAA(int value) { - this.aqaa = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/MandateType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/MandateType.java deleted file mode 100644 index 94bc2fcff..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/MandateType.java +++ /dev/null @@ -1,146 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.10.09 at 10:11:43 AM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for mandateType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="mandateType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="represented" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}representationPersonType"/>
- *         <element name="representing" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}representationPersonType"/>
- *         <element name="representative" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}representationPersonType"/>
- *         <element name="mandateContent" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}mandateContentType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "mandateType", propOrder = { "represented", "representing", "representative", "mandateContent" }) -public class MandateType { - - @XmlElement(required = true) - protected RepresentationPersonType represented; - @XmlElement(required = true) - protected RepresentationPersonType representing; - @XmlElement(required = true) - protected RepresentationPersonType representative; - @XmlElement(required = true) - protected List mandateContent; - - /** - * Gets the value of the represented property. - * - * @return possible object is {@link RepresentationPersonType } - * - */ - public RepresentationPersonType getRepresented() { - return represented; - } - - /** - * Sets the value of the represented property. - * - * @param value - * allowed object is {@link RepresentationPersonType } - * - */ - public void setRepresented(RepresentationPersonType value) { - this.represented = value; - } - - /** - * Gets the value of the representing property. - * - * @return possible object is {@link RepresentationPersonType } - * - */ - public RepresentationPersonType getRepresenting() { - return representing; - } - - /** - * Sets the value of the representing property. - * - * @param value - * allowed object is {@link RepresentationPersonType } - * - */ - public void setRepresenting(RepresentationPersonType value) { - this.representing = value; - this.representative = value; - } - - /** - * Gets the value of the representative property. - * - * @return possible object is {@link RepresentationPersonType } - * - */ - public RepresentationPersonType getRepresentative() { - return representative; - } - - /** - * Sets the value of the representative property. - * - * @param value - * allowed object is {@link RepresentationPersonType } - * - */ - public void setRepresentative(RepresentationPersonType value) { - this.representative = value; - this.representing = value; - } - - /** - * Gets the value of the mandateContent property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the mandateContent property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getMandateContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link MandateContentType } - * - * - */ - public List getMandateContent() { - if (mandateContent == null) { - mandateContent = new ArrayList(); - } - return this.mandateContent; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/ObjectFactory.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/ObjectFactory.java deleted file mode 100644 index 02db708c6..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/ObjectFactory.java +++ /dev/null @@ -1,488 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.11.27 at 06:25:14 PM CET -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import javax.xml.namespace.QName; - -/** - * This object contains factory methods for each Java content interface and Java element interface generated in the eu.stork.names.tc.stork._1_0.assertion package. - *

- * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. The Java representation of XML content can consist of schema derived interfaces - * and classes representing the binding of schema type definitions, element declarations and model groups. Factory methods for each of these are provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _Habilitation_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "habilitation"); - private final static QName _SpApplication_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "spApplication"); - private final static QName _Specialisation_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "specialisation"); - private final static QName _AQAA_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "AQAA"); - private final static QName _QualityAuthenticationAssuranceLevel_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "QualityAuthenticationAssuranceLevel"); - private final static QName _IsAcademicStaff_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "isAcademicStaff"); - private final static QName _MandateContent_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "mandateContent"); - private final static QName _CanonicalRegisteredAddress_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "canonicalRegisteredAddress"); - private final static QName _SpCountry_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "spCountry"); - private final static QName _IsAdminStaff_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "isAdminStaff"); - private final static QName _AttributeValue_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "AttributeValue"); - private final static QName _CountryCodeAddress_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "countryCodeAddress"); - private final static QName _HasAccountInBank_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "hasAccountInBank"); - private final static QName _CurrentStudiesSupplement_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "currentStudiesSupplement"); - private final static QName _Mandate_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "mandate"); - private final static QName _RequestedAttribute_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "RequestedAttribute"); - private final static QName _SpSector_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "spSector"); - private final static QName _HasDegree_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "hasDegree"); - private final static QName _DiplomaSupplement_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "diplomaSupplement"); - private final static QName _IsStudent_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "isStudent"); - private final static QName _HCPType_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "HCPType"); - private final static QName _RepresentationPerson_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "representationPerson"); - private final static QName _CanonicalResidenceAddress_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "canonicalResidenceAddress"); - private final static QName _AcTitle_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "acTitle"); - private final static QName _IsTeacherOf_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "isTeacherOf"); - private final static QName _IsCourseCoordinator_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "isCourseCoordinator"); - private final static QName _CitizenCountryCode_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "CitizenCountryCode"); - private final static QName _Study_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "study"); - private final static QName _IsHealthCareProfessional_QNAME = new QName("urn:eu:stork:names:tc:STORK:1.0:assertion", "isHealthCareProfessional"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: eu.stork.names.tc.stork._1_0.assertion - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link CurrentStudiesType } - * - */ - public CurrentStudiesType createCurrentStudiesType() { - return new CurrentStudiesType(); - } - - /** - * Create an instance of {@link RequestedAttributeType } - * - */ - public RequestedAttributeType createRequestedAttributeType() { - return new RequestedAttributeType(); - } - - /** - * Create an instance of {@link MandateType } - * - */ - public MandateType createMandateType() { - return new MandateType(); - } - - /** - * Create an instance of {@link HasAccountInBankType } - * - */ - public HasAccountInBankType createHasAccountInBankType() { - return new HasAccountInBankType(); - } - - /** - * Create an instance of {@link IsHealthCareProfessionalType } - * - */ - public IsHealthCareProfessionalType createIsHealthCareProfessionalType() { - return new IsHealthCareProfessionalType(); - } - - /** - * Create an instance of {@link IsAdminStaffType } - * - */ - public IsAdminStaffType createIsAdminStaffType() { - return new IsAdminStaffType(); - } - - /** - * Create an instance of {@link CanonicalAddressType } - * - */ - public CanonicalAddressType createCanonicalAddressType() { - return new CanonicalAddressType(); - } - - /** - * Create an instance of {@link MandateContentType } - * - */ - public MandateContentType createMandateContentType() { - return new MandateContentType(); - } - - /** - * Create an instance of {@link IsCourseCoordinatorType } - * - */ - public IsCourseCoordinatorType createIsCourseCoordinatorType() { - return new IsCourseCoordinatorType(); - } - - /** - * Create an instance of {@link IsAcademicStaffType } - * - */ - public IsAcademicStaffType createIsAcademicStaffType() { - return new IsAcademicStaffType(); - } - - /** - * Create an instance of {@link IsTeacherOfType } - * - */ - public IsTeacherOfType createIsTeacherOfType() { - return new IsTeacherOfType(); - } - - /** - * Create an instance of {@link AcTitleType } - * - */ - public AcTitleType createAcTitleType() { - return new AcTitleType(); - } - - /** - * Create an instance of {@link RepresentationPersonType } - * - */ - public RepresentationPersonType createRepresentationPersonType() { - return new RepresentationPersonType(); - } - - /** - * Create an instance of {@link IsStudentType } - * - */ - public IsStudentType createIsStudentType() { - return new IsStudentType(); - } - - /** - * Create an instance of {@link HasDegreeType } - * - */ - public HasDegreeType createHasDegreeType() { - return new HasDegreeType(); - } - - /** - * Create an instance of {@link DiplomaSupplementType } - * - */ - public DiplomaSupplementType createDiplomaSupplementType() { - return new DiplomaSupplementType(); - } - - /** - * Create an instance of {@link HabilitationType } - * - */ - public HabilitationType createHabilitationType() { - return new HabilitationType(); - } - - /** - * Create an instance of {@link TimeRestrictionType } - * - */ - public TimeRestrictionType createTimeRestrictionType() { - return new TimeRestrictionType(); - } - - /** - * Create an instance of {@link Habilitation } - * - */ - public Habilitation createHabilitation() { - return new Habilitation(); - } - - /** - * Create an instance of {@link TransactionLimitRestrictionType } - * - */ - public TransactionLimitRestrictionType createTransactionLimitRestrictionType() { - return new TransactionLimitRestrictionType(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link HabilitationType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "habilitation") - public JAXBElement createHabilitation(HabilitationType value) { - return new JAXBElement(_Habilitation_QNAME, HabilitationType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "spApplication") - public JAXBElement createSpApplication(String value) { - return new JAXBElement(_SpApplication_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "specialisation") - public JAXBElement createSpecialisation(String value) { - return new JAXBElement(_Specialisation_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "AQAA") - public JAXBElement createAQAA(Integer value) { - return new JAXBElement(_AQAA_QNAME, Integer.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link Integer }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "QualityAuthenticationAssuranceLevel") - public JAXBElement createQualityAuthenticationAssuranceLevel(Integer value) { - return new JAXBElement(_QualityAuthenticationAssuranceLevel_QNAME, Integer.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IsAcademicStaffType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "isAcademicStaff") - public JAXBElement createIsAcademicStaff(IsAcademicStaffType value) { - return new JAXBElement(_IsAcademicStaff_QNAME, IsAcademicStaffType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link MandateContentType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "mandateContent") - public JAXBElement createMandateContent(MandateContentType value) { - return new JAXBElement(_MandateContent_QNAME, MandateContentType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CanonicalAddressType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "canonicalRegisteredAddress") - public JAXBElement createCanonicalRegisteredAddress(CanonicalAddressType value) { - return new JAXBElement(_CanonicalRegisteredAddress_QNAME, CanonicalAddressType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "spCountry") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - public JAXBElement createSpCountry(String value) { - return new JAXBElement(_SpCountry_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IsAdminStaffType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "isAdminStaff") - public JAXBElement createIsAdminStaff(IsAdminStaffType value) { - return new JAXBElement(_IsAdminStaff_QNAME, IsAdminStaffType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link Object }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "AttributeValue") - public JAXBElement createAttributeValue(Object value) { - return new JAXBElement(_AttributeValue_QNAME, Object.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "countryCodeAddress") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - public JAXBElement createCountryCodeAddress(String value) { - return new JAXBElement(_CountryCodeAddress_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link HasAccountInBankType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "hasAccountInBank") - public JAXBElement createHasAccountInBank(HasAccountInBankType value) { - return new JAXBElement(_HasAccountInBank_QNAME, HasAccountInBankType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CurrentStudiesType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "currentStudiesSupplement") - public JAXBElement createCurrentStudiesSupplement(CurrentStudiesType value) { - return new JAXBElement(_CurrentStudiesSupplement_QNAME, CurrentStudiesType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RequestedAttributeType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "RequestedAttribute") - public JAXBElement createRequestedAttribute(RequestedAttributeType value) { - return new JAXBElement(_RequestedAttribute_QNAME, RequestedAttributeType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link MandateType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "mandate") - public JAXBElement createMandate(MandateType value) { - return new JAXBElement(_Mandate_QNAME, MandateType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "spSector") - public JAXBElement createSpSector(String value) { - return new JAXBElement(_SpSector_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link HasDegreeType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "hasDegree") - public JAXBElement createHasDegree(HasDegreeType value) { - return new JAXBElement(_HasDegree_QNAME, HasDegreeType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DiplomaSupplementType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "diplomaSupplement") - public JAXBElement createDiplomaSupplement(DiplomaSupplementType value) { - return new JAXBElement(_DiplomaSupplement_QNAME, DiplomaSupplementType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IsStudentType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "isStudent") - public JAXBElement createIsStudent(IsStudentType value) { - return new JAXBElement(_IsStudent_QNAME, IsStudentType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "HCPType") - public JAXBElement createHCPType(String value) { - return new JAXBElement(_HCPType_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RepresentationPersonType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "representationPerson") - public JAXBElement createRepresentationPerson(RepresentationPersonType value) { - return new JAXBElement(_RepresentationPerson_QNAME, RepresentationPersonType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CanonicalAddressType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "canonicalResidenceAddress") - public JAXBElement createCanonicalResidenceAddress(CanonicalAddressType value) { - return new JAXBElement(_CanonicalResidenceAddress_QNAME, CanonicalAddressType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link AcTitleType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "acTitle") - public JAXBElement createAcTitle(AcTitleType value) { - return new JAXBElement(_AcTitle_QNAME, AcTitleType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IsTeacherOfType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "isTeacherOf") - public JAXBElement createIsTeacherOf(IsTeacherOfType value) { - return new JAXBElement(_IsTeacherOf_QNAME, IsTeacherOfType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IsCourseCoordinatorType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "isCourseCoordinator") - public JAXBElement createIsCourseCoordinator(IsCourseCoordinatorType value) { - return new JAXBElement(_IsCourseCoordinator_QNAME, IsCourseCoordinatorType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "CitizenCountryCode") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - public JAXBElement createCitizenCountryCode(String value) { - return new JAXBElement(_CitizenCountryCode_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "study") - public JAXBElement createStudy(String value) { - return new JAXBElement(_Study_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link IsHealthCareProfessionalType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", name = "isHealthCareProfessional") - public JAXBElement createIsHealthCareProfessional(IsHealthCareProfessionalType value) { - return new JAXBElement(_IsHealthCareProfessional_QNAME, IsHealthCareProfessionalType.class, null, value); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/OriginalMandateType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/OriginalMandateType.java deleted file mode 100644 index ddcb6bb19..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/OriginalMandateType.java +++ /dev/null @@ -1,84 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.10.09 at 10:11:43 AM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - *

- * Java class for originalMandateType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="originalMandateType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
- *       <attribute name="mimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "originalMandateType", propOrder = { "value" }) -public class OriginalMandateType { - - @XmlValue - protected byte[] value; - @XmlAttribute(name = "mimeType") - protected String mimeType; - - /** - * Gets the value of the value property. - * - * @return possible object is byte[] - */ - public byte[] getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is byte[] - */ - public void setValue(byte[] value) { - this.value = value; - } - - /** - * Gets the value of the mimeType property. - * - * @return possible object is {@link String } - * - */ - public String getMimeType() { - return mimeType; - } - - /** - * Sets the value of the mimeType property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setMimeType(String value) { - this.mimeType = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/RepresentationPersonType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/RepresentationPersonType.java deleted file mode 100644 index 23046f431..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/RepresentationPersonType.java +++ /dev/null @@ -1,253 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.10.29 at 02:15:24 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for representationPersonType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="representationPersonType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice>
- *         <sequence>
- *           <element name="eIdentifier" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *           <element name="givenName" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *           <element name="surname" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *           <element name="dateOfBirth" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         </sequence>
- *         <sequence>
- *           <element name="eLPIdentifier" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *           <element name="legalName" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *           <element name="textRegisteredAddress" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *           <element name="canonicalRegisteredAddress" type="{urn:eu:stork:names:tc:STORK:1.0:assertion}canonicalAddressType"/>
- *           <element name="legalForm" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         </sequence>
- *       </choice>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "representationPersonType", propOrder = { "eIdentifier", "givenName", "surname", "dateOfBirth", "elpIdentifier", "legalName", "textRegisteredAddress", "canonicalRegisteredAddress", - "legalForm" }) -public class RepresentationPersonType { - - protected String eIdentifier; - protected String givenName; - protected String surname; - protected String dateOfBirth; - @XmlElement(name = "eLPIdentifier") - protected String elpIdentifier; - protected String legalName; - protected String textRegisteredAddress; - protected CanonicalAddressType canonicalRegisteredAddress; - protected String legalForm; - - /** - * Gets the value of the eIdentifier property. - * - * @return possible object is {@link String } - * - */ - public String getEIdentifier() { - return eIdentifier; - } - - /** - * Sets the value of the eIdentifier property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setEIdentifier(String value) { - this.eIdentifier = value; - } - - /** - * Gets the value of the givenName property. - * - * @return possible object is {@link String } - * - */ - public String getGivenName() { - return givenName; - } - - /** - * Sets the value of the givenName property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setGivenName(String value) { - this.givenName = value; - } - - /** - * Gets the value of the surname property. - * - * @return possible object is {@link String } - * - */ - public String getSurname() { - return surname; - } - - /** - * Sets the value of the surname property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setSurname(String value) { - this.surname = value; - } - - /** - * Gets the value of the dateOfBirth property. - * - * @return possible object is {@link String } - * - */ - public String getDateOfBirth() { - return dateOfBirth; - } - - /** - * Sets the value of the dateOfBirth property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDateOfBirth(String value) { - this.dateOfBirth = value; - } - - /** - * Gets the value of the elpIdentifier property. - * - * @return possible object is {@link String } - * - */ - public String getELPIdentifier() { - return elpIdentifier; - } - - /** - * Sets the value of the elpIdentifier property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setELPIdentifier(String value) { - this.elpIdentifier = value; - } - - /** - * Gets the value of the legalName property. - * - * @return possible object is {@link String } - * - */ - public String getLegalName() { - return legalName; - } - - /** - * Sets the value of the legalName property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLegalName(String value) { - this.legalName = value; - } - - /** - * Gets the value of the textRegisteredAddress property. - * - * @return possible object is {@link String } - * - */ - public String getTextRegisteredAddress() { - return textRegisteredAddress; - } - - /** - * Sets the value of the textRegisteredAddress property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTextRegisteredAddress(String value) { - this.textRegisteredAddress = value; - } - - /** - * Gets the value of the canonicalRegisteredAddress property. - * - * @return possible object is {@link CanonicalAddressType } - * - */ - public CanonicalAddressType getCanonicalRegisteredAddress() { - return canonicalRegisteredAddress; - } - - /** - * Sets the value of the canonicalRegisteredAddress property. - * - * @param value - * allowed object is {@link CanonicalAddressType } - * - */ - public void setCanonicalRegisteredAddress(CanonicalAddressType value) { - this.canonicalRegisteredAddress = value; - } - - /** - * Gets the value of the legalForm property. - * - * @return possible object is {@link String } - * - */ - public String getLegalForm() { - return legalForm; - } - - /** - * Sets the value of the legalForm property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLegalForm(String value) { - this.legalForm = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/RequestedAttributeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/RequestedAttributeType.java deleted file mode 100644 index 88146c90d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/RequestedAttributeType.java +++ /dev/null @@ -1,193 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyAttribute; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.namespace.QName; - -/** - *

- * Java class for RequestedAttributeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="RequestedAttributeType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{urn:eu:stork:names:tc:STORK:1.0:assertion}AttributeValue" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="Name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="NameFormat" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="FriendlyName" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="isRequired" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- *       <anyAttribute processContents='lax' namespace='##other'/>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "RequestedAttributeType", propOrder = { "attributeValue" }) -public class RequestedAttributeType { - - @XmlElement(name = "AttributeValue") - protected List attributeValue; - @XmlAttribute(name = "Name", required = true) - protected String name; - @XmlAttribute(name = "NameFormat", required = true) - @XmlSchemaType(name = "anyURI") - protected String nameFormat; - @XmlAttribute(name = "FriendlyName") - protected String friendlyName; - @XmlAttribute(name = "isRequired") - protected Boolean isRequired; - @XmlAnyAttribute - private Map otherAttributes = new HashMap(); - - /** - * Gets the value of the attributeValue property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the attributeValue property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getAttributeValue().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } - * - * - */ - public List getAttributeValue() { - if (attributeValue == null) { - attributeValue = new ArrayList(); - } - return this.attributeValue; - } - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the nameFormat property. - * - * @return possible object is {@link String } - * - */ - public String getNameFormat() { - return nameFormat; - } - - /** - * Sets the value of the nameFormat property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNameFormat(String value) { - this.nameFormat = value; - } - - /** - * Gets the value of the friendlyName property. - * - * @return possible object is {@link String } - * - */ - public String getFriendlyName() { - return friendlyName; - } - - /** - * Sets the value of the friendlyName property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setFriendlyName(String value) { - this.friendlyName = value; - } - - /** - * Gets the value of the isRequired property. - * - * @return possible object is {@link Boolean } - * - */ - public Boolean isIsRequired() { - return isRequired; - } - - /** - * Sets the value of the isRequired property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setIsRequired(Boolean value) { - this.isRequired = value; - } - - /** - * Gets a map that contains attributes that aren't bound to any typed property on this class. - * - *

- * the map is keyed by the name of the attribute and the value is the string value of the attribute. - * - * the map returned by this method is live, and you can add new attribute by updating the map directly. Because of this design, there's no setter. - * - * - * @return always non-null - */ - public Map getOtherAttributes() { - return otherAttributes; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/TimeRestrictionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/TimeRestrictionType.java deleted file mode 100644 index 2ae80c697..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/TimeRestrictionType.java +++ /dev/null @@ -1,92 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.05.12 at 10:04:52 AM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - *

- * Java class for TimeRestrictionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="TimeRestrictionType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="validFrom" type="{http://www.w3.org/2001/XMLSchema}date"/>
- *         <element name="validTo" type="{http://www.w3.org/2001/XMLSchema}date"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TimeRestrictionType", propOrder = { "validFrom", "validTo" }) -public class TimeRestrictionType { - - @XmlElement(required = true) - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar validFrom; - @XmlElement(required = true) - @XmlSchemaType(name = "date") - protected XMLGregorianCalendar validTo; - - /** - * Gets the value of the validFrom property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getValidFrom() { - return validFrom; - } - - /** - * Sets the value of the validFrom property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setValidFrom(XMLGregorianCalendar value) { - this.validFrom = value; - } - - /** - * Gets the value of the validTo property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getValidTo() { - return validTo; - } - - /** - * Sets the value of the validTo property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setValidTo(XMLGregorianCalendar value) { - this.validTo = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/TransactionLimitRestrictionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/TransactionLimitRestrictionType.java deleted file mode 100644 index 39a20c7c2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/TransactionLimitRestrictionType.java +++ /dev/null @@ -1,89 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.05.12 at 10:04:52 AM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for TransactionLimitRestrictionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="TransactionLimitRestrictionType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="amount" type="{http://www.w3.org/2001/XMLSchema}decimal"/>
- *         <element name="currency" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TransactionLimitRestrictionType", propOrder = { "amount", "currency" }) -public class TransactionLimitRestrictionType { - - @XmlElement(required = true) - protected BigDecimal amount; - @XmlElement(required = true) - protected String currency; - - /** - * Gets the value of the amount property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getAmount() { - return amount; - } - - /** - * Sets the value of the amount property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setAmount(BigDecimal value) { - this.amount = value; - } - - /** - * Gets the value of the currency property. - * - * @return possible object is {@link String } - * - */ - public String getCurrency() { - return currency; - } - - /** - * Sets the value of the currency property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCurrency(String value) { - this.currency = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/package-info.java deleted file mode 100644 index 075851135..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_1_0/assertion/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -@javax.xml.bind.annotation.XmlSchema(namespace = "urn:eu:stork:names:tc:STORK:1.0:assertion", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion; - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AdditionalInformationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AdditionalInformationType.java deleted file mode 100644 index c636217ca..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AdditionalInformationType.java +++ /dev/null @@ -1,88 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for AdditionalInformationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AdditionalInformationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="SpecificInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="OtherSources" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AdditionalInformationType", propOrder = { "specificInformation", "otherSources" }) -public class AdditionalInformationType { - - @XmlElement(name = "SpecificInformation") - protected RichTextTagType specificInformation; - @XmlElement(name = "OtherSources") - protected RichTextTagType otherSources; - - /** - * Gets the value of the specificInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getSpecificInformation() { - return specificInformation; - } - - /** - * Sets the value of the specificInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setSpecificInformation(RichTextTagType value) { - this.specificInformation = value; - } - - /** - * Gets the value of the otherSources property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getOtherSources() { - return otherSources; - } - - /** - * Sets the value of the otherSources property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setOtherSources(RichTextTagType value) { - this.otherSources = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AddressType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AddressType.java deleted file mode 100644 index 67ef6d2dc..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AddressType.java +++ /dev/null @@ -1,168 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for AddressType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AddressType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Line" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" maxOccurs="unbounded"/>
- *         <element name="City" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="StateOrRegion" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="PostalCode" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="Country" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CountryTextCodeType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AddressType", propOrder = { "line", "city", "stateOrRegion", "postalCode", "country" }) -public class AddressType { - - @XmlElement(name = "Line", required = true) - protected List line; - @XmlElement(name = "City") - protected String city; - @XmlElement(name = "StateOrRegion") - protected String stateOrRegion; - @XmlElement(name = "PostalCode") - protected String postalCode; - @XmlElement(name = "Country") - protected CountryTextCodeType country; - - /** - * Gets the value of the line property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the line property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getLine().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getLine() { - if (line == null) { - line = new ArrayList(); - } - return this.line; - } - - /** - * Gets the value of the city property. - * - * @return possible object is {@link String } - * - */ - public String getCity() { - return city; - } - - /** - * Sets the value of the city property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCity(String value) { - this.city = value; - } - - /** - * Gets the value of the stateOrRegion property. - * - * @return possible object is {@link String } - * - */ - public String getStateOrRegion() { - return stateOrRegion; - } - - /** - * Sets the value of the stateOrRegion property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStateOrRegion(String value) { - this.stateOrRegion = value; - } - - /** - * Gets the value of the postalCode property. - * - * @return possible object is {@link String } - * - */ - public String getPostalCode() { - return postalCode; - } - - /** - * Sets the value of the postalCode property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setPostalCode(String value) { - this.postalCode = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link CountryTextCodeType } - * - */ - public CountryTextCodeType getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link CountryTextCodeType } - * - */ - public void setCountry(CountryTextCodeType value) { - this.country = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedFileDataType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedFileDataType.java deleted file mode 100644 index f0114d912..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedFileDataType.java +++ /dev/null @@ -1,110 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for AttachedFileDataType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedFileDataType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="Mime" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}MimeType"/>
- *         <element name="Data" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedFileDataType", propOrder = { "description", "mime", "data" }) -public class AttachedFileDataType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlElement(name = "Mime", required = true) - protected MimeType mime; - @XmlElement(name = "Data", required = true) - protected byte[] data; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the mime property. - * - * @return possible object is {@link MimeType } - * - */ - public MimeType getMime() { - return mime; - } - - /** - * Sets the value of the mime property. - * - * @param value - * allowed object is {@link MimeType } - * - */ - public void setMime(MimeType value) { - this.mime = value; - } - - /** - * Gets the value of the data property. - * - * @return possible object is byte[] - */ - public byte[] getData() { - return data; - } - - /** - * Sets the value of the data property. - * - * @param value - * allowed object is byte[] - */ - public void setData(byte[] value) { - this.data = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedFileURLType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedFileURLType.java deleted file mode 100644 index 4e9bf3c4b..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedFileURLType.java +++ /dev/null @@ -1,112 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for AttachedFileURLType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedFileURLType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="Mime" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}MimeType"/>
- *         <element name="URL" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}URLType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedFileURLType", propOrder = { "description", "mime", "url" }) -public class AttachedFileURLType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlElement(name = "Mime", required = true) - protected MimeType mime; - @XmlElement(name = "URL", required = true) - protected String url; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the mime property. - * - * @return possible object is {@link MimeType } - * - */ - public MimeType getMime() { - return mime; - } - - /** - * Sets the value of the mime property. - * - * @param value - * allowed object is {@link MimeType } - * - */ - public void setMime(MimeType value) { - this.mime = value; - } - - /** - * Gets the value of the url property. - * - * @return possible object is {@link String } - * - */ - public String getURL() { - return url; - } - - /** - * Sets the value of the url property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setURL(String value) { - this.url = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedImageDataType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedImageDataType.java deleted file mode 100644 index 61be0a30a..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedImageDataType.java +++ /dev/null @@ -1,110 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for AttachedImageDataType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedImageDataType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="Mime" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ImageMimeType"/>
- *         <element name="Data" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedImageDataType", propOrder = { "description", "mime", "data" }) -public class AttachedImageDataType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlElement(name = "Mime", required = true) - protected ImageMimeType mime; - @XmlElement(name = "Data", required = true) - protected byte[] data; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the mime property. - * - * @return possible object is {@link ImageMimeType } - * - */ - public ImageMimeType getMime() { - return mime; - } - - /** - * Sets the value of the mime property. - * - * @param value - * allowed object is {@link ImageMimeType } - * - */ - public void setMime(ImageMimeType value) { - this.mime = value; - } - - /** - * Gets the value of the data property. - * - * @return possible object is byte[] - */ - public byte[] getData() { - return data; - } - - /** - * Sets the value of the data property. - * - * @param value - * allowed object is byte[] - */ - public void setData(byte[] value) { - this.data = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedImageURLType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedImageURLType.java deleted file mode 100644 index e6c11edda..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedImageURLType.java +++ /dev/null @@ -1,112 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for AttachedImageURLType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedImageURLType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="Mime" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ImageMimeType"/>
- *         <element name="URL" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}URLType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedImageURLType", propOrder = { "description", "mime", "url" }) -public class AttachedImageURLType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlElement(name = "Mime", required = true) - protected ImageMimeType mime; - @XmlElement(name = "URL", required = true) - protected String url; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the mime property. - * - * @return possible object is {@link ImageMimeType } - * - */ - public ImageMimeType getMime() { - return mime; - } - - /** - * Sets the value of the mime property. - * - * @param value - * allowed object is {@link ImageMimeType } - * - */ - public void setMime(ImageMimeType value) { - this.mime = value; - } - - /** - * Gets the value of the url property. - * - * @return possible object is {@link String } - * - */ - public String getURL() { - return url; - } - - /** - * Sets the value of the url property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setURL(String value) { - this.url = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedType.java deleted file mode 100644 index a4e64d560..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachedType.java +++ /dev/null @@ -1,168 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - *

- * Java class for AttachedType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachedType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice>
- *         <element name="FileData" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AttachedFileDataType"/>
- *         <element name="FileURI" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AttachedFileURLType"/>
- *         <element name="ImageData" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AttachedImageDataType"/>
- *         <element name="ImageURI" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AttachedImageURLType"/>
- *       </choice>
- *       <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachedType", propOrder = { "fileData", "fileURI", "imageData", "imageURI" }) -public class AttachedType { - - @XmlElement(name = "FileData") - protected AttachedFileDataType fileData; - @XmlElement(name = "FileURI") - protected AttachedFileURLType fileURI; - @XmlElement(name = "ImageData") - protected AttachedImageDataType imageData; - @XmlElement(name = "ImageURI") - protected AttachedImageURLType imageURI; - @XmlAttribute(name = "attachedID", required = true) - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String attachedID; - - /** - * Gets the value of the fileData property. - * - * @return possible object is {@link AttachedFileDataType } - * - */ - public AttachedFileDataType getFileData() { - return fileData; - } - - /** - * Sets the value of the fileData property. - * - * @param value - * allowed object is {@link AttachedFileDataType } - * - */ - public void setFileData(AttachedFileDataType value) { - this.fileData = value; - } - - /** - * Gets the value of the fileURI property. - * - * @return possible object is {@link AttachedFileURLType } - * - */ - public AttachedFileURLType getFileURI() { - return fileURI; - } - - /** - * Sets the value of the fileURI property. - * - * @param value - * allowed object is {@link AttachedFileURLType } - * - */ - public void setFileURI(AttachedFileURLType value) { - this.fileURI = value; - } - - /** - * Gets the value of the imageData property. - * - * @return possible object is {@link AttachedImageDataType } - * - */ - public AttachedImageDataType getImageData() { - return imageData; - } - - /** - * Sets the value of the imageData property. - * - * @param value - * allowed object is {@link AttachedImageDataType } - * - */ - public void setImageData(AttachedImageDataType value) { - this.imageData = value; - } - - /** - * Gets the value of the imageURI property. - * - * @return possible object is {@link AttachedImageURLType } - * - */ - public AttachedImageURLType getImageURI() { - return imageURI; - } - - /** - * Sets the value of the imageURI property. - * - * @param value - * allowed object is {@link AttachedImageURLType } - * - */ - public void setImageURI(AttachedImageURLType value) { - this.imageURI = value; - } - - /** - * Gets the value of the attachedID property. - * - * @return possible object is {@link String } - * - */ - public String getAttachedID() { - return attachedID; - } - - /** - * Sets the value of the attachedID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAttachedID(String value) { - this.attachedID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachmentsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachmentsType.java deleted file mode 100644 index abb61728a..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/AttachmentsType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for AttachmentsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="AttachmentsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Attached" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AttachedType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "AttachmentsType", propOrder = { "attached" }) -public class AttachmentsType { - - @XmlElement(name = "Attached", required = true) - protected List attached; - - /** - * Gets the value of the attached property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the attached property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getAttached().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link AttachedType } - * - * - */ - public List getAttached() { - if (attached == null) { - attached = new ArrayList(); - } - return this.attached; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CertificationOfTheSupplementType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CertificationOfTheSupplementType.java deleted file mode 100644 index 0ca2d1a02..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CertificationOfTheSupplementType.java +++ /dev/null @@ -1,113 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - *

- * Java class for CertificationOfTheSupplementType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CertificationOfTheSupplementType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CertificationDate" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}DateType" minOccurs="0"/>
- *         <element name="OfficialsCertifying" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}OfficialsCertifyingType" minOccurs="0"/>
- *         <element name="OfficialStamp" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}OfficialStampType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CertificationOfTheSupplementType", propOrder = { "certificationDate", "officialsCertifying", "officialStamp" }) -public class CertificationOfTheSupplementType { - - @XmlElement(name = "CertificationDate") - protected XMLGregorianCalendar certificationDate; - @XmlElement(name = "OfficialsCertifying") - protected OfficialsCertifyingType officialsCertifying; - @XmlElement(name = "OfficialStamp") - protected OfficialStampType officialStamp; - - /** - * Gets the value of the certificationDate property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getCertificationDate() { - return certificationDate; - } - - /** - * Sets the value of the certificationDate property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setCertificationDate(XMLGregorianCalendar value) { - this.certificationDate = value; - } - - /** - * Gets the value of the officialsCertifying property. - * - * @return possible object is {@link OfficialsCertifyingType } - * - */ - public OfficialsCertifyingType getOfficialsCertifying() { - return officialsCertifying; - } - - /** - * Sets the value of the officialsCertifying property. - * - * @param value - * allowed object is {@link OfficialsCertifyingType } - * - */ - public void setOfficialsCertifying(OfficialsCertifyingType value) { - this.officialsCertifying = value; - } - - /** - * Gets the value of the officialStamp property. - * - * @return possible object is {@link OfficialStampType } - * - */ - public OfficialStampType getOfficialStamp() { - return officialStamp; - } - - /** - * Sets the value of the officialStamp property. - * - * @param value - * allowed object is {@link OfficialStampType } - * - */ - public void setOfficialStamp(OfficialStampType value) { - this.officialStamp = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ContactInformationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ContactInformationType.java deleted file mode 100644 index 155849e3f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ContactInformationType.java +++ /dev/null @@ -1,156 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ContactInformationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ContactInformationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Address" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AddressType" minOccurs="0"/>
- *         <element name="PhoneNumber" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="Email" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}EmailAddressType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="WebSite" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}URLType" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ContactInformationType", propOrder = { "address", "phoneNumber", "email", "webSite" }) -public class ContactInformationType { - - @XmlElement(name = "Address") - protected AddressType address; - @XmlElement(name = "PhoneNumber") - protected List phoneNumber; - @XmlElement(name = "Email") - protected List email; - @XmlElement(name = "WebSite") - protected List webSite; - - /** - * Gets the value of the address property. - * - * @return possible object is {@link AddressType } - * - */ - public AddressType getAddress() { - return address; - } - - /** - * Sets the value of the address property. - * - * @param value - * allowed object is {@link AddressType } - * - */ - public void setAddress(AddressType value) { - this.address = value; - } - - /** - * Gets the value of the phoneNumber property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the phoneNumber property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getPhoneNumber().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getPhoneNumber() { - if (phoneNumber == null) { - phoneNumber = new ArrayList(); - } - return this.phoneNumber; - } - - /** - * Gets the value of the email property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the email property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getEmail().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getEmail() { - if (email == null) { - email = new ArrayList(); - } - return this.email; - } - - /** - * Gets the value of the webSite property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the webSite property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getWebSite().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getWebSite() { - if (webSite == null) { - webSite = new ArrayList(); - } - return this.webSite; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CountryTextCodeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CountryTextCodeType.java deleted file mode 100644 index 25aa0d5d2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CountryTextCodeType.java +++ /dev/null @@ -1,86 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - *

- * Java class for CountryTextCodeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CountryTextCodeType">
- *   <simpleContent>
- *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *       <attribute name="country" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CountryType" />
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CountryTextCodeType", propOrder = { "value" }) -public class CountryTextCodeType { - - @XmlValue - protected String value; - @XmlAttribute(name = "country") - protected CountryType country; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link CountryType } - * - */ - public CountryType getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link CountryType } - * - */ - public void setCountry(CountryType value) { - this.country = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CountryType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CountryType.java deleted file mode 100644 index 141788f5b..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CountryType.java +++ /dev/null @@ -1,240 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CountryType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="CountryType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="AD"/>
- *     <enumeration value="AE"/>
- *     <enumeration value="AF"/>
- *     <enumeration value="AG"/>
- *     <enumeration value="AL"/>
- *     <enumeration value="AM"/>
- *     <enumeration value="AO"/>
- *     <enumeration value="AR"/>
- *     <enumeration value="AT"/>
- *     <enumeration value="AU"/>
- *     <enumeration value="AZ"/>
- *     <enumeration value="BA"/>
- *     <enumeration value="BB"/>
- *     <enumeration value="BD"/>
- *     <enumeration value="BE"/>
- *     <enumeration value="BF"/>
- *     <enumeration value="BG"/>
- *     <enumeration value="BH"/>
- *     <enumeration value="BI"/>
- *     <enumeration value="BJ"/>
- *     <enumeration value="BN"/>
- *     <enumeration value="BO"/>
- *     <enumeration value="BR"/>
- *     <enumeration value="BS"/>
- *     <enumeration value="BT"/>
- *     <enumeration value="BW"/>
- *     <enumeration value="BY"/>
- *     <enumeration value="BZ"/>
- *     <enumeration value="CA"/>
- *     <enumeration value="CD"/>
- *     <enumeration value="CF"/>
- *     <enumeration value="CG"/>
- *     <enumeration value="CH"/>
- *     <enumeration value="CI"/>
- *     <enumeration value="CL"/>
- *     <enumeration value="CM"/>
- *     <enumeration value="CN"/>
- *     <enumeration value="CO"/>
- *     <enumeration value="CR"/>
- *     <enumeration value="CU"/>
- *     <enumeration value="CV"/>
- *     <enumeration value="CY"/>
- *     <enumeration value="CZ"/>
- *     <enumeration value="DE"/>
- *     <enumeration value="DJ"/>
- *     <enumeration value="DK"/>
- *     <enumeration value="DM"/>
- *     <enumeration value="DO"/>
- *     <enumeration value="DZ"/>
- *     <enumeration value="EC"/>
- *     <enumeration value="EE"/>
- *     <enumeration value="EG"/>
- *     <enumeration value="ER"/>
- *     <enumeration value="ES"/>
- *     <enumeration value="ET"/>
- *     <enumeration value="FI"/>
- *     <enumeration value="FJ"/>
- *     <enumeration value="FM"/>
- *     <enumeration value="FR"/>
- *     <enumeration value="GA"/>
- *     <enumeration value="GB"/>
- *     <enumeration value="GD"/>
- *     <enumeration value="GE"/>
- *     <enumeration value="GH"/>
- *     <enumeration value="GL"/>
- *     <enumeration value="GM"/>
- *     <enumeration value="GN"/>
- *     <enumeration value="GQ"/>
- *     <enumeration value="GR"/>
- *     <enumeration value="GT"/>
- *     <enumeration value="GW"/>
- *     <enumeration value="GY"/>
- *     <enumeration value="HN"/>
- *     <enumeration value="HR"/>
- *     <enumeration value="HT"/>
- *     <enumeration value="HU"/>
- *     <enumeration value="ID"/>
- *     <enumeration value="IE"/>
- *     <enumeration value="IL"/>
- *     <enumeration value="IN"/>
- *     <enumeration value="IQ"/>
- *     <enumeration value="IR"/>
- *     <enumeration value="IS"/>
- *     <enumeration value="IT"/>
- *     <enumeration value="JM"/>
- *     <enumeration value="JO"/>
- *     <enumeration value="JP"/>
- *     <enumeration value="KE"/>
- *     <enumeration value="KG"/>
- *     <enumeration value="KH"/>
- *     <enumeration value="KI"/>
- *     <enumeration value="KM"/>
- *     <enumeration value="KN"/>
- *     <enumeration value="KP"/>
- *     <enumeration value="KR"/>
- *     <enumeration value="KW"/>
- *     <enumeration value="KZ"/>
- *     <enumeration value="LA"/>
- *     <enumeration value="LB"/>
- *     <enumeration value="LC"/>
- *     <enumeration value="LI"/>
- *     <enumeration value="LK"/>
- *     <enumeration value="LR"/>
- *     <enumeration value="LS"/>
- *     <enumeration value="LT"/>
- *     <enumeration value="LU"/>
- *     <enumeration value="LV"/>
- *     <enumeration value="LY"/>
- *     <enumeration value="MA"/>
- *     <enumeration value="MC"/>
- *     <enumeration value="MD"/>
- *     <enumeration value="ME"/>
- *     <enumeration value="MG"/>
- *     <enumeration value="MH"/>
- *     <enumeration value="MK"/>
- *     <enumeration value="ML"/>
- *     <enumeration value="MM"/>
- *     <enumeration value="MN"/>
- *     <enumeration value="MR"/>
- *     <enumeration value="MT"/>
- *     <enumeration value="MU"/>
- *     <enumeration value="MV"/>
- *     <enumeration value="MW"/>
- *     <enumeration value="MX"/>
- *     <enumeration value="MY"/>
- *     <enumeration value="MZ"/>
- *     <enumeration value="NA"/>
- *     <enumeration value="NE"/>
- *     <enumeration value="NG"/>
- *     <enumeration value="NI"/>
- *     <enumeration value="NL"/>
- *     <enumeration value="NO"/>
- *     <enumeration value="NP"/>
- *     <enumeration value="NR"/>
- *     <enumeration value="NU"/>
- *     <enumeration value="NZ"/>
- *     <enumeration value="OM"/>
- *     <enumeration value="PA"/>
- *     <enumeration value="PE"/>
- *     <enumeration value="PG"/>
- *     <enumeration value="PH"/>
- *     <enumeration value="PK"/>
- *     <enumeration value="PL"/>
- *     <enumeration value="PR"/>
- *     <enumeration value="PS"/>
- *     <enumeration value="PT"/>
- *     <enumeration value="PW"/>
- *     <enumeration value="PY"/>
- *     <enumeration value="QA"/>
- *     <enumeration value="RO"/>
- *     <enumeration value="RS"/>
- *     <enumeration value="RU"/>
- *     <enumeration value="RW"/>
- *     <enumeration value="SA"/>
- *     <enumeration value="SB"/>
- *     <enumeration value="SC"/>
- *     <enumeration value="SD"/>
- *     <enumeration value="SE"/>
- *     <enumeration value="SG"/>
- *     <enumeration value="SI"/>
- *     <enumeration value="SK"/>
- *     <enumeration value="SL"/>
- *     <enumeration value="SM"/>
- *     <enumeration value="SN"/>
- *     <enumeration value="SO"/>
- *     <enumeration value="SR"/>
- *     <enumeration value="ST"/>
- *     <enumeration value="SV"/>
- *     <enumeration value="SY"/>
- *     <enumeration value="SZ"/>
- *     <enumeration value="TD"/>
- *     <enumeration value="TG"/>
- *     <enumeration value="TH"/>
- *     <enumeration value="TJ"/>
- *     <enumeration value="TL"/>
- *     <enumeration value="TM"/>
- *     <enumeration value="TN"/>
- *     <enumeration value="TO"/>
- *     <enumeration value="TR"/>
- *     <enumeration value="TT"/>
- *     <enumeration value="TV"/>
- *     <enumeration value="TZ"/>
- *     <enumeration value="UA"/>
- *     <enumeration value="UG"/>
- *     <enumeration value="US"/>
- *     <enumeration value="UY"/>
- *     <enumeration value="UZ"/>
- *     <enumeration value="VA"/>
- *     <enumeration value="VC"/>
- *     <enumeration value="VE"/>
- *     <enumeration value="VN"/>
- *     <enumeration value="VU"/>
- *     <enumeration value="WS"/>
- *     <enumeration value="YE"/>
- *     <enumeration value="ZA"/>
- *     <enumeration value="ZM"/>
- *     <enumeration value="ZW"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "CountryType") -@XmlEnum -public enum CountryType { - - AD, AE, AF, AG, AL, AM, AO, AR, AT, AU, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BN, BO, BR, BS, BT, BW, BY, BZ, CA, CD, CF, CG, CH, CI, CL, CM, CN, CO, CR, CU, CV, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, ER, ES, ET, FI, FJ, FM, FR, GA, GB, GD, GE, GH, GL, GM, GN, GQ, GR, GT, GW, GY, HN, HR, HT, HU, ID, IE, IL, IN, IQ, IR, IS, IT, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MG, MH, MK, ML, MM, MN, MR, MT, MU, MV, MW, MX, MY, MZ, NA, NE, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PG, PH, PK, PL, PR, PS, PT, PW, PY, QA, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SI, SK, SL, SM, SN, SO, SR, ST, SV, SY, SZ, TD, TG, TH, TJ, TL, TM, TN, TO, TR, TT, TV, TZ, UA, UG, US, UY, UZ, VA, VC, VE, VN, VU, WS, YE, ZA, ZM, ZW; - - public String value() { - return name(); - } - - public static CountryType fromValue(String v) { - return valueOf(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseStructureDiagramType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseStructureDiagramType.java deleted file mode 100644 index 619985a7e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseStructureDiagramType.java +++ /dev/null @@ -1,88 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CourseStructureDiagramType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseStructureDiagramType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CoursesGroups" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CoursesGroupsType" minOccurs="0"/>
- *         <element name="CoursesUnits" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CoursesUnitsType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseStructureDiagramType", propOrder = { "coursesGroups", "coursesUnits" }) -public class CourseStructureDiagramType { - - @XmlElement(name = "CoursesGroups") - protected CoursesGroupsType coursesGroups; - @XmlElement(name = "CoursesUnits") - protected CoursesUnitsType coursesUnits; - - /** - * Gets the value of the coursesGroups property. - * - * @return possible object is {@link CoursesGroupsType } - * - */ - public CoursesGroupsType getCoursesGroups() { - return coursesGroups; - } - - /** - * Sets the value of the coursesGroups property. - * - * @param value - * allowed object is {@link CoursesGroupsType } - * - */ - public void setCoursesGroups(CoursesGroupsType value) { - this.coursesGroups = value; - } - - /** - * Gets the value of the coursesUnits property. - * - * @return possible object is {@link CoursesUnitsType } - * - */ - public CoursesUnitsType getCoursesUnits() { - return coursesUnits; - } - - /** - * Sets the value of the coursesUnits property. - * - * @param value - * allowed object is {@link CoursesUnitsType } - * - */ - public void setCoursesUnits(CoursesUnitsType value) { - this.coursesUnits = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitLanguageOfInstructionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitLanguageOfInstructionType.java deleted file mode 100644 index c531ead90..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitLanguageOfInstructionType.java +++ /dev/null @@ -1,86 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - *

- * Java class for CourseUnitLanguageOfInstructionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitLanguageOfInstructionType">
- *   <simpleContent>
- *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *       <attribute name="language" use="required" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}LanguageType" />
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitLanguageOfInstructionType", propOrder = { "value" }) -public class CourseUnitLanguageOfInstructionType { - - @XmlValue - protected String value; - @XmlAttribute(name = "language", required = true) - protected LanguageType language; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the language property. - * - * @return possible object is {@link LanguageType } - * - */ - public LanguageType getLanguage() { - return language; - } - - /** - * Sets the value of the language property. - * - * @param value - * allowed object is {@link LanguageType } - * - */ - public void setLanguage(LanguageType value) { - this.language = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitLanguagesOfInstructionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitLanguagesOfInstructionType.java deleted file mode 100644 index 5d90755d9..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitLanguagesOfInstructionType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CourseUnitLanguagesOfInstructionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitLanguagesOfInstructionType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Language" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseUnitLanguageOfInstructionType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitLanguagesOfInstructionType", propOrder = { "language" }) -public class CourseUnitLanguagesOfInstructionType { - - @XmlElement(name = "Language", required = true) - protected List language; - - /** - * Gets the value of the language property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the language property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getLanguage().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CourseUnitLanguageOfInstructionType } - * - * - */ - public List getLanguage() { - if (language == null) { - language = new ArrayList(); - } - return this.language; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitStudentPerformanceType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitStudentPerformanceType.java deleted file mode 100644 index 25aaf29da..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitStudentPerformanceType.java +++ /dev/null @@ -1,88 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CourseUnitStudentPerformanceType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitStudentPerformanceType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="LocalGrade" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}LocalGradeType"/>
- *         <element name="ECTSGrade" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ECTSGradingScaleType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitStudentPerformanceType", propOrder = { "localGrade", "ectsGrade" }) -public class CourseUnitStudentPerformanceType { - - @XmlElement(name = "LocalGrade", required = true) - protected LocalGradeType localGrade; - @XmlElement(name = "ECTSGrade") - protected ECTSGradingScaleType ectsGrade; - - /** - * Gets the value of the localGrade property. - * - * @return possible object is {@link LocalGradeType } - * - */ - public LocalGradeType getLocalGrade() { - return localGrade; - } - - /** - * Sets the value of the localGrade property. - * - * @param value - * allowed object is {@link LocalGradeType } - * - */ - public void setLocalGrade(LocalGradeType value) { - this.localGrade = value; - } - - /** - * Gets the value of the ectsGrade property. - * - * @return possible object is {@link ECTSGradingScaleType } - * - */ - public ECTSGradingScaleType getECTSGrade() { - return ectsGrade; - } - - /** - * Sets the value of the ectsGrade property. - * - * @param value - * allowed object is {@link ECTSGradingScaleType } - * - */ - public void setECTSGrade(ECTSGradingScaleType value) { - this.ectsGrade = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitType.java deleted file mode 100644 index 925f89d3a..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitType.java +++ /dev/null @@ -1,1045 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - *

- * Java class for CourseUnitType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Code" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="ScientificArea" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="Title" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="Theme" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="Type" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="type" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseUnitTypeType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="YearOfStudy" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="year" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="Level" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="eheaFramework" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}EHEAFrameworkType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="ECTSCredits" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" minOccurs="0"/>
- *         <element name="LocalCredits" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" minOccurs="0"/>
- *         <element name="Hours" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" minOccurs="0"/>
- *         <element name="LanguagesOfInstruction" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseUnitLanguagesOfInstructionType" minOccurs="0"/>
- *         <element name="ModeOfDelivery" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="modeOfDelivery" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ModeOfDeliveryType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="WorkPlacements" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseUnitWorkPlacementsType" minOccurs="0"/>
- *         <element name="StudentPerformance" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseUnitStudentPerformanceType" minOccurs="0"/>
- *         <element name="NameOfLecturers" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="LearningOutcomes" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="PrerequisitesAndCorequisites" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="PrerequisitesScholarshipLevel" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="PrerequisitesOtherTitles" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="RecomendedOptionalProgrammeComponents" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="CourseContents" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="RecomendedOrRequiredReading" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="PlanedLearningActivitiesAndTeachingMethod" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="AssesmentMethodsAndCriteria" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="Observations" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="groupID" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="institutionAdministeringStudiesID" type="{http://www.w3.org/2001/XMLSchema}string" default="DEF-IAS" />
- *       <attribute name="isRequiredByTheProgramme" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitType", propOrder = { "code", "scientificArea", "title", "theme", "type", "yearOfStudy", "level", "ectsCredits", "localCredits", "hours", "languagesOfInstruction", - "modeOfDelivery", "workPlacements", "studentPerformance", "nameOfLecturers", "learningOutcomes", "prerequisitesAndCorequisites", "prerequisitesScholarshipLevel", "prerequisitesOtherTitles", - "recomendedOptionalProgrammeComponents", "courseContents", "recomendedOrRequiredReading", "planedLearningActivitiesAndTeachingMethod", "assesmentMethodsAndCriteria", "observations" }) -public class CourseUnitType { - - @XmlElement(name = "Code") - protected String code; - @XmlElement(name = "ScientificArea") - protected String scientificArea; - @XmlElement(name = "Title", required = true) - protected String title; - @XmlElement(name = "Theme") - protected String theme; - @XmlElement(name = "Type") - protected CourseUnitType.Type type; - @XmlElement(name = "YearOfStudy") - protected CourseUnitType.YearOfStudy yearOfStudy; - @XmlElement(name = "Level") - protected CourseUnitType.Level level; - @XmlElement(name = "ECTSCredits") - protected BigDecimal ectsCredits; - @XmlElement(name = "LocalCredits") - protected BigDecimal localCredits; - @XmlElement(name = "Hours") - protected BigDecimal hours; - @XmlElement(name = "LanguagesOfInstruction") - protected CourseUnitLanguagesOfInstructionType languagesOfInstruction; - @XmlElement(name = "ModeOfDelivery") - protected CourseUnitType.ModeOfDelivery modeOfDelivery; - @XmlElement(name = "WorkPlacements") - protected CourseUnitWorkPlacementsType workPlacements; - @XmlElement(name = "StudentPerformance") - protected CourseUnitStudentPerformanceType studentPerformance; - @XmlElement(name = "NameOfLecturers") - protected RichTextTagType nameOfLecturers; - @XmlElement(name = "LearningOutcomes") - protected RichTextTagType learningOutcomes; - @XmlElement(name = "PrerequisitesAndCorequisites") - protected RichTextTagType prerequisitesAndCorequisites; - @XmlElement(name = "PrerequisitesScholarshipLevel") - protected RichTextTagType prerequisitesScholarshipLevel; - @XmlElement(name = "PrerequisitesOtherTitles") - protected RichTextTagType prerequisitesOtherTitles; - @XmlElement(name = "RecomendedOptionalProgrammeComponents") - protected RichTextTagType recomendedOptionalProgrammeComponents; - @XmlElement(name = "CourseContents") - protected RichTextTagType courseContents; - @XmlElement(name = "RecomendedOrRequiredReading") - protected RichTextTagType recomendedOrRequiredReading; - @XmlElement(name = "PlanedLearningActivitiesAndTeachingMethod") - protected RichTextTagType planedLearningActivitiesAndTeachingMethod; - @XmlElement(name = "AssesmentMethodsAndCriteria") - protected RichTextTagType assesmentMethodsAndCriteria; - @XmlElement(name = "Observations") - protected RichTextTagType observations; - @XmlAttribute(name = "groupID") - protected String groupID; - @XmlAttribute(name = "institutionAdministeringStudiesID") - protected String institutionAdministeringStudiesID; - @XmlAttribute(name = "isRequiredByTheProgramme") - protected Boolean isRequiredByTheProgramme; - - /** - * Gets the value of the code property. - * - * @return possible object is {@link String } - * - */ - public String getCode() { - return code; - } - - /** - * Sets the value of the code property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCode(String value) { - this.code = value; - } - - /** - * Gets the value of the scientificArea property. - * - * @return possible object is {@link String } - * - */ - public String getScientificArea() { - return scientificArea; - } - - /** - * Sets the value of the scientificArea property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setScientificArea(String value) { - this.scientificArea = value; - } - - /** - * Gets the value of the title property. - * - * @return possible object is {@link String } - * - */ - public String getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTitle(String value) { - this.title = value; - } - - /** - * Gets the value of the theme property. - * - * @return possible object is {@link String } - * - */ - public String getTheme() { - return theme; - } - - /** - * Sets the value of the theme property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTheme(String value) { - this.theme = value; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link CourseUnitType.Type } - * - */ - public CourseUnitType.Type getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link CourseUnitType.Type } - * - */ - public void setType(CourseUnitType.Type value) { - this.type = value; - } - - /** - * Gets the value of the yearOfStudy property. - * - * @return possible object is {@link CourseUnitType.YearOfStudy } - * - */ - public CourseUnitType.YearOfStudy getYearOfStudy() { - return yearOfStudy; - } - - /** - * Sets the value of the yearOfStudy property. - * - * @param value - * allowed object is {@link CourseUnitType.YearOfStudy } - * - */ - public void setYearOfStudy(CourseUnitType.YearOfStudy value) { - this.yearOfStudy = value; - } - - /** - * Gets the value of the level property. - * - * @return possible object is {@link CourseUnitType.Level } - * - */ - public CourseUnitType.Level getLevel() { - return level; - } - - /** - * Sets the value of the level property. - * - * @param value - * allowed object is {@link CourseUnitType.Level } - * - */ - public void setLevel(CourseUnitType.Level value) { - this.level = value; - } - - /** - * Gets the value of the ectsCredits property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getECTSCredits() { - return ectsCredits; - } - - /** - * Sets the value of the ectsCredits property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setECTSCredits(BigDecimal value) { - this.ectsCredits = value; - } - - /** - * Gets the value of the localCredits property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getLocalCredits() { - return localCredits; - } - - /** - * Sets the value of the localCredits property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setLocalCredits(BigDecimal value) { - this.localCredits = value; - } - - /** - * Gets the value of the hours property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getHours() { - return hours; - } - - /** - * Sets the value of the hours property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setHours(BigDecimal value) { - this.hours = value; - } - - /** - * Gets the value of the languagesOfInstruction property. - * - * @return possible object is {@link CourseUnitLanguagesOfInstructionType } - * - */ - public CourseUnitLanguagesOfInstructionType getLanguagesOfInstruction() { - return languagesOfInstruction; - } - - /** - * Sets the value of the languagesOfInstruction property. - * - * @param value - * allowed object is {@link CourseUnitLanguagesOfInstructionType } - * - */ - public void setLanguagesOfInstruction(CourseUnitLanguagesOfInstructionType value) { - this.languagesOfInstruction = value; - } - - /** - * Gets the value of the modeOfDelivery property. - * - * @return possible object is {@link CourseUnitType.ModeOfDelivery } - * - */ - public CourseUnitType.ModeOfDelivery getModeOfDelivery() { - return modeOfDelivery; - } - - /** - * Sets the value of the modeOfDelivery property. - * - * @param value - * allowed object is {@link CourseUnitType.ModeOfDelivery } - * - */ - public void setModeOfDelivery(CourseUnitType.ModeOfDelivery value) { - this.modeOfDelivery = value; - } - - /** - * Gets the value of the workPlacements property. - * - * @return possible object is {@link CourseUnitWorkPlacementsType } - * - */ - public CourseUnitWorkPlacementsType getWorkPlacements() { - return workPlacements; - } - - /** - * Sets the value of the workPlacements property. - * - * @param value - * allowed object is {@link CourseUnitWorkPlacementsType } - * - */ - public void setWorkPlacements(CourseUnitWorkPlacementsType value) { - this.workPlacements = value; - } - - /** - * Gets the value of the studentPerformance property. - * - * @return possible object is {@link CourseUnitStudentPerformanceType } - * - */ - public CourseUnitStudentPerformanceType getStudentPerformance() { - return studentPerformance; - } - - /** - * Sets the value of the studentPerformance property. - * - * @param value - * allowed object is {@link CourseUnitStudentPerformanceType } - * - */ - public void setStudentPerformance(CourseUnitStudentPerformanceType value) { - this.studentPerformance = value; - } - - /** - * Gets the value of the nameOfLecturers property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getNameOfLecturers() { - return nameOfLecturers; - } - - /** - * Sets the value of the nameOfLecturers property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setNameOfLecturers(RichTextTagType value) { - this.nameOfLecturers = value; - } - - /** - * Gets the value of the learningOutcomes property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getLearningOutcomes() { - return learningOutcomes; - } - - /** - * Sets the value of the learningOutcomes property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setLearningOutcomes(RichTextTagType value) { - this.learningOutcomes = value; - } - - /** - * Gets the value of the prerequisitesAndCorequisites property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getPrerequisitesAndCorequisites() { - return prerequisitesAndCorequisites; - } - - /** - * Sets the value of the prerequisitesAndCorequisites property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setPrerequisitesAndCorequisites(RichTextTagType value) { - this.prerequisitesAndCorequisites = value; - } - - /** - * Gets the value of the prerequisitesScholarshipLevel property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getPrerequisitesScholarshipLevel() { - return prerequisitesScholarshipLevel; - } - - /** - * Sets the value of the prerequisitesScholarshipLevel property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setPrerequisitesScholarshipLevel(RichTextTagType value) { - this.prerequisitesScholarshipLevel = value; - } - - /** - * Gets the value of the prerequisitesOtherTitles property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getPrerequisitesOtherTitles() { - return prerequisitesOtherTitles; - } - - /** - * Sets the value of the prerequisitesOtherTitles property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setPrerequisitesOtherTitles(RichTextTagType value) { - this.prerequisitesOtherTitles = value; - } - - /** - * Gets the value of the recomendedOptionalProgrammeComponents property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getRecomendedOptionalProgrammeComponents() { - return recomendedOptionalProgrammeComponents; - } - - /** - * Sets the value of the recomendedOptionalProgrammeComponents property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setRecomendedOptionalProgrammeComponents(RichTextTagType value) { - this.recomendedOptionalProgrammeComponents = value; - } - - /** - * Gets the value of the courseContents property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getCourseContents() { - return courseContents; - } - - /** - * Sets the value of the courseContents property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setCourseContents(RichTextTagType value) { - this.courseContents = value; - } - - /** - * Gets the value of the recomendedOrRequiredReading property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getRecomendedOrRequiredReading() { - return recomendedOrRequiredReading; - } - - /** - * Sets the value of the recomendedOrRequiredReading property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setRecomendedOrRequiredReading(RichTextTagType value) { - this.recomendedOrRequiredReading = value; - } - - /** - * Gets the value of the planedLearningActivitiesAndTeachingMethod property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getPlanedLearningActivitiesAndTeachingMethod() { - return planedLearningActivitiesAndTeachingMethod; - } - - /** - * Sets the value of the planedLearningActivitiesAndTeachingMethod property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setPlanedLearningActivitiesAndTeachingMethod(RichTextTagType value) { - this.planedLearningActivitiesAndTeachingMethod = value; - } - - /** - * Gets the value of the assesmentMethodsAndCriteria property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAssesmentMethodsAndCriteria() { - return assesmentMethodsAndCriteria; - } - - /** - * Sets the value of the assesmentMethodsAndCriteria property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAssesmentMethodsAndCriteria(RichTextTagType value) { - this.assesmentMethodsAndCriteria = value; - } - - /** - * Gets the value of the observations property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getObservations() { - return observations; - } - - /** - * Sets the value of the observations property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setObservations(RichTextTagType value) { - this.observations = value; - } - - /** - * Gets the value of the groupID property. - * - * @return possible object is {@link String } - * - */ - public String getGroupID() { - return groupID; - } - - /** - * Sets the value of the groupID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setGroupID(String value) { - this.groupID = value; - } - - /** - * Gets the value of the institutionAdministeringStudiesID property. - * - * @return possible object is {@link String } - * - */ - public String getInstitutionAdministeringStudiesID() { - if (institutionAdministeringStudiesID == null) { - return "DEF-IAS"; - } else { - return institutionAdministeringStudiesID; - } - } - - /** - * Sets the value of the institutionAdministeringStudiesID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setInstitutionAdministeringStudiesID(String value) { - this.institutionAdministeringStudiesID = value; - } - - /** - * Gets the value of the isRequiredByTheProgramme property. - * - * @return possible object is {@link Boolean } - * - */ - public boolean isIsRequiredByTheProgramme() { - if (isRequiredByTheProgramme == null) { - return true; - } else { - return isRequiredByTheProgramme; - } - } - - /** - * Sets the value of the isRequiredByTheProgramme property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setIsRequiredByTheProgramme(Boolean value) { - this.isRequiredByTheProgramme = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="eheaFramework" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}EHEAFrameworkType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Level { - - @XmlValue - protected String value; - @XmlAttribute(name = "eheaFramework") - protected EHEAFrameworkType eheaFramework; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the eheaFramework property. - * - * @return possible object is {@link EHEAFrameworkType } - * - */ - public EHEAFrameworkType getEheaFramework() { - return eheaFramework; - } - - /** - * Sets the value of the eheaFramework property. - * - * @param value - * allowed object is {@link EHEAFrameworkType } - * - */ - public void setEheaFramework(EHEAFrameworkType value) { - this.eheaFramework = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="modeOfDelivery" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ModeOfDeliveryType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class ModeOfDelivery { - - @XmlValue - protected String value; - @XmlAttribute(name = "modeOfDelivery") - protected ModeOfDeliveryType modeOfDelivery; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the modeOfDelivery property. - * - * @return possible object is {@link ModeOfDeliveryType } - * - */ - public ModeOfDeliveryType getModeOfDelivery() { - return modeOfDelivery; - } - - /** - * Sets the value of the modeOfDelivery property. - * - * @param value - * allowed object is {@link ModeOfDeliveryType } - * - */ - public void setModeOfDelivery(ModeOfDeliveryType value) { - this.modeOfDelivery = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="type" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseUnitTypeType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Type { - - @XmlValue - protected String value; - @XmlAttribute(name = "type") - protected CourseUnitTypeType type; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link CourseUnitTypeType } - * - */ - public CourseUnitTypeType getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link CourseUnitTypeType } - * - */ - public void setType(CourseUnitTypeType value) { - this.type = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="year" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class YearOfStudy { - - @XmlValue - protected String value; - @XmlAttribute(name = "year") - protected BigDecimal year; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the year property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getYear() { - return year; - } - - /** - * Sets the value of the year property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setYear(BigDecimal value) { - this.year = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitTypeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitTypeType.java deleted file mode 100644 index 33b5563df..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitTypeType.java +++ /dev/null @@ -1,58 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CourseUnitTypeType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="CourseUnitTypeType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="Compulsory"/>
- *     <enumeration value="Optional"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "CourseUnitTypeType") -@XmlEnum -public enum CourseUnitTypeType { - - @XmlEnumValue("Compulsory") - COMPULSORY("Compulsory"), @XmlEnumValue("Optional") - OPTIONAL("Optional"); - private final String value; - - CourseUnitTypeType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static CourseUnitTypeType fromValue(String v) { - for (CourseUnitTypeType c : CourseUnitTypeType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitWorkPlacementType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitWorkPlacementType.java deleted file mode 100644 index 2694f4582..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitWorkPlacementType.java +++ /dev/null @@ -1,138 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - *

- * Java class for CourseUnitWorkPlacementType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitWorkPlacementType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CollaboratingInstitution" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="DateFrom" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}DateType" minOccurs="0"/>
- *         <element name="DateTo" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}DateType" minOccurs="0"/>
- *         <element name="TrainingHours" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitWorkPlacementType", propOrder = { "collaboratingInstitution", "dateFrom", "dateTo", "trainingHours" }) -public class CourseUnitWorkPlacementType { - - @XmlElement(name = "CollaboratingInstitution", required = true) - protected String collaboratingInstitution; - @XmlElement(name = "DateFrom") - protected XMLGregorianCalendar dateFrom; - @XmlElement(name = "DateTo") - protected XMLGregorianCalendar dateTo; - @XmlElement(name = "TrainingHours") - protected BigDecimal trainingHours; - - /** - * Gets the value of the collaboratingInstitution property. - * - * @return possible object is {@link String } - * - */ - public String getCollaboratingInstitution() { - return collaboratingInstitution; - } - - /** - * Sets the value of the collaboratingInstitution property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCollaboratingInstitution(String value) { - this.collaboratingInstitution = value; - } - - /** - * Gets the value of the dateFrom property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateFrom() { - return dateFrom; - } - - /** - * Sets the value of the dateFrom property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateFrom(XMLGregorianCalendar value) { - this.dateFrom = value; - } - - /** - * Gets the value of the dateTo property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateTo() { - return dateTo; - } - - /** - * Sets the value of the dateTo property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateTo(XMLGregorianCalendar value) { - this.dateTo = value; - } - - /** - * Gets the value of the trainingHours property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getTrainingHours() { - return trainingHours; - } - - /** - * Sets the value of the trainingHours property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setTrainingHours(BigDecimal value) { - this.trainingHours = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitWorkPlacementsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitWorkPlacementsType.java deleted file mode 100644 index 28468d0b9..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CourseUnitWorkPlacementsType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CourseUnitWorkPlacementsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CourseUnitWorkPlacementsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="WorkPlacement" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseUnitWorkPlacementType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CourseUnitWorkPlacementsType", propOrder = { "workPlacement" }) -public class CourseUnitWorkPlacementsType { - - @XmlElement(name = "WorkPlacement", required = true) - protected List workPlacement; - - /** - * Gets the value of the workPlacement property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the workPlacement property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getWorkPlacement().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CourseUnitWorkPlacementType } - * - * - */ - public List getWorkPlacement() { - if (workPlacement == null) { - workPlacement = new ArrayList(); - } - return this.workPlacement; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesAttendedInOtherInstitutionInMobilityProgramsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesAttendedInOtherInstitutionInMobilityProgramsType.java deleted file mode 100644 index 6e588acfd..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesAttendedInOtherInstitutionInMobilityProgramsType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CoursesAttendedInOtherInstitutionInMobilityProgramsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CoursesAttendedInOtherInstitutionInMobilityProgramsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="MobilityProgramme" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}MobilityProgrammeType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoursesAttendedInOtherInstitutionInMobilityProgramsType", propOrder = { "mobilityProgramme" }) -public class CoursesAttendedInOtherInstitutionInMobilityProgramsType { - - @XmlElement(name = "MobilityProgramme", required = true) - protected List mobilityProgramme; - - /** - * Gets the value of the mobilityProgramme property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the mobilityProgramme property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getMobilityProgramme().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link MobilityProgrammeType } - * - * - */ - public List getMobilityProgramme() { - if (mobilityProgramme == null) { - mobilityProgramme = new ArrayList(); - } - return this.mobilityProgramme; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesGroupType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesGroupType.java deleted file mode 100644 index f754fce18..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesGroupType.java +++ /dev/null @@ -1,169 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CoursesGroupType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CoursesGroupType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="HeaderInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="CoursesGroup" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CoursesGroupType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="FooterInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="groupID" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoursesGroupType", propOrder = { "name", "headerInformation", "coursesGroup", "footerInformation" }) -public class CoursesGroupType { - - @XmlElement(name = "Name", required = true) - protected String name; - @XmlElement(name = "HeaderInformation") - protected RichTextTagType headerInformation; - @XmlElement(name = "CoursesGroup") - protected List coursesGroup; - @XmlElement(name = "FooterInformation") - protected RichTextTagType footerInformation; - @XmlAttribute(name = "groupID", required = true) - protected String groupID; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the headerInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getHeaderInformation() { - return headerInformation; - } - - /** - * Sets the value of the headerInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setHeaderInformation(RichTextTagType value) { - this.headerInformation = value; - } - - /** - * Gets the value of the coursesGroup property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the coursesGroup property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getCoursesGroup().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CoursesGroupType } - * - * - */ - public List getCoursesGroup() { - if (coursesGroup == null) { - coursesGroup = new ArrayList(); - } - return this.coursesGroup; - } - - /** - * Gets the value of the footerInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getFooterInformation() { - return footerInformation; - } - - /** - * Sets the value of the footerInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setFooterInformation(RichTextTagType value) { - this.footerInformation = value; - } - - /** - * Gets the value of the groupID property. - * - * @return possible object is {@link String } - * - */ - public String getGroupID() { - return groupID; - } - - /** - * Sets the value of the groupID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setGroupID(String value) { - this.groupID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesGroupsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesGroupsType.java deleted file mode 100644 index 00b5cff1e..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesGroupsType.java +++ /dev/null @@ -1,144 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CoursesGroupsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CoursesGroupsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="HeaderInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="CoursesGroup" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CoursesGroupType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element name="FooterInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoursesGroupsType", propOrder = { "name", "headerInformation", "coursesGroup", "footerInformation" }) -public class CoursesGroupsType { - - @XmlElement(name = "Name") - protected String name; - @XmlElement(name = "HeaderInformation") - protected RichTextTagType headerInformation; - @XmlElement(name = "CoursesGroup") - protected List coursesGroup; - @XmlElement(name = "FooterInformation") - protected RichTextTagType footerInformation; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the headerInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getHeaderInformation() { - return headerInformation; - } - - /** - * Sets the value of the headerInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setHeaderInformation(RichTextTagType value) { - this.headerInformation = value; - } - - /** - * Gets the value of the coursesGroup property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the coursesGroup property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getCoursesGroup().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CoursesGroupType } - * - * - */ - public List getCoursesGroup() { - if (coursesGroup == null) { - coursesGroup = new ArrayList(); - } - return this.coursesGroup; - } - - /** - * Gets the value of the footerInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getFooterInformation() { - return footerInformation; - } - - /** - * Sets the value of the footerInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setFooterInformation(RichTextTagType value) { - this.footerInformation = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesUnitsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesUnitsType.java deleted file mode 100644 index 5102810a9..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/CoursesUnitsType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CoursesUnitsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CoursesUnitsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CourseUnit" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseUnitType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CoursesUnitsType", propOrder = { "courseUnit" }) -public class CoursesUnitsType { - - @XmlElement(name = "CourseUnit", required = true) - protected List courseUnit; - - /** - * Gets the value of the courseUnit property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the courseUnit property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getCourseUnit().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link CourseUnitType } - * - * - */ - public List getCourseUnit() { - if (courseUnit == null) { - courseUnit = new ArrayList(); - } - return this.courseUnit; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ECTSGradingScaleType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ECTSGradingScaleType.java deleted file mode 100644 index d126d7294..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ECTSGradingScaleType.java +++ /dev/null @@ -1,50 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ECTSGradingScaleType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="ECTSGradingScaleType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="A"/>
- *     <enumeration value="B"/>
- *     <enumeration value="C"/>
- *     <enumeration value="D"/>
- *     <enumeration value="E"/>
- *     <enumeration value="FX"/>
- *     <enumeration value="F"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "ECTSGradingScaleType") -@XmlEnum -public enum ECTSGradingScaleType { - - A, B, C, D, E, FX, F; - - public String value() { - return name(); - } - - public static ECTSGradingScaleType fromValue(String v) { - return valueOf(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/EHEAFrameworkType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/EHEAFrameworkType.java deleted file mode 100644 index 31b69e907..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/EHEAFrameworkType.java +++ /dev/null @@ -1,60 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for EHEAFrameworkType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="EHEAFrameworkType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="FirstCycle"/>
- *     <enumeration value="SecondCycle"/>
- *     <enumeration value="ThirdCycle"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "EHEAFrameworkType") -@XmlEnum -public enum EHEAFrameworkType { - - @XmlEnumValue("FirstCycle") - FIRST_CYCLE("FirstCycle"), @XmlEnumValue("SecondCycle") - SECOND_CYCLE("SecondCycle"), @XmlEnumValue("ThirdCycle") - THIRD_CYCLE("ThirdCycle"); - private final String value; - - EHEAFrameworkType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static EHEAFrameworkType fromValue(String v) { - for (EHEAFrameworkType c : EHEAFrameworkType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ExtensionContentType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ExtensionContentType.java deleted file mode 100644 index de8f10707..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ExtensionContentType.java +++ /dev/null @@ -1,100 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - -/** - *

- * Java class for ExtensionContentType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ExtensionContentType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence maxOccurs="unbounded" minOccurs="0">
- *         <any processContents='lax'/>
- *       </sequence>
- *       <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}string" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ExtensionContentType", propOrder = { "content" }) -public class ExtensionContentType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "id") - protected String id; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } {@link Element } {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/FamilyNameType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/FamilyNameType.java deleted file mode 100644 index 007ea7bfb..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/FamilyNameType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for FamilyNameType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="FamilyNameType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Surname" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "FamilyNameType", propOrder = { "surname" }) -public class FamilyNameType { - - @XmlElement(name = "Surname", required = true) - protected List surname; - - /** - * Gets the value of the surname property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the surname property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getSurname().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getSurname() { - if (surname == null) { - surname = new ArrayList(); - } - return this.surname; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GenderType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GenderType.java deleted file mode 100644 index 159810298..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GenderType.java +++ /dev/null @@ -1,58 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for GenderType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="GenderType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="Female"/>
- *     <enumeration value="Male"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "GenderType") -@XmlEnum -public enum GenderType { - - @XmlEnumValue("Female") - FEMALE("Female"), @XmlEnumValue("Male") - MALE("Male"); - private final String value; - - GenderType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static GenderType fromValue(String v) { - for (GenderType c : GenderType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GeneralDiplomaType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GeneralDiplomaType.java deleted file mode 100644 index 4dd196d31..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GeneralDiplomaType.java +++ /dev/null @@ -1,365 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig.SignatureType; - -/** - *

- * Java class for GeneralDiplomaType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="GeneralDiplomaType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="InformationIdentifyingTheHolderOfTheQualification" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InformationIdentifyingTheHolderOfTheQualificationType"/>
- *         <element name="InformationIdentifyingTheQualification" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InformationIdentifyingTheQualificationType"/>
- *         <element name="InformationOnTheLevelOfTheQualification" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InformationOnTheLevelOfTheQualificationType" minOccurs="0"/>
- *         <element name="InformationOnTheContentsAndResultsGained" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InformationOnTheContentsAndResultsGainedType" minOccurs="0"/>
- *         <element name="InformationOnTheFunctionOfTheQualification" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InformationOnTheFunctionOfTheQualificationType" minOccurs="0"/>
- *         <element name="AdditionalInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AdditionalInformationType" minOccurs="0"/>
- *         <element name="CertificationOfTheSupplement" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CertificationOfTheSupplementType" minOccurs="0"/>
- *         <element name="InformationOnTheNationalHigherEducationSystem" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="Attachments" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AttachmentsType" minOccurs="0"/>
- *         <element name="ExtensionContent" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ExtensionContentType" maxOccurs="unbounded" minOccurs="0"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Signature" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="language" use="required" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}LanguageType" />
- *       <attribute name="isTheOriginalLanguage" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "GeneralDiplomaType", propOrder = { "informationIdentifyingTheHolderOfTheQualification", "informationIdentifyingTheQualification", "informationOnTheLevelOfTheQualification", - "informationOnTheContentsAndResultsGained", "informationOnTheFunctionOfTheQualification", "additionalInformation", "certificationOfTheSupplement", - "informationOnTheNationalHigherEducationSystem", "attachments", "extensionContent", "signature" }) -public class GeneralDiplomaType { - - @XmlElement(name = "InformationIdentifyingTheHolderOfTheQualification", required = true) - protected InformationIdentifyingTheHolderOfTheQualificationType informationIdentifyingTheHolderOfTheQualification; - @XmlElement(name = "InformationIdentifyingTheQualification", required = true) - protected InformationIdentifyingTheQualificationType informationIdentifyingTheQualification; - @XmlElement(name = "InformationOnTheLevelOfTheQualification") - protected InformationOnTheLevelOfTheQualificationType informationOnTheLevelOfTheQualification; - @XmlElement(name = "InformationOnTheContentsAndResultsGained") - protected InformationOnTheContentsAndResultsGainedType informationOnTheContentsAndResultsGained; - @XmlElement(name = "InformationOnTheFunctionOfTheQualification") - protected InformationOnTheFunctionOfTheQualificationType informationOnTheFunctionOfTheQualification; - @XmlElement(name = "AdditionalInformation") - protected AdditionalInformationType additionalInformation; - @XmlElement(name = "CertificationOfTheSupplement") - protected CertificationOfTheSupplementType certificationOfTheSupplement; - @XmlElement(name = "InformationOnTheNationalHigherEducationSystem") - protected RichTextTagType informationOnTheNationalHigherEducationSystem; - @XmlElement(name = "Attachments") - protected AttachmentsType attachments; - @XmlElement(name = "ExtensionContent") - protected List extensionContent; - @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#") - protected List signature; - @XmlAttribute(name = "language", required = true) - protected LanguageType language; - @XmlAttribute(name = "isTheOriginalLanguage", required = true) - protected boolean isTheOriginalLanguage; - - /** - * Gets the value of the informationIdentifyingTheHolderOfTheQualification property. - * - * @return possible object is {@link InformationIdentifyingTheHolderOfTheQualificationType } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType getInformationIdentifyingTheHolderOfTheQualification() { - return informationIdentifyingTheHolderOfTheQualification; - } - - /** - * Sets the value of the informationIdentifyingTheHolderOfTheQualification property. - * - * @param value - * allowed object is {@link InformationIdentifyingTheHolderOfTheQualificationType } - * - */ - public void setInformationIdentifyingTheHolderOfTheQualification(InformationIdentifyingTheHolderOfTheQualificationType value) { - this.informationIdentifyingTheHolderOfTheQualification = value; - } - - /** - * Gets the value of the informationIdentifyingTheQualification property. - * - * @return possible object is {@link InformationIdentifyingTheQualificationType } - * - */ - public InformationIdentifyingTheQualificationType getInformationIdentifyingTheQualification() { - return informationIdentifyingTheQualification; - } - - /** - * Sets the value of the informationIdentifyingTheQualification property. - * - * @param value - * allowed object is {@link InformationIdentifyingTheQualificationType } - * - */ - public void setInformationIdentifyingTheQualification(InformationIdentifyingTheQualificationType value) { - this.informationIdentifyingTheQualification = value; - } - - /** - * Gets the value of the informationOnTheLevelOfTheQualification property. - * - * @return possible object is {@link InformationOnTheLevelOfTheQualificationType } - * - */ - public InformationOnTheLevelOfTheQualificationType getInformationOnTheLevelOfTheQualification() { - return informationOnTheLevelOfTheQualification; - } - - /** - * Sets the value of the informationOnTheLevelOfTheQualification property. - * - * @param value - * allowed object is {@link InformationOnTheLevelOfTheQualificationType } - * - */ - public void setInformationOnTheLevelOfTheQualification(InformationOnTheLevelOfTheQualificationType value) { - this.informationOnTheLevelOfTheQualification = value; - } - - /** - * Gets the value of the informationOnTheContentsAndResultsGained property. - * - * @return possible object is {@link InformationOnTheContentsAndResultsGainedType } - * - */ - public InformationOnTheContentsAndResultsGainedType getInformationOnTheContentsAndResultsGained() { - return informationOnTheContentsAndResultsGained; - } - - /** - * Sets the value of the informationOnTheContentsAndResultsGained property. - * - * @param value - * allowed object is {@link InformationOnTheContentsAndResultsGainedType } - * - */ - public void setInformationOnTheContentsAndResultsGained(InformationOnTheContentsAndResultsGainedType value) { - this.informationOnTheContentsAndResultsGained = value; - } - - /** - * Gets the value of the informationOnTheFunctionOfTheQualification property. - * - * @return possible object is {@link InformationOnTheFunctionOfTheQualificationType } - * - */ - public InformationOnTheFunctionOfTheQualificationType getInformationOnTheFunctionOfTheQualification() { - return informationOnTheFunctionOfTheQualification; - } - - /** - * Sets the value of the informationOnTheFunctionOfTheQualification property. - * - * @param value - * allowed object is {@link InformationOnTheFunctionOfTheQualificationType } - * - */ - public void setInformationOnTheFunctionOfTheQualification(InformationOnTheFunctionOfTheQualificationType value) { - this.informationOnTheFunctionOfTheQualification = value; - } - - /** - * Gets the value of the additionalInformation property. - * - * @return possible object is {@link AdditionalInformationType } - * - */ - public AdditionalInformationType getAdditionalInformation() { - return additionalInformation; - } - - /** - * Sets the value of the additionalInformation property. - * - * @param value - * allowed object is {@link AdditionalInformationType } - * - */ - public void setAdditionalInformation(AdditionalInformationType value) { - this.additionalInformation = value; - } - - /** - * Gets the value of the certificationOfTheSupplement property. - * - * @return possible object is {@link CertificationOfTheSupplementType } - * - */ - public CertificationOfTheSupplementType getCertificationOfTheSupplement() { - return certificationOfTheSupplement; - } - - /** - * Sets the value of the certificationOfTheSupplement property. - * - * @param value - * allowed object is {@link CertificationOfTheSupplementType } - * - */ - public void setCertificationOfTheSupplement(CertificationOfTheSupplementType value) { - this.certificationOfTheSupplement = value; - } - - /** - * Gets the value of the informationOnTheNationalHigherEducationSystem property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getInformationOnTheNationalHigherEducationSystem() { - return informationOnTheNationalHigherEducationSystem; - } - - /** - * Sets the value of the informationOnTheNationalHigherEducationSystem property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setInformationOnTheNationalHigherEducationSystem(RichTextTagType value) { - this.informationOnTheNationalHigherEducationSystem = value; - } - - /** - * Gets the value of the attachments property. - * - * @return possible object is {@link AttachmentsType } - * - */ - public AttachmentsType getAttachments() { - return attachments; - } - - /** - * Sets the value of the attachments property. - * - * @param value - * allowed object is {@link AttachmentsType } - * - */ - public void setAttachments(AttachmentsType value) { - this.attachments = value; - } - - /** - * Gets the value of the extensionContent property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the extensionContent property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getExtensionContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link ExtensionContentType } - * - * - */ - public List getExtensionContent() { - if (extensionContent == null) { - extensionContent = new ArrayList(); - } - return this.extensionContent; - } - - /** - * Gets the value of the signature property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the signature property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getSignature().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link SignatureType } - * - * - */ - public List getSignature() { - if (signature == null) { - signature = new ArrayList(); - } - return this.signature; - } - - /** - * Gets the value of the language property. - * - * @return possible object is {@link LanguageType } - * - */ - public LanguageType getLanguage() { - return language; - } - - /** - * Sets the value of the language property. - * - * @param value - * allowed object is {@link LanguageType } - * - */ - public void setLanguage(LanguageType value) { - this.language = value; - } - - /** - * Gets the value of the isTheOriginalLanguage property. - * - */ - public boolean isIsTheOriginalLanguage() { - return isTheOriginalLanguage; - } - - /** - * Sets the value of the isTheOriginalLanguage property. - * - */ - public void setIsTheOriginalLanguage(boolean value) { - this.isTheOriginalLanguage = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GivenNameType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GivenNameType.java deleted file mode 100644 index 3818b52e1..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GivenNameType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for GivenNameType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="GivenNameType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "GivenNameType", propOrder = { "name" }) -public class GivenNameType { - - @XmlElement(name = "Name", required = true) - protected List name; - - /** - * Gets the value of the name property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the name property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getName().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } - * - * - */ - public List getName() { - if (name == null) { - name = new ArrayList(); - } - return this.name; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GradingSchemeAndGradeDistributionGuidanceType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GradingSchemeAndGradeDistributionGuidanceType.java deleted file mode 100644 index 471ff3a5f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/GradingSchemeAndGradeDistributionGuidanceType.java +++ /dev/null @@ -1,88 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for GradingSchemeAndGradeDistributionGuidanceType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="GradingSchemeAndGradeDistributionGuidanceType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="GradingScheme" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType"/>
- *         <element name="GradeDistributionGuidance" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "GradingSchemeAndGradeDistributionGuidanceType", propOrder = { "gradingScheme", "gradeDistributionGuidance" }) -public class GradingSchemeAndGradeDistributionGuidanceType { - - @XmlElement(name = "GradingScheme", required = true) - protected RichTextTagType gradingScheme; - @XmlElement(name = "GradeDistributionGuidance") - protected RichTextTagType gradeDistributionGuidance; - - /** - * Gets the value of the gradingScheme property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getGradingScheme() { - return gradingScheme; - } - - /** - * Sets the value of the gradingScheme property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setGradingScheme(RichTextTagType value) { - this.gradingScheme = value; - } - - /** - * Gets the value of the gradeDistributionGuidance property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getGradeDistributionGuidance() { - return gradeDistributionGuidance; - } - - /** - * Sets the value of the gradeDistributionGuidance property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setGradeDistributionGuidance(RichTextTagType value) { - this.gradeDistributionGuidance = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ImageMimeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ImageMimeType.java deleted file mode 100644 index 22d889b67..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ImageMimeType.java +++ /dev/null @@ -1,64 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ImageMimeType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="ImageMimeType">
- *   <restriction base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}MimeType">
- *     <enumeration value="image/gif"/>
- *     <enumeration value="image/jpeg"/>
- *     <enumeration value="image/pjpeg"/>
- *     <enumeration value="image/png"/>
- *     <enumeration value="image/tiff"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "ImageMimeType") -@XmlEnum(MimeType.class) -public enum ImageMimeType { - - @XmlEnumValue("image/gif") - IMAGE_GIF(MimeType.IMAGE_GIF), @XmlEnumValue("image/jpeg") - IMAGE_JPEG(MimeType.IMAGE_JPEG), @XmlEnumValue("image/pjpeg") - IMAGE_PJPEG(MimeType.IMAGE_PJPEG), @XmlEnumValue("image/png") - IMAGE_PNG(MimeType.IMAGE_PNG), @XmlEnumValue("image/tiff") - IMAGE_TIFF(MimeType.IMAGE_TIFF); - private final MimeType value; - - ImageMimeType(MimeType v) { - value = v; - } - - public MimeType value() { - return value; - } - - public static ImageMimeType fromValue(MimeType v) { - for (ImageMimeType c : ImageMimeType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v.toString()); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationIdentifyingTheHolderOfTheQualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationIdentifyingTheHolderOfTheQualificationType.java deleted file mode 100644 index 3443104e3..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationIdentifyingTheHolderOfTheQualificationType.java +++ /dev/null @@ -1,292 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - *

- * Java class for InformationIdentifyingTheHolderOfTheQualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationIdentifyingTheHolderOfTheQualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="FamilyName" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}FamilyNameType"/>
- *         <element name="GivenName" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}GivenNameType"/>
- *         <element name="DateOfBirth" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}DateType" minOccurs="0"/>
- *         <element name="StudentIdentificationNumber" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="CountryOfBirth" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CountryTextCodeType" minOccurs="0"/>
- *         <element name="PlaceOfBirth" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="Gender" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="gender" use="required" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}GenderType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationIdentifyingTheHolderOfTheQualificationType", propOrder = { "familyName", "givenName", "dateOfBirth", "studentIdentificationNumber", "countryOfBirth", "placeOfBirth", - "gender" }) -public class InformationIdentifyingTheHolderOfTheQualificationType { - - @XmlElement(name = "FamilyName", required = true) - protected FamilyNameType familyName; - @XmlElement(name = "GivenName", required = true) - protected GivenNameType givenName; - @XmlElement(name = "DateOfBirth") - protected XMLGregorianCalendar dateOfBirth; - @XmlElement(name = "StudentIdentificationNumber") - protected String studentIdentificationNumber; - @XmlElement(name = "CountryOfBirth") - protected CountryTextCodeType countryOfBirth; - @XmlElement(name = "PlaceOfBirth") - protected String placeOfBirth; - @XmlElement(name = "Gender") - protected InformationIdentifyingTheHolderOfTheQualificationType.Gender gender; - - /** - * Gets the value of the familyName property. - * - * @return possible object is {@link FamilyNameType } - * - */ - public FamilyNameType getFamilyName() { - return familyName; - } - - /** - * Sets the value of the familyName property. - * - * @param value - * allowed object is {@link FamilyNameType } - * - */ - public void setFamilyName(FamilyNameType value) { - this.familyName = value; - } - - /** - * Gets the value of the givenName property. - * - * @return possible object is {@link GivenNameType } - * - */ - public GivenNameType getGivenName() { - return givenName; - } - - /** - * Sets the value of the givenName property. - * - * @param value - * allowed object is {@link GivenNameType } - * - */ - public void setGivenName(GivenNameType value) { - this.givenName = value; - } - - /** - * Gets the value of the dateOfBirth property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateOfBirth() { - return dateOfBirth; - } - - /** - * Sets the value of the dateOfBirth property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateOfBirth(XMLGregorianCalendar value) { - this.dateOfBirth = value; - } - - /** - * Gets the value of the studentIdentificationNumber property. - * - * @return possible object is {@link String } - * - */ - public String getStudentIdentificationNumber() { - return studentIdentificationNumber; - } - - /** - * Sets the value of the studentIdentificationNumber property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStudentIdentificationNumber(String value) { - this.studentIdentificationNumber = value; - } - - /** - * Gets the value of the countryOfBirth property. - * - * @return possible object is {@link CountryTextCodeType } - * - */ - public CountryTextCodeType getCountryOfBirth() { - return countryOfBirth; - } - - /** - * Sets the value of the countryOfBirth property. - * - * @param value - * allowed object is {@link CountryTextCodeType } - * - */ - public void setCountryOfBirth(CountryTextCodeType value) { - this.countryOfBirth = value; - } - - /** - * Gets the value of the placeOfBirth property. - * - * @return possible object is {@link String } - * - */ - public String getPlaceOfBirth() { - return placeOfBirth; - } - - /** - * Sets the value of the placeOfBirth property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setPlaceOfBirth(String value) { - this.placeOfBirth = value; - } - - /** - * Gets the value of the gender property. - * - * @return possible object is {@link InformationIdentifyingTheHolderOfTheQualificationType.Gender } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType.Gender getGender() { - return gender; - } - - /** - * Sets the value of the gender property. - * - * @param value - * allowed object is {@link InformationIdentifyingTheHolderOfTheQualificationType.Gender } - * - */ - public void setGender(InformationIdentifyingTheHolderOfTheQualificationType.Gender value) { - this.gender = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="gender" use="required" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}GenderType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Gender { - - @XmlValue - protected String value; - @XmlAttribute(name = "gender", required = true) - protected GenderType gender; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the gender property. - * - * @return possible object is {@link GenderType } - * - */ - public GenderType getGender() { - return gender; - } - - /** - * Sets the value of the gender property. - * - * @param value - * allowed object is {@link GenderType } - * - */ - public void setGender(GenderType value) { - this.gender = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationIdentifyingTheQualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationIdentifyingTheQualificationType.java deleted file mode 100644 index 6e257e6df..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationIdentifyingTheQualificationType.java +++ /dev/null @@ -1,185 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for InformationIdentifyingTheQualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationIdentifyingTheQualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Qualification" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}QualificationType"/>
- *         <element name="TitleConferred" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}TitleConferredType" minOccurs="0"/>
- *         <element name="MainFieldsOfStudy" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="NameAndStatusOfAwardingInstitution" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}NameAndStatusOfAwardingInstitutionType"/>
- *         <element name="NameAndStatusOfInstitutionAdministeringStudies" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}NameAndStatusOfInstitutionAdministeringStudiesType"/>
- *         <element name="LanguagesOfInstructionAndExamination" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}LanguagesOfInstructionAndExaminationType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationIdentifyingTheQualificationType", propOrder = { "qualification", "titleConferred", "mainFieldsOfStudy", "nameAndStatusOfAwardingInstitution", - "nameAndStatusOfInstitutionAdministeringStudies", "languagesOfInstructionAndExamination" }) -public class InformationIdentifyingTheQualificationType { - - @XmlElement(name = "Qualification", required = true) - protected QualificationType qualification; - @XmlElement(name = "TitleConferred") - protected TitleConferredType titleConferred; - @XmlElement(name = "MainFieldsOfStudy") - protected RichTextTagType mainFieldsOfStudy; - @XmlElement(name = "NameAndStatusOfAwardingInstitution", required = true) - protected NameAndStatusOfAwardingInstitutionType nameAndStatusOfAwardingInstitution; - @XmlElement(name = "NameAndStatusOfInstitutionAdministeringStudies", required = true) - protected NameAndStatusOfInstitutionAdministeringStudiesType nameAndStatusOfInstitutionAdministeringStudies; - @XmlElement(name = "LanguagesOfInstructionAndExamination") - protected LanguagesOfInstructionAndExaminationType languagesOfInstructionAndExamination; - - /** - * Gets the value of the qualification property. - * - * @return possible object is {@link QualificationType } - * - */ - public QualificationType getQualification() { - return qualification; - } - - /** - * Sets the value of the qualification property. - * - * @param value - * allowed object is {@link QualificationType } - * - */ - public void setQualification(QualificationType value) { - this.qualification = value; - } - - /** - * Gets the value of the titleConferred property. - * - * @return possible object is {@link TitleConferredType } - * - */ - public TitleConferredType getTitleConferred() { - return titleConferred; - } - - /** - * Sets the value of the titleConferred property. - * - * @param value - * allowed object is {@link TitleConferredType } - * - */ - public void setTitleConferred(TitleConferredType value) { - this.titleConferred = value; - } - - /** - * Gets the value of the mainFieldsOfStudy property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getMainFieldsOfStudy() { - return mainFieldsOfStudy; - } - - /** - * Sets the value of the mainFieldsOfStudy property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setMainFieldsOfStudy(RichTextTagType value) { - this.mainFieldsOfStudy = value; - } - - /** - * Gets the value of the nameAndStatusOfAwardingInstitution property. - * - * @return possible object is {@link NameAndStatusOfAwardingInstitutionType } - * - */ - public NameAndStatusOfAwardingInstitutionType getNameAndStatusOfAwardingInstitution() { - return nameAndStatusOfAwardingInstitution; - } - - /** - * Sets the value of the nameAndStatusOfAwardingInstitution property. - * - * @param value - * allowed object is {@link NameAndStatusOfAwardingInstitutionType } - * - */ - public void setNameAndStatusOfAwardingInstitution(NameAndStatusOfAwardingInstitutionType value) { - this.nameAndStatusOfAwardingInstitution = value; - } - - /** - * Gets the value of the nameAndStatusOfInstitutionAdministeringStudies property. - * - * @return possible object is {@link NameAndStatusOfInstitutionAdministeringStudiesType } - * - */ - public NameAndStatusOfInstitutionAdministeringStudiesType getNameAndStatusOfInstitutionAdministeringStudies() { - return nameAndStatusOfInstitutionAdministeringStudies; - } - - /** - * Sets the value of the nameAndStatusOfInstitutionAdministeringStudies property. - * - * @param value - * allowed object is {@link NameAndStatusOfInstitutionAdministeringStudiesType } - * - */ - public void setNameAndStatusOfInstitutionAdministeringStudies(NameAndStatusOfInstitutionAdministeringStudiesType value) { - this.nameAndStatusOfInstitutionAdministeringStudies = value; - } - - /** - * Gets the value of the languagesOfInstructionAndExamination property. - * - * @return possible object is {@link LanguagesOfInstructionAndExaminationType } - * - */ - public LanguagesOfInstructionAndExaminationType getLanguagesOfInstructionAndExamination() { - return languagesOfInstructionAndExamination; - } - - /** - * Sets the value of the languagesOfInstructionAndExamination property. - * - * @param value - * allowed object is {@link LanguagesOfInstructionAndExaminationType } - * - */ - public void setLanguagesOfInstructionAndExamination(LanguagesOfInstructionAndExaminationType value) { - this.languagesOfInstructionAndExamination = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheContentsAndResultsGainedType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheContentsAndResultsGainedType.java deleted file mode 100644 index be1d1c670..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheContentsAndResultsGainedType.java +++ /dev/null @@ -1,219 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for InformationOnTheContentsAndResultsGainedType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationOnTheContentsAndResultsGainedType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="ModeOfStudy" minOccurs="0">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
- *                 <attribute name="modeOfStudy" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ModeOfStudyType" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *         <element name="ProgrammeRequirements" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ProgrammeRequirementsType" minOccurs="0"/>
- *         <element name="ProgrammeDetails" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ProgrammeDetailsType" minOccurs="0"/>
- *         <element name="GradingSchemeAndGradeDistributionGuidance" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}GradingSchemeAndGradeDistributionGuidanceType" minOccurs="0"/>
- *         <element name="OverallClassificationOfTheQualification" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationOnTheContentsAndResultsGainedType", propOrder = { "modeOfStudy", "programmeRequirements", "programmeDetails", "gradingSchemeAndGradeDistributionGuidance", - "overallClassificationOfTheQualification" }) -public class InformationOnTheContentsAndResultsGainedType { - - @XmlElement(name = "ModeOfStudy") - protected InformationOnTheContentsAndResultsGainedType.ModeOfStudy modeOfStudy; - @XmlElement(name = "ProgrammeRequirements") - protected ProgrammeRequirementsType programmeRequirements; - @XmlElement(name = "ProgrammeDetails") - protected ProgrammeDetailsType programmeDetails; - @XmlElement(name = "GradingSchemeAndGradeDistributionGuidance") - protected GradingSchemeAndGradeDistributionGuidanceType gradingSchemeAndGradeDistributionGuidance; - @XmlElement(name = "OverallClassificationOfTheQualification") - protected RichTextTagType overallClassificationOfTheQualification; - - /** - * Gets the value of the modeOfStudy property. - * - * @return possible object is {@link InformationOnTheContentsAndResultsGainedType.ModeOfStudy } - * - */ - public InformationOnTheContentsAndResultsGainedType.ModeOfStudy getModeOfStudy() { - return modeOfStudy; - } - - /** - * Sets the value of the modeOfStudy property. - * - * @param value - * allowed object is {@link InformationOnTheContentsAndResultsGainedType.ModeOfStudy } - * - */ - public void setModeOfStudy(InformationOnTheContentsAndResultsGainedType.ModeOfStudy value) { - this.modeOfStudy = value; - } - - /** - * Gets the value of the programmeRequirements property. - * - * @return possible object is {@link ProgrammeRequirementsType } - * - */ - public ProgrammeRequirementsType getProgrammeRequirements() { - return programmeRequirements; - } - - /** - * Sets the value of the programmeRequirements property. - * - * @param value - * allowed object is {@link ProgrammeRequirementsType } - * - */ - public void setProgrammeRequirements(ProgrammeRequirementsType value) { - this.programmeRequirements = value; - } - - /** - * Gets the value of the programmeDetails property. - * - * @return possible object is {@link ProgrammeDetailsType } - * - */ - public ProgrammeDetailsType getProgrammeDetails() { - return programmeDetails; - } - - /** - * Sets the value of the programmeDetails property. - * - * @param value - * allowed object is {@link ProgrammeDetailsType } - * - */ - public void setProgrammeDetails(ProgrammeDetailsType value) { - this.programmeDetails = value; - } - - /** - * Gets the value of the gradingSchemeAndGradeDistributionGuidance property. - * - * @return possible object is {@link GradingSchemeAndGradeDistributionGuidanceType } - * - */ - public GradingSchemeAndGradeDistributionGuidanceType getGradingSchemeAndGradeDistributionGuidance() { - return gradingSchemeAndGradeDistributionGuidance; - } - - /** - * Sets the value of the gradingSchemeAndGradeDistributionGuidance property. - * - * @param value - * allowed object is {@link GradingSchemeAndGradeDistributionGuidanceType } - * - */ - public void setGradingSchemeAndGradeDistributionGuidance(GradingSchemeAndGradeDistributionGuidanceType value) { - this.gradingSchemeAndGradeDistributionGuidance = value; - } - - /** - * Gets the value of the overallClassificationOfTheQualification property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getOverallClassificationOfTheQualification() { - return overallClassificationOfTheQualification; - } - - /** - * Sets the value of the overallClassificationOfTheQualification property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setOverallClassificationOfTheQualification(RichTextTagType value) { - this.overallClassificationOfTheQualification = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
-	 *       <attribute name="modeOfStudy" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ModeOfStudyType" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class ModeOfStudy extends RichTextTagType { - - @XmlAttribute(name = "modeOfStudy") - protected ModeOfStudyType modeOfStudy; - - /** - * Gets the value of the modeOfStudy property. - * - * @return possible object is {@link ModeOfStudyType } - * - */ - public ModeOfStudyType getModeOfStudy() { - return modeOfStudy; - } - - /** - * Sets the value of the modeOfStudy property. - * - * @param value - * allowed object is {@link ModeOfStudyType } - * - */ - public void setModeOfStudy(ModeOfStudyType value) { - this.modeOfStudy = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheFunctionOfTheQualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheFunctionOfTheQualificationType.java deleted file mode 100644 index 87bb10c71..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheFunctionOfTheQualificationType.java +++ /dev/null @@ -1,146 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for InformationOnTheFunctionOfTheQualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationOnTheFunctionOfTheQualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="AccessToFurtherStudy" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="ProfessionalStatus" minOccurs="0">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
- *                 <attribute name="isRegulatedProfession" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationOnTheFunctionOfTheQualificationType", propOrder = { "accessToFurtherStudy", "professionalStatus" }) -public class InformationOnTheFunctionOfTheQualificationType { - - @XmlElement(name = "AccessToFurtherStudy") - protected RichTextTagType accessToFurtherStudy; - @XmlElement(name = "ProfessionalStatus") - protected InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus professionalStatus; - - /** - * Gets the value of the accessToFurtherStudy property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAccessToFurtherStudy() { - return accessToFurtherStudy; - } - - /** - * Sets the value of the accessToFurtherStudy property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAccessToFurtherStudy(RichTextTagType value) { - this.accessToFurtherStudy = value; - } - - /** - * Gets the value of the professionalStatus property. - * - * @return possible object is {@link InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus } - * - */ - public InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus getProfessionalStatus() { - return professionalStatus; - } - - /** - * Sets the value of the professionalStatus property. - * - * @param value - * allowed object is {@link InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus } - * - */ - public void setProfessionalStatus(InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus value) { - this.professionalStatus = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
-	 *       <attribute name="isRegulatedProfession" type="{http://www.w3.org/2001/XMLSchema}boolean" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class ProfessionalStatus extends RichTextTagType { - - @XmlAttribute(name = "isRegulatedProfession") - protected Boolean isRegulatedProfession; - - /** - * Gets the value of the isRegulatedProfession property. - * - * @return possible object is {@link Boolean } - * - */ - public Boolean isIsRegulatedProfession() { - return isRegulatedProfession; - } - - /** - * Sets the value of the isRegulatedProfession property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setIsRegulatedProfession(Boolean value) { - this.isRegulatedProfession = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheLevelOfTheQualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheLevelOfTheQualificationType.java deleted file mode 100644 index c759fdf52..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InformationOnTheLevelOfTheQualificationType.java +++ /dev/null @@ -1,353 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for InformationOnTheLevelOfTheQualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InformationOnTheLevelOfTheQualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Level">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
- *                 <attribute name="isced1997" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ISCED1997Type" />
- *                 <attribute name="isced2011" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ISCED2011Type" />
- *                 <attribute name="eheaFramework" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}EHEAFrameworkType" />
- *                 <attribute name="nfq" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}NFQType" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *         <element name="OfficialLengthOfProgramme">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
- *                 <attribute name="ectsCredits" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" />
- *                 <attribute name="years" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" />
- *                 <attribute name="semesters" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveIntegerType" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *         <element name="AccessRequirements" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InformationOnTheLevelOfTheQualificationType", propOrder = { "level", "officialLengthOfProgramme", "accessRequirements" }) -public class InformationOnTheLevelOfTheQualificationType { - - @XmlElement(name = "Level", required = true) - protected InformationOnTheLevelOfTheQualificationType.Level level; - @XmlElement(name = "OfficialLengthOfProgramme", required = true) - protected InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme officialLengthOfProgramme; - @XmlElement(name = "AccessRequirements") - protected RichTextTagType accessRequirements; - - /** - * Gets the value of the level property. - * - * @return possible object is {@link InformationOnTheLevelOfTheQualificationType.Level } - * - */ - public InformationOnTheLevelOfTheQualificationType.Level getLevel() { - return level; - } - - /** - * Sets the value of the level property. - * - * @param value - * allowed object is {@link InformationOnTheLevelOfTheQualificationType.Level } - * - */ - public void setLevel(InformationOnTheLevelOfTheQualificationType.Level value) { - this.level = value; - } - - /** - * Gets the value of the officialLengthOfProgramme property. - * - * @return possible object is {@link InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme } - * - */ - public InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme getOfficialLengthOfProgramme() { - return officialLengthOfProgramme; - } - - /** - * Sets the value of the officialLengthOfProgramme property. - * - * @param value - * allowed object is {@link InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme } - * - */ - public void setOfficialLengthOfProgramme(InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme value) { - this.officialLengthOfProgramme = value; - } - - /** - * Gets the value of the accessRequirements property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAccessRequirements() { - return accessRequirements; - } - - /** - * Sets the value of the accessRequirements property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAccessRequirements(RichTextTagType value) { - this.accessRequirements = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
-	 *       <attribute name="isced1997" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ISCED1997Type" />
-	 *       <attribute name="isced2011" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ISCED2011Type" />
-	 *       <attribute name="eheaFramework" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}EHEAFrameworkType" />
-	 *       <attribute name="nfq" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}NFQType" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Level extends RichTextTagType { - - @XmlAttribute(name = "isced1997") - protected String isced1997; - @XmlAttribute(name = "isced2011") - protected String isced2011; - @XmlAttribute(name = "eheaFramework") - protected EHEAFrameworkType eheaFramework; - @XmlAttribute(name = "nfq") - protected String nfq; - - /** - * Gets the value of the isced1997 property. - * - * @return possible object is {@link String } - * - */ - public String getIsced1997() { - return isced1997; - } - - /** - * Sets the value of the isced1997 property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setIsced1997(String value) { - this.isced1997 = value; - } - - /** - * Gets the value of the isced2011 property. - * - * @return possible object is {@link String } - * - */ - public String getIsced2011() { - return isced2011; - } - - /** - * Sets the value of the isced2011 property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setIsced2011(String value) { - this.isced2011 = value; - } - - /** - * Gets the value of the eheaFramework property. - * - * @return possible object is {@link EHEAFrameworkType } - * - */ - public EHEAFrameworkType getEheaFramework() { - return eheaFramework; - } - - /** - * Sets the value of the eheaFramework property. - * - * @param value - * allowed object is {@link EHEAFrameworkType } - * - */ - public void setEheaFramework(EHEAFrameworkType value) { - this.eheaFramework = value; - } - - /** - * Gets the value of the nfq property. - * - * @return possible object is {@link String } - * - */ - public String getNfq() { - return nfq; - } - - /** - * Sets the value of the nfq property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNfq(String value) { - this.nfq = value; - } - - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
-	 *       <attribute name="ectsCredits" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" />
-	 *       <attribute name="years" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" />
-	 *       <attribute name="semesters" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveIntegerType" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class OfficialLengthOfProgramme extends RichTextTagType { - - @XmlAttribute(name = "ectsCredits") - protected BigDecimal ectsCredits; - @XmlAttribute(name = "years") - protected BigDecimal years; - @XmlAttribute(name = "semesters") - protected Integer semesters; - - /** - * Gets the value of the ectsCredits property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getEctsCredits() { - return ectsCredits; - } - - /** - * Sets the value of the ectsCredits property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setEctsCredits(BigDecimal value) { - this.ectsCredits = value; - } - - /** - * Gets the value of the years property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getYears() { - return years; - } - - /** - * Sets the value of the years property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setYears(BigDecimal value) { - this.years = value; - } - - /** - * Gets the value of the semesters property. - * - * @return possible object is {@link Integer } - * - */ - public Integer getSemesters() { - return semesters; - } - - /** - * Sets the value of the semesters property. - * - * @param value - * allowed object is {@link Integer } - * - */ - public void setSemesters(Integer value) { - this.semesters = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InstitutionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InstitutionType.java deleted file mode 100644 index c6c27ca5f..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/InstitutionType.java +++ /dev/null @@ -1,321 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlIDREF; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - *

- * Java class for InstitutionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="InstitutionType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="Status" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="Country" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CountryTextCodeType" minOccurs="0"/>
- *         <element name="AdditionalInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *         <element name="ContactInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}ContactInformationType" minOccurs="0"/>
- *         <element name="AttachedImageRef" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *       <attribute name="nationalID" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" />
- *       <attribute name="erasmusID" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "InstitutionType", propOrder = { "name", "status", "country", "additionalInformation", "contactInformation", "attachedImageRef" }) -@XmlSeeAlso({ eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.NameAndStatusOfAwardingInstitutionType.AwardingInstitution.class, - eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies.class }) -public class InstitutionType { - - @XmlElement(name = "Name", required = true) - protected String name; - @XmlElement(name = "Status") - protected String status; - @XmlElement(name = "Country") - protected CountryTextCodeType country; - @XmlElement(name = "AdditionalInformation") - protected RichTextTagType additionalInformation; - @XmlElement(name = "ContactInformation") - protected ContactInformationType contactInformation; - @XmlElement(name = "AttachedImageRef") - protected InstitutionType.AttachedImageRef attachedImageRef; - @XmlAttribute(name = "nationalID") - protected String nationalID; - @XmlAttribute(name = "erasmusID") - protected String erasmusID; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the status property. - * - * @return possible object is {@link String } - * - */ - public String getStatus() { - return status; - } - - /** - * Sets the value of the status property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setStatus(String value) { - this.status = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link CountryTextCodeType } - * - */ - public CountryTextCodeType getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link CountryTextCodeType } - * - */ - public void setCountry(CountryTextCodeType value) { - this.country = value; - } - - /** - * Gets the value of the additionalInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAdditionalInformation() { - return additionalInformation; - } - - /** - * Sets the value of the additionalInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAdditionalInformation(RichTextTagType value) { - this.additionalInformation = value; - } - - /** - * Gets the value of the contactInformation property. - * - * @return possible object is {@link ContactInformationType } - * - */ - public ContactInformationType getContactInformation() { - return contactInformation; - } - - /** - * Sets the value of the contactInformation property. - * - * @param value - * allowed object is {@link ContactInformationType } - * - */ - public void setContactInformation(ContactInformationType value) { - this.contactInformation = value; - } - - /** - * Gets the value of the attachedImageRef property. - * - * @return possible object is {@link InstitutionType.AttachedImageRef } - * - */ - public InstitutionType.AttachedImageRef getAttachedImageRef() { - return attachedImageRef; - } - - /** - * Sets the value of the attachedImageRef property. - * - * @param value - * allowed object is {@link InstitutionType.AttachedImageRef } - * - */ - public void setAttachedImageRef(InstitutionType.AttachedImageRef value) { - this.attachedImageRef = value; - } - - /** - * Gets the value of the nationalID property. - * - * @return possible object is {@link String } - * - */ - public String getNationalID() { - return nationalID; - } - - /** - * Sets the value of the nationalID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNationalID(String value) { - this.nationalID = value; - } - - /** - * Gets the value of the erasmusID property. - * - * @return possible object is {@link String } - * - */ - public String getErasmusID() { - return erasmusID; - } - - /** - * Sets the value of the erasmusID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setErasmusID(String value) { - this.erasmusID = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class AttachedImageRef { - - @XmlValue - protected String value; - @XmlAttribute(name = "attachedID", required = true) - @XmlIDREF - @XmlSchemaType(name = "IDREF") - protected Object attachedID; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the attachedID property. - * - * @return possible object is {@link Object } - * - */ - public Object getAttachedID() { - return attachedID; - } - - /** - * Sets the value of the attachedID property. - * - * @param value - * allowed object is {@link Object } - * - */ - public void setAttachedID(Object value) { - this.attachedID = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LanguageType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LanguageType.java deleted file mode 100644 index 8dcc5c546..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LanguageType.java +++ /dev/null @@ -1,250 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for LanguageType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="LanguageType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="ab"/>
- *     <enumeration value="af"/>
- *     <enumeration value="an"/>
- *     <enumeration value="ar"/>
- *     <enumeration value="as"/>
- *     <enumeration value="az"/>
- *     <enumeration value="be"/>
- *     <enumeration value="bg"/>
- *     <enumeration value="bn"/>
- *     <enumeration value="bo"/>
- *     <enumeration value="br"/>
- *     <enumeration value="bs"/>
- *     <enumeration value="ca"/>
- *     <enumeration value="ce"/>
- *     <enumeration value="co"/>
- *     <enumeration value="cs"/>
- *     <enumeration value="cy"/>
- *     <enumeration value="da"/>
- *     <enumeration value="de"/>
- *     <enumeration value="el"/>
- *     <enumeration value="en"/>
- *     <enumeration value="es"/>
- *     <enumeration value="et"/>
- *     <enumeration value="eu"/>
- *     <enumeration value="fa"/>
- *     <enumeration value="fi"/>
- *     <enumeration value="fj"/>
- *     <enumeration value="fo"/>
- *     <enumeration value="fr"/>
- *     <enumeration value="fy"/>
- *     <enumeration value="ga"/>
- *     <enumeration value="gd"/>
- *     <enumeration value="gl"/>
- *     <enumeration value="gv"/>
- *     <enumeration value="grc"/>
- *     <enumeration value="gsw"/>
- *     <enumeration value="he"/>
- *     <enumeration value="hi"/>
- *     <enumeration value="hr"/>
- *     <enumeration value="ht"/>
- *     <enumeration value="hu"/>
- *     <enumeration value="hy"/>
- *     <enumeration value="id"/>
- *     <enumeration value="is"/>
- *     <enumeration value="it"/>
- *     <enumeration value="ja"/>
- *     <enumeration value="jv"/>
- *     <enumeration value="ka"/>
- *     <enumeration value="kg"/>
- *     <enumeration value="ko"/>
- *     <enumeration value="ku"/>
- *     <enumeration value="kw"/>
- *     <enumeration value="ky"/>
- *     <enumeration value="lb"/>
- *     <enumeration value="li"/>
- *     <enumeration value="ln"/>
- *     <enumeration value="lt"/>
- *     <enumeration value="lv"/>
- *     <enumeration value="mg"/>
- *     <enumeration value="mk"/>
- *     <enumeration value="mn"/>
- *     <enumeration value="mo"/>
- *     <enumeration value="ms"/>
- *     <enumeration value="mt"/>
- *     <enumeration value="my"/>
- *     <enumeration value="nb"/>
- *     <enumeration value="ne"/>
- *     <enumeration value="nl"/>
- *     <enumeration value="nn"/>
- *     <enumeration value="no"/>
- *     <enumeration value="pl"/>
- *     <enumeration value="pt"/>
- *     <enumeration value="rm"/>
- *     <enumeration value="ro"/>
- *     <enumeration value="ru"/>
- *     <enumeration value="sc"/>
- *     <enumeration value="se"/>
- *     <enumeration value="sk"/>
- *     <enumeration value="sl"/>
- *     <enumeration value="so"/>
- *     <enumeration value="sq"/>
- *     <enumeration value="sr"/>
- *     <enumeration value="sv"/>
- *     <enumeration value="sw"/>
- *     <enumeration value="tk"/>
- *     <enumeration value="tr"/>
- *     <enumeration value="ty"/>
- *     <enumeration value="uk"/>
- *     <enumeration value="ur"/>
- *     <enumeration value="uz"/>
- *     <enumeration value="vi"/>
- *     <enumeration value="yi"/>
- *     <enumeration value="zh"/>
- *     <enumeration value="cu"/>
- *     <enumeration value="eo"/>
- *     <enumeration value="la"/>
- *     <enumeration value="oc"/>
- *     <enumeration value="vo"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "LanguageType") -@XmlEnum -public enum LanguageType { - - @XmlEnumValue("ab") - AB("ab"), @XmlEnumValue("af") - AF("af"), @XmlEnumValue("an") - AN("an"), @XmlEnumValue("ar") - AR("ar"), @XmlEnumValue("as") - AS("as"), @XmlEnumValue("az") - AZ("az"), @XmlEnumValue("be") - BE("be"), @XmlEnumValue("bg") - BG("bg"), @XmlEnumValue("bn") - BN("bn"), @XmlEnumValue("bo") - BO("bo"), @XmlEnumValue("br") - BR("br"), @XmlEnumValue("bs") - BS("bs"), @XmlEnumValue("ca") - CA("ca"), @XmlEnumValue("ce") - CE("ce"), @XmlEnumValue("co") - CO("co"), @XmlEnumValue("cs") - CS("cs"), @XmlEnumValue("cy") - CY("cy"), @XmlEnumValue("da") - DA("da"), @XmlEnumValue("de") - DE("de"), @XmlEnumValue("el") - EL("el"), @XmlEnumValue("en") - EN("en"), @XmlEnumValue("es") - ES("es"), @XmlEnumValue("et") - ET("et"), @XmlEnumValue("eu") - EU("eu"), @XmlEnumValue("fa") - FA("fa"), @XmlEnumValue("fi") - FI("fi"), @XmlEnumValue("fj") - FJ("fj"), @XmlEnumValue("fo") - FO("fo"), @XmlEnumValue("fr") - FR("fr"), @XmlEnumValue("fy") - FY("fy"), @XmlEnumValue("ga") - GA("ga"), @XmlEnumValue("gd") - GD("gd"), @XmlEnumValue("gl") - GL("gl"), @XmlEnumValue("gv") - GV("gv"), @XmlEnumValue("grc") - GRC("grc"), @XmlEnumValue("gsw") - GSW("gsw"), @XmlEnumValue("he") - HE("he"), @XmlEnumValue("hi") - HI("hi"), @XmlEnumValue("hr") - HR("hr"), @XmlEnumValue("ht") - HT("ht"), @XmlEnumValue("hu") - HU("hu"), @XmlEnumValue("hy") - HY("hy"), @XmlEnumValue("id") - ID("id"), @XmlEnumValue("is") - IS("is"), @XmlEnumValue("it") - IT("it"), @XmlEnumValue("ja") - JA("ja"), @XmlEnumValue("jv") - JV("jv"), @XmlEnumValue("ka") - KA("ka"), @XmlEnumValue("kg") - KG("kg"), @XmlEnumValue("ko") - KO("ko"), @XmlEnumValue("ku") - KU("ku"), @XmlEnumValue("kw") - KW("kw"), @XmlEnumValue("ky") - KY("ky"), @XmlEnumValue("lb") - LB("lb"), @XmlEnumValue("li") - LI("li"), @XmlEnumValue("ln") - LN("ln"), @XmlEnumValue("lt") - LT("lt"), @XmlEnumValue("lv") - LV("lv"), @XmlEnumValue("mg") - MG("mg"), @XmlEnumValue("mk") - MK("mk"), @XmlEnumValue("mn") - MN("mn"), @XmlEnumValue("mo") - MO("mo"), @XmlEnumValue("ms") - MS("ms"), @XmlEnumValue("mt") - MT("mt"), @XmlEnumValue("my") - MY("my"), @XmlEnumValue("nb") - NB("nb"), @XmlEnumValue("ne") - NE("ne"), @XmlEnumValue("nl") - NL("nl"), @XmlEnumValue("nn") - NN("nn"), @XmlEnumValue("no") - NO("no"), @XmlEnumValue("pl") - PL("pl"), @XmlEnumValue("pt") - PT("pt"), @XmlEnumValue("rm") - RM("rm"), @XmlEnumValue("ro") - RO("ro"), @XmlEnumValue("ru") - RU("ru"), @XmlEnumValue("sc") - SC("sc"), @XmlEnumValue("se") - SE("se"), @XmlEnumValue("sk") - SK("sk"), @XmlEnumValue("sl") - SL("sl"), @XmlEnumValue("so") - SO("so"), @XmlEnumValue("sq") - SQ("sq"), @XmlEnumValue("sr") - SR("sr"), @XmlEnumValue("sv") - SV("sv"), @XmlEnumValue("sw") - SW("sw"), @XmlEnumValue("tk") - TK("tk"), @XmlEnumValue("tr") - TR("tr"), @XmlEnumValue("ty") - TY("ty"), @XmlEnumValue("uk") - UK("uk"), @XmlEnumValue("ur") - UR("ur"), @XmlEnumValue("uz") - UZ("uz"), @XmlEnumValue("vi") - VI("vi"), @XmlEnumValue("yi") - YI("yi"), @XmlEnumValue("zh") - ZH("zh"), @XmlEnumValue("cu") - CU("cu"), @XmlEnumValue("eo") - EO("eo"), @XmlEnumValue("la") - LA("la"), @XmlEnumValue("oc") - OC("oc"), @XmlEnumValue("vo") - VO("vo"); - private final String value; - - LanguageType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static LanguageType fromValue(String v) { - for (LanguageType c : LanguageType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LanguagesOfInstructionAndExaminationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LanguagesOfInstructionAndExaminationType.java deleted file mode 100644 index 1bf2acba6..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LanguagesOfInstructionAndExaminationType.java +++ /dev/null @@ -1,210 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for LanguagesOfInstructionAndExaminationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="LanguagesOfInstructionAndExaminationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Language" maxOccurs="unbounded">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
- *                 <attribute name="language" use="required" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}LanguageType" />
- *                 <attribute name="percent" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PercentType" />
- *                 <attribute name="instruction" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
- *                 <attribute name="examination" type="{http://www.w3.org/2001/XMLSchema}boolean" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "LanguagesOfInstructionAndExaminationType", propOrder = { "language" }) -public class LanguagesOfInstructionAndExaminationType { - - @XmlElement(name = "Language", required = true) - protected List language; - - /** - * Gets the value of the language property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the language property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getLanguage().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link LanguagesOfInstructionAndExaminationType.Language } - * - * - */ - public List getLanguage() { - if (language == null) { - language = new ArrayList(); - } - return this.language; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType">
-	 *       <attribute name="language" use="required" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}LanguageType" />
-	 *       <attribute name="percent" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PercentType" />
-	 *       <attribute name="instruction" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
-	 *       <attribute name="examination" type="{http://www.w3.org/2001/XMLSchema}boolean" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class Language extends RichTextTagType { - - @XmlAttribute(name = "language", required = true) - protected LanguageType language; - @XmlAttribute(name = "percent") - protected BigDecimal percent; - @XmlAttribute(name = "instruction") - protected Boolean instruction; - @XmlAttribute(name = "examination") - protected Boolean examination; - - /** - * Gets the value of the language property. - * - * @return possible object is {@link LanguageType } - * - */ - public LanguageType getLanguage() { - return language; - } - - /** - * Sets the value of the language property. - * - * @param value - * allowed object is {@link LanguageType } - * - */ - public void setLanguage(LanguageType value) { - this.language = value; - } - - /** - * Gets the value of the percent property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getPercent() { - return percent; - } - - /** - * Sets the value of the percent property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setPercent(BigDecimal value) { - this.percent = value; - } - - /** - * Gets the value of the instruction property. - * - * @return possible object is {@link Boolean } - * - */ - public boolean isInstruction() { - if (instruction == null) { - return true; - } else { - return instruction; - } - } - - /** - * Sets the value of the instruction property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setInstruction(Boolean value) { - this.instruction = value; - } - - /** - * Gets the value of the examination property. - * - * @return possible object is {@link Boolean } - * - */ - public Boolean isExamination() { - return examination; - } - - /** - * Sets the value of the examination property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setExamination(Boolean value) { - this.examination = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LocalGradeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LocalGradeType.java deleted file mode 100644 index 24582dc94..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/LocalGradeType.java +++ /dev/null @@ -1,219 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - *

- * Java class for LocalGradeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="LocalGradeType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="AcademicYear" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AcademicYearType" minOccurs="0"/>
- *         <element name="DateIssued" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}DateType" minOccurs="0"/>
- *         <element name="Grade" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="Source" minOccurs="0">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="source" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}SourceGradeType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "LocalGradeType", propOrder = { "academicYear", "dateIssued", "grade", "source" }) -public class LocalGradeType { - - @XmlElement(name = "AcademicYear") - protected String academicYear; - @XmlElement(name = "DateIssued") - protected XMLGregorianCalendar dateIssued; - @XmlElement(name = "Grade", required = true) - protected String grade; - @XmlElement(name = "Source") - protected LocalGradeType.Source source; - - /** - * Gets the value of the academicYear property. - * - * @return possible object is {@link String } - * - */ - public String getAcademicYear() { - return academicYear; - } - - /** - * Sets the value of the academicYear property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAcademicYear(String value) { - this.academicYear = value; - } - - /** - * Gets the value of the dateIssued property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateIssued() { - return dateIssued; - } - - /** - * Sets the value of the dateIssued property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateIssued(XMLGregorianCalendar value) { - this.dateIssued = value; - } - - /** - * Gets the value of the grade property. - * - * @return possible object is {@link String } - * - */ - public String getGrade() { - return grade; - } - - /** - * Sets the value of the grade property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setGrade(String value) { - this.grade = value; - } - - /** - * Gets the value of the source property. - * - * @return possible object is {@link LocalGradeType.Source } - * - */ - public LocalGradeType.Source getSource() { - return source; - } - - /** - * Sets the value of the source property. - * - * @param value - * allowed object is {@link LocalGradeType.Source } - * - */ - public void setSource(LocalGradeType.Source value) { - this.source = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="source" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}SourceGradeType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Source { - - @XmlValue - protected String value; - @XmlAttribute(name = "source") - protected SourceGradeType source; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the source property. - * - * @return possible object is {@link SourceGradeType } - * - */ - public SourceGradeType getSource() { - return source; - } - - /** - * Sets the value of the source property. - * - * @param value - * allowed object is {@link SourceGradeType } - * - */ - public void setSource(SourceGradeType value) { - this.source = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MimeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MimeType.java deleted file mode 100644 index c051cb2b4..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MimeType.java +++ /dev/null @@ -1,68 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for MimeType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="MimeType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="image/gif"/>
- *     <enumeration value="image/jpeg"/>
- *     <enumeration value="image/pjpeg"/>
- *     <enumeration value="image/png"/>
- *     <enumeration value="image/tiff"/>
- *     <enumeration value="text/html"/>
- *     <enumeration value="application/pdf"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "MimeType") -@XmlEnum -public enum MimeType { - - @XmlEnumValue("image/gif") - IMAGE_GIF("image/gif"), @XmlEnumValue("image/jpeg") - IMAGE_JPEG("image/jpeg"), @XmlEnumValue("image/pjpeg") - IMAGE_PJPEG("image/pjpeg"), @XmlEnumValue("image/png") - IMAGE_PNG("image/png"), @XmlEnumValue("image/tiff") - IMAGE_TIFF("image/tiff"), @XmlEnumValue("text/html") - TEXT_HTML("text/html"), @XmlEnumValue("application/pdf") - APPLICATION_PDF("application/pdf"); - private final String value; - - MimeType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static MimeType fromValue(String v) { - for (MimeType c : MimeType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeCourseUnitType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeCourseUnitType.java deleted file mode 100644 index 557473a0c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeCourseUnitType.java +++ /dev/null @@ -1,247 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.math.BigDecimal; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - *

- * Java class for MobilityProgrammeCourseUnitType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="MobilityProgrammeCourseUnitType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Code" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="Title">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="language" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}LanguageType" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *         <element name="ECTSCredits" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PositiveDecimalType" minOccurs="0"/>
- *         <element name="AdditionalInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="isInTheLearningAgreement" type="{http://www.w3.org/2001/XMLSchema}boolean" default="true" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MobilityProgrammeCourseUnitType", propOrder = { "code", "title", "ectsCredits", "additionalInformation" }) -public class MobilityProgrammeCourseUnitType { - - @XmlElement(name = "Code") - protected String code; - @XmlElement(name = "Title", required = true) - protected MobilityProgrammeCourseUnitType.Title title; - @XmlElement(name = "ECTSCredits") - protected BigDecimal ectsCredits; - @XmlElement(name = "AdditionalInformation") - protected RichTextTagType additionalInformation; - @XmlAttribute(name = "isInTheLearningAgreement") - protected Boolean isInTheLearningAgreement; - - /** - * Gets the value of the code property. - * - * @return possible object is {@link String } - * - */ - public String getCode() { - return code; - } - - /** - * Sets the value of the code property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCode(String value) { - this.code = value; - } - - /** - * Gets the value of the title property. - * - * @return possible object is {@link MobilityProgrammeCourseUnitType.Title } - * - */ - public MobilityProgrammeCourseUnitType.Title getTitle() { - return title; - } - - /** - * Sets the value of the title property. - * - * @param value - * allowed object is {@link MobilityProgrammeCourseUnitType.Title } - * - */ - public void setTitle(MobilityProgrammeCourseUnitType.Title value) { - this.title = value; - } - - /** - * Gets the value of the ectsCredits property. - * - * @return possible object is {@link BigDecimal } - * - */ - public BigDecimal getECTSCredits() { - return ectsCredits; - } - - /** - * Sets the value of the ectsCredits property. - * - * @param value - * allowed object is {@link BigDecimal } - * - */ - public void setECTSCredits(BigDecimal value) { - this.ectsCredits = value; - } - - /** - * Gets the value of the additionalInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAdditionalInformation() { - return additionalInformation; - } - - /** - * Sets the value of the additionalInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAdditionalInformation(RichTextTagType value) { - this.additionalInformation = value; - } - - /** - * Gets the value of the isInTheLearningAgreement property. - * - * @return possible object is {@link Boolean } - * - */ - public boolean isIsInTheLearningAgreement() { - if (isInTheLearningAgreement == null) { - return true; - } else { - return isInTheLearningAgreement; - } - } - - /** - * Sets the value of the isInTheLearningAgreement property. - * - * @param value - * allowed object is {@link Boolean } - * - */ - public void setIsInTheLearningAgreement(Boolean value) { - this.isInTheLearningAgreement = value; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="language" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}LanguageType" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class Title { - - @XmlValue - protected String value; - @XmlAttribute(name = "language") - protected LanguageType language; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the language property. - * - * @return possible object is {@link LanguageType } - * - */ - public LanguageType getLanguage() { - return language; - } - - /** - * Sets the value of the language property. - * - * @param value - * allowed object is {@link LanguageType } - * - */ - public void setLanguage(LanguageType value) { - this.language = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeCoursesUnitsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeCoursesUnitsType.java deleted file mode 100644 index 63a4d0ecf..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeCoursesUnitsType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for MobilityProgrammeCoursesUnitsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="MobilityProgrammeCoursesUnitsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CourseUnit" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}MobilityProgrammeCourseUnitType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MobilityProgrammeCoursesUnitsType", propOrder = { "courseUnit" }) -public class MobilityProgrammeCoursesUnitsType { - - @XmlElement(name = "CourseUnit", required = true) - protected List courseUnit; - - /** - * Gets the value of the courseUnit property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the courseUnit property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getCourseUnit().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link MobilityProgrammeCourseUnitType } - * - * - */ - public List getCourseUnit() { - if (courseUnit == null) { - courseUnit = new ArrayList(); - } - return this.courseUnit; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeType.java deleted file mode 100644 index dbb8bc284..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MobilityProgrammeType.java +++ /dev/null @@ -1,233 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import javax.xml.datatype.XMLGregorianCalendar; - -/** - *

- * Java class for MobilityProgrammeType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="MobilityProgrammeType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Type" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="FieldOfStudy" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *         <element name="Country" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CountryTextCodeType"/>
- *         <element name="ReceivingInstitutionName" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="AcademicYear" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}AcademicYearType" minOccurs="0"/>
- *         <element name="DateFrom" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}DateType" minOccurs="0"/>
- *         <element name="DateTo" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}DateType" minOccurs="0"/>
- *         <element name="CoursesUnits" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}MobilityProgrammeCoursesUnitsType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MobilityProgrammeType", propOrder = { "type", "fieldOfStudy", "country", "receivingInstitutionName", "academicYear", "dateFrom", "dateTo", "coursesUnits" }) -public class MobilityProgrammeType { - - @XmlElement(name = "Type") - protected String type; - @XmlElement(name = "FieldOfStudy") - protected String fieldOfStudy; - @XmlElement(name = "Country", required = true) - protected CountryTextCodeType country; - @XmlElement(name = "ReceivingInstitutionName", required = true) - protected String receivingInstitutionName; - @XmlElement(name = "AcademicYear") - protected String academicYear; - @XmlElement(name = "DateFrom") - protected XMLGregorianCalendar dateFrom; - @XmlElement(name = "DateTo") - protected XMLGregorianCalendar dateTo; - @XmlElement(name = "CoursesUnits", required = true) - protected MobilityProgrammeCoursesUnitsType coursesUnits; - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - - /** - * Gets the value of the fieldOfStudy property. - * - * @return possible object is {@link String } - * - */ - public String getFieldOfStudy() { - return fieldOfStudy; - } - - /** - * Sets the value of the fieldOfStudy property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setFieldOfStudy(String value) { - this.fieldOfStudy = value; - } - - /** - * Gets the value of the country property. - * - * @return possible object is {@link CountryTextCodeType } - * - */ - public CountryTextCodeType getCountry() { - return country; - } - - /** - * Sets the value of the country property. - * - * @param value - * allowed object is {@link CountryTextCodeType } - * - */ - public void setCountry(CountryTextCodeType value) { - this.country = value; - } - - /** - * Gets the value of the receivingInstitutionName property. - * - * @return possible object is {@link String } - * - */ - public String getReceivingInstitutionName() { - return receivingInstitutionName; - } - - /** - * Sets the value of the receivingInstitutionName property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setReceivingInstitutionName(String value) { - this.receivingInstitutionName = value; - } - - /** - * Gets the value of the academicYear property. - * - * @return possible object is {@link String } - * - */ - public String getAcademicYear() { - return academicYear; - } - - /** - * Sets the value of the academicYear property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAcademicYear(String value) { - this.academicYear = value; - } - - /** - * Gets the value of the dateFrom property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateFrom() { - return dateFrom; - } - - /** - * Sets the value of the dateFrom property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateFrom(XMLGregorianCalendar value) { - this.dateFrom = value; - } - - /** - * Gets the value of the dateTo property. - * - * @return possible object is {@link XMLGregorianCalendar } - * - */ - public XMLGregorianCalendar getDateTo() { - return dateTo; - } - - /** - * Sets the value of the dateTo property. - * - * @param value - * allowed object is {@link XMLGregorianCalendar } - * - */ - public void setDateTo(XMLGregorianCalendar value) { - this.dateTo = value; - } - - /** - * Gets the value of the coursesUnits property. - * - * @return possible object is {@link MobilityProgrammeCoursesUnitsType } - * - */ - public MobilityProgrammeCoursesUnitsType getCoursesUnits() { - return coursesUnits; - } - - /** - * Sets the value of the coursesUnits property. - * - * @param value - * allowed object is {@link MobilityProgrammeCoursesUnitsType } - * - */ - public void setCoursesUnits(MobilityProgrammeCoursesUnitsType value) { - this.coursesUnits = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ModeOfDeliveryType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ModeOfDeliveryType.java deleted file mode 100644 index 1eca1ed60..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ModeOfDeliveryType.java +++ /dev/null @@ -1,60 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ModeOfDeliveryType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="ModeOfDeliveryType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="FaceToFace"/>
- *     <enumeration value="DistanceLearning"/>
- *     <enumeration value="Other"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "ModeOfDeliveryType") -@XmlEnum -public enum ModeOfDeliveryType { - - @XmlEnumValue("FaceToFace") - FACE_TO_FACE("FaceToFace"), @XmlEnumValue("DistanceLearning") - DISTANCE_LEARNING("DistanceLearning"), @XmlEnumValue("Other") - OTHER("Other"); - private final String value; - - ModeOfDeliveryType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static ModeOfDeliveryType fromValue(String v) { - for (ModeOfDeliveryType c : ModeOfDeliveryType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ModeOfStudyType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ModeOfStudyType.java deleted file mode 100644 index 5a3b5a830..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ModeOfStudyType.java +++ /dev/null @@ -1,64 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ModeOfStudyType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="ModeOfStudyType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="FullTime"/>
- *     <enumeration value="ParTime"/>
- *     <enumeration value="Distance"/>
- *     <enumeration value="eLearning"/>
- *     <enumeration value="Another"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "ModeOfStudyType") -@XmlEnum -public enum ModeOfStudyType { - - @XmlEnumValue("FullTime") - FULL_TIME("FullTime"), @XmlEnumValue("ParTime") - PAR_TIME("ParTime"), @XmlEnumValue("Distance") - DISTANCE("Distance"), @XmlEnumValue("eLearning") - E_LEARNING("eLearning"), @XmlEnumValue("Another") - ANOTHER("Another"); - private final String value; - - ModeOfStudyType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static ModeOfStudyType fromValue(String v) { - for (ModeOfStudyType c : ModeOfStudyType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MultilingualGeneralDiplomaType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MultilingualGeneralDiplomaType.java deleted file mode 100644 index 7ffa2f2ea..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/MultilingualGeneralDiplomaType.java +++ /dev/null @@ -1,103 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; -import eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig.SignatureType; - -/** - *

- * Java class for MultilingualGeneralDiplomaType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="MultilingualGeneralDiplomaType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}GeneralDiploma" maxOccurs="unbounded"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Signature" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "MultilingualGeneralDiplomaType", propOrder = { "generalDiploma", "signature" }) -public class MultilingualGeneralDiplomaType { - - @XmlElement(name = "GeneralDiploma", required = true) - protected List generalDiploma; - @XmlElement(name = "Signature", namespace = "http://www.w3.org/2000/09/xmldsig#") - protected List signature; - - /** - * Gets the value of the generalDiploma property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the generalDiploma property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getGeneralDiploma().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link GeneralDiplomaType } - * - * - */ - public List getGeneralDiploma() { - if (generalDiploma == null) { - generalDiploma = new ArrayList(); - } - return this.generalDiploma; - } - - /** - * Gets the value of the signature property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the signature property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getSignature().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link SignatureType } - * - * - */ - public List getSignature() { - if (signature == null) { - signature = new ArrayList(); - } - return this.signature; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/NameAndStatusOfAwardingInstitutionType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/NameAndStatusOfAwardingInstitutionType.java deleted file mode 100644 index 201efce45..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/NameAndStatusOfAwardingInstitutionType.java +++ /dev/null @@ -1,134 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for NameAndStatusOfAwardingInstitutionType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="NameAndStatusOfAwardingInstitutionType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="AwardingInstitution" maxOccurs="unbounded">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InstitutionType">
- *                 <attribute name="awardingInstitutionID" type="{http://www.w3.org/2001/XMLSchema}string" default="DEF-IAW" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "NameAndStatusOfAwardingInstitutionType", propOrder = { "awardingInstitution" }) -public class NameAndStatusOfAwardingInstitutionType { - - @XmlElement(name = "AwardingInstitution", required = true) - protected List awardingInstitution; - - /** - * Gets the value of the awardingInstitution property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the awardingInstitution property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getAwardingInstitution().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link NameAndStatusOfAwardingInstitutionType.AwardingInstitution } - * - * - */ - public List getAwardingInstitution() { - if (awardingInstitution == null) { - awardingInstitution = new ArrayList(); - } - return this.awardingInstitution; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InstitutionType">
-	 *       <attribute name="awardingInstitutionID" type="{http://www.w3.org/2001/XMLSchema}string" default="DEF-IAW" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class AwardingInstitution extends InstitutionType { - - @XmlAttribute(name = "awardingInstitutionID") - protected String awardingInstitutionID; - - /** - * Gets the value of the awardingInstitutionID property. - * - * @return possible object is {@link String } - * - */ - public String getAwardingInstitutionID() { - if (awardingInstitutionID == null) { - return "DEF-IAW"; - } else { - return awardingInstitutionID; - } - } - - /** - * Sets the value of the awardingInstitutionID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAwardingInstitutionID(String value) { - this.awardingInstitutionID = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/NameAndStatusOfInstitutionAdministeringStudiesType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/NameAndStatusOfInstitutionAdministeringStudiesType.java deleted file mode 100644 index c9e07208c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/NameAndStatusOfInstitutionAdministeringStudiesType.java +++ /dev/null @@ -1,134 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for NameAndStatusOfInstitutionAdministeringStudiesType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="NameAndStatusOfInstitutionAdministeringStudiesType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="InstitutionAdministeringStudies" maxOccurs="unbounded">
- *           <complexType>
- *             <complexContent>
- *               <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InstitutionType">
- *                 <attribute name="institutionAdministeringStudiesID" type="{http://www.w3.org/2001/XMLSchema}string" default="DEF-IAS" />
- *               </extension>
- *             </complexContent>
- *           </complexType>
- *         </element>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "NameAndStatusOfInstitutionAdministeringStudiesType", propOrder = { "institutionAdministeringStudies" }) -public class NameAndStatusOfInstitutionAdministeringStudiesType { - - @XmlElement(name = "InstitutionAdministeringStudies", required = true) - protected List institutionAdministeringStudies; - - /** - * Gets the value of the institutionAdministeringStudies property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the institutionAdministeringStudies property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getInstitutionAdministeringStudies().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies } - * - * - */ - public List getInstitutionAdministeringStudies() { - if (institutionAdministeringStudies == null) { - institutionAdministeringStudies = new ArrayList(); - } - return this.institutionAdministeringStudies; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <complexContent>
-	 *     <extension base="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}InstitutionType">
-	 *       <attribute name="institutionAdministeringStudiesID" type="{http://www.w3.org/2001/XMLSchema}string" default="DEF-IAS" />
-	 *     </extension>
-	 *   </complexContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "") - public static class InstitutionAdministeringStudies extends InstitutionType { - - @XmlAttribute(name = "institutionAdministeringStudiesID") - protected String institutionAdministeringStudiesID; - - /** - * Gets the value of the institutionAdministeringStudiesID property. - * - * @return possible object is {@link String } - * - */ - public String getInstitutionAdministeringStudiesID() { - if (institutionAdministeringStudiesID == null) { - return "DEF-IAS"; - } else { - return institutionAdministeringStudiesID; - } - } - - /** - * Sets the value of the institutionAdministeringStudiesID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setInstitutionAdministeringStudiesID(String value) { - this.institutionAdministeringStudiesID = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ObjectFactory.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ObjectFactory.java deleted file mode 100644 index 3e2bbe5c0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ObjectFactory.java +++ /dev/null @@ -1,623 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - -/** - * This object contains factory methods for each Java content interface and Java element interface generated in the eu.stork.names.tc.stork._2_0.academic.generaldiploma package. - *

- * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. The Java representation of XML content can consist of schema derived interfaces - * and classes representing the binding of schema type definitions, element declarations and model groups. Factory methods for each of these are provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _MultilingualGeneralDiploma_QNAME = new QName("urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", "MultilingualGeneralDiploma"); - private final static QName _GeneralDiploma_QNAME = new QName("urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", "GeneralDiploma"); - private final static QName _RichTextTagTypeBreakLine_QNAME = new QName("urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", "BreakLine"); - private final static QName _RichTextTagTypeAttachedRef_QNAME = new QName("urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", "AttachedRef"); - private final static QName _RichTextTagTypeItalic_QNAME = new QName("urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", "Italic"); - private final static QName _RichTextTagTypeUnderline_QNAME = new QName("urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", "Underline"); - private final static QName _RichTextTagTypeBold_QNAME = new QName("urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", "Bold"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: eu.stork.names.tc.stork._2_0.academic.generaldiploma - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link LanguagesOfInstructionAndExaminationType } - * - */ - public LanguagesOfInstructionAndExaminationType createLanguagesOfInstructionAndExaminationType() { - return new LanguagesOfInstructionAndExaminationType(); - } - - /** - * Create an instance of {@link RichTextTagType } - * - */ - public RichTextTagType createRichTextTagType() { - return new RichTextTagType(); - } - - /** - * Create an instance of {@link NameAndStatusOfInstitutionAdministeringStudiesType } - * - */ - public NameAndStatusOfInstitutionAdministeringStudiesType createNameAndStatusOfInstitutionAdministeringStudiesType() { - return new NameAndStatusOfInstitutionAdministeringStudiesType(); - } - - /** - * Create an instance of {@link InstitutionType } - * - */ - public InstitutionType createInstitutionType() { - return new InstitutionType(); - } - - /** - * Create an instance of {@link MobilityProgrammeCourseUnitType } - * - */ - public MobilityProgrammeCourseUnitType createMobilityProgrammeCourseUnitType() { - return new MobilityProgrammeCourseUnitType(); - } - - /** - * Create an instance of {@link InformationIdentifyingTheHolderOfTheQualificationType } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType createInformationIdentifyingTheHolderOfTheQualificationType() { - return new InformationIdentifyingTheHolderOfTheQualificationType(); - } - - /** - * Create an instance of {@link CourseUnitType } - * - */ - public CourseUnitType createCourseUnitType() { - return new CourseUnitType(); - } - - /** - * Create an instance of {@link LocalGradeType } - * - */ - public LocalGradeType createLocalGradeType() { - return new LocalGradeType(); - } - - /** - * Create an instance of {@link InformationOnTheContentsAndResultsGainedType } - * - */ - public InformationOnTheContentsAndResultsGainedType createInformationOnTheContentsAndResultsGainedType() { - return new InformationOnTheContentsAndResultsGainedType(); - } - - /** - * Create an instance of {@link InformationOnTheLevelOfTheQualificationType } - * - */ - public InformationOnTheLevelOfTheQualificationType createInformationOnTheLevelOfTheQualificationType() { - return new InformationOnTheLevelOfTheQualificationType(); - } - - /** - * Create an instance of {@link NameAndStatusOfAwardingInstitutionType } - * - */ - public NameAndStatusOfAwardingInstitutionType createNameAndStatusOfAwardingInstitutionType() { - return new NameAndStatusOfAwardingInstitutionType(); - } - - /** - * Create an instance of {@link InformationOnTheFunctionOfTheQualificationType } - * - */ - public InformationOnTheFunctionOfTheQualificationType createInformationOnTheFunctionOfTheQualificationType() { - return new InformationOnTheFunctionOfTheQualificationType(); - } - - /** - * Create an instance of {@link MultilingualGeneralDiplomaType } - * - */ - public MultilingualGeneralDiplomaType createMultilingualGeneralDiplomaType() { - return new MultilingualGeneralDiplomaType(); - } - - /** - * Create an instance of {@link GeneralDiplomaType } - * - */ - public GeneralDiplomaType createGeneralDiplomaType() { - return new GeneralDiplomaType(); - } - - /** - * Create an instance of {@link ExtensionContentType } - * - */ - public ExtensionContentType createExtensionContentType() { - return new ExtensionContentType(); - } - - /** - * Create an instance of {@link CountryTextCodeType } - * - */ - public CountryTextCodeType createCountryTextCodeType() { - return new CountryTextCodeType(); - } - - /** - * Create an instance of {@link AttachedImageURLType } - * - */ - public AttachedImageURLType createAttachedImageURLType() { - return new AttachedImageURLType(); - } - - /** - * Create an instance of {@link CourseStructureDiagramType } - * - */ - public CourseStructureDiagramType createCourseStructureDiagramType() { - return new CourseStructureDiagramType(); - } - - /** - * Create an instance of {@link CourseUnitWorkPlacementType } - * - */ - public CourseUnitWorkPlacementType createCourseUnitWorkPlacementType() { - return new CourseUnitWorkPlacementType(); - } - - /** - * Create an instance of {@link InformationIdentifyingTheQualificationType } - * - */ - public InformationIdentifyingTheQualificationType createInformationIdentifyingTheQualificationType() { - return new InformationIdentifyingTheQualificationType(); - } - - /** - * Create an instance of {@link MobilityProgrammeCoursesUnitsType } - * - */ - public MobilityProgrammeCoursesUnitsType createMobilityProgrammeCoursesUnitsType() { - return new MobilityProgrammeCoursesUnitsType(); - } - - /** - * Create an instance of {@link QualificationType } - * - */ - public QualificationType createQualificationType() { - return new QualificationType(); - } - - /** - * Create an instance of {@link CertificationOfTheSupplementType } - * - */ - public CertificationOfTheSupplementType createCertificationOfTheSupplementType() { - return new CertificationOfTheSupplementType(); - } - - /** - * Create an instance of {@link AttachedFileURLType } - * - */ - public AttachedFileURLType createAttachedFileURLType() { - return new AttachedFileURLType(); - } - - /** - * Create an instance of {@link ProgrammeRequirementsType } - * - */ - public ProgrammeRequirementsType createProgrammeRequirementsType() { - return new ProgrammeRequirementsType(); - } - - /** - * Create an instance of {@link CourseUnitWorkPlacementsType } - * - */ - public CourseUnitWorkPlacementsType createCourseUnitWorkPlacementsType() { - return new CourseUnitWorkPlacementsType(); - } - - /** - * Create an instance of {@link AdditionalInformationType } - * - */ - public AdditionalInformationType createAdditionalInformationType() { - return new AdditionalInformationType(); - } - - /** - * Create an instance of {@link GradingSchemeAndGradeDistributionGuidanceType } - * - */ - public GradingSchemeAndGradeDistributionGuidanceType createGradingSchemeAndGradeDistributionGuidanceType() { - return new GradingSchemeAndGradeDistributionGuidanceType(); - } - - /** - * Create an instance of {@link AttachmentsType } - * - */ - public AttachmentsType createAttachmentsType() { - return new AttachmentsType(); - } - - /** - * Create an instance of {@link CourseUnitLanguageOfInstructionType } - * - */ - public CourseUnitLanguageOfInstructionType createCourseUnitLanguageOfInstructionType() { - return new CourseUnitLanguageOfInstructionType(); - } - - /** - * Create an instance of {@link CoursesAttendedInOtherInstitutionInMobilityProgramsType } - * - */ - public CoursesAttendedInOtherInstitutionInMobilityProgramsType createCoursesAttendedInOtherInstitutionInMobilityProgramsType() { - return new CoursesAttendedInOtherInstitutionInMobilityProgramsType(); - } - - /** - * Create an instance of {@link FamilyNameType } - * - */ - public FamilyNameType createFamilyNameType() { - return new FamilyNameType(); - } - - /** - * Create an instance of {@link CoursesGroupsType } - * - */ - public CoursesGroupsType createCoursesGroupsType() { - return new CoursesGroupsType(); - } - - /** - * Create an instance of {@link TitleConferredType } - * - */ - public TitleConferredType createTitleConferredType() { - return new TitleConferredType(); - } - - /** - * Create an instance of {@link OfficialStampType } - * - */ - public OfficialStampType createOfficialStampType() { - return new OfficialStampType(); - } - - /** - * Create an instance of {@link CourseUnitStudentPerformanceType } - * - */ - public CourseUnitStudentPerformanceType createCourseUnitStudentPerformanceType() { - return new CourseUnitStudentPerformanceType(); - } - - /** - * Create an instance of {@link GivenNameType } - * - */ - public GivenNameType createGivenNameType() { - return new GivenNameType(); - } - - /** - * Create an instance of {@link CoursesUnitsType } - * - */ - public CoursesUnitsType createCoursesUnitsType() { - return new CoursesUnitsType(); - } - - /** - * Create an instance of {@link MobilityProgrammeType } - * - */ - public MobilityProgrammeType createMobilityProgrammeType() { - return new MobilityProgrammeType(); - } - - /** - * Create an instance of {@link ProgrammeDetailsType } - * - */ - public ProgrammeDetailsType createProgrammeDetailsType() { - return new ProgrammeDetailsType(); - } - - /** - * Create an instance of {@link OfficialCertifyingType } - * - */ - public OfficialCertifyingType createOfficialCertifyingType() { - return new OfficialCertifyingType(); - } - - /** - * Create an instance of {@link CourseUnitLanguagesOfInstructionType } - * - */ - public CourseUnitLanguagesOfInstructionType createCourseUnitLanguagesOfInstructionType() { - return new CourseUnitLanguagesOfInstructionType(); - } - - /** - * Create an instance of {@link AttachedImageDataType } - * - */ - public AttachedImageDataType createAttachedImageDataType() { - return new AttachedImageDataType(); - } - - /** - * Create an instance of {@link AttachedType } - * - */ - public AttachedType createAttachedType() { - return new AttachedType(); - } - - /** - * Create an instance of {@link CoursesGroupType } - * - */ - public CoursesGroupType createCoursesGroupType() { - return new CoursesGroupType(); - } - - /** - * Create an instance of {@link AddressType } - * - */ - public AddressType createAddressType() { - return new AddressType(); - } - - /** - * Create an instance of {@link AttachedFileDataType } - * - */ - public AttachedFileDataType createAttachedFileDataType() { - return new AttachedFileDataType(); - } - - /** - * Create an instance of {@link ContactInformationType } - * - */ - public ContactInformationType createContactInformationType() { - return new ContactInformationType(); - } - - /** - * Create an instance of {@link OfficialsCertifyingType } - * - */ - public OfficialsCertifyingType createOfficialsCertifyingType() { - return new OfficialsCertifyingType(); - } - - /** - * Create an instance of {@link LanguagesOfInstructionAndExaminationType.Language } - * - */ - public LanguagesOfInstructionAndExaminationType.Language createLanguagesOfInstructionAndExaminationTypeLanguage() { - return new LanguagesOfInstructionAndExaminationType.Language(); - } - - /** - * Create an instance of {@link RichTextTagType.AttachedRef } - * - */ - public RichTextTagType.AttachedRef createRichTextTagTypeAttachedRef() { - return new RichTextTagType.AttachedRef(); - } - - /** - * Create an instance of {@link NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies } - * - */ - public NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies createNameAndStatusOfInstitutionAdministeringStudiesTypeInstitutionAdministeringStudies() { - return new NameAndStatusOfInstitutionAdministeringStudiesType.InstitutionAdministeringStudies(); - } - - /** - * Create an instance of {@link InstitutionType.AttachedImageRef } - * - */ - public InstitutionType.AttachedImageRef createInstitutionTypeAttachedImageRef() { - return new InstitutionType.AttachedImageRef(); - } - - /** - * Create an instance of {@link MobilityProgrammeCourseUnitType.Title } - * - */ - public MobilityProgrammeCourseUnitType.Title createMobilityProgrammeCourseUnitTypeTitle() { - return new MobilityProgrammeCourseUnitType.Title(); - } - - /** - * Create an instance of {@link InformationIdentifyingTheHolderOfTheQualificationType.Gender } - * - */ - public InformationIdentifyingTheHolderOfTheQualificationType.Gender createInformationIdentifyingTheHolderOfTheQualificationTypeGender() { - return new InformationIdentifyingTheHolderOfTheQualificationType.Gender(); - } - - /** - * Create an instance of {@link CourseUnitType.Type } - * - */ - public CourseUnitType.Type createCourseUnitTypeType() { - return new CourseUnitType.Type(); - } - - /** - * Create an instance of {@link CourseUnitType.YearOfStudy } - * - */ - public CourseUnitType.YearOfStudy createCourseUnitTypeYearOfStudy() { - return new CourseUnitType.YearOfStudy(); - } - - /** - * Create an instance of {@link CourseUnitType.Level } - * - */ - public CourseUnitType.Level createCourseUnitTypeLevel() { - return new CourseUnitType.Level(); - } - - /** - * Create an instance of {@link CourseUnitType.ModeOfDelivery } - * - */ - public CourseUnitType.ModeOfDelivery createCourseUnitTypeModeOfDelivery() { - return new CourseUnitType.ModeOfDelivery(); - } - - /** - * Create an instance of {@link LocalGradeType.Source } - * - */ - public LocalGradeType.Source createLocalGradeTypeSource() { - return new LocalGradeType.Source(); - } - - /** - * Create an instance of {@link InformationOnTheContentsAndResultsGainedType.ModeOfStudy } - * - */ - public InformationOnTheContentsAndResultsGainedType.ModeOfStudy createInformationOnTheContentsAndResultsGainedTypeModeOfStudy() { - return new InformationOnTheContentsAndResultsGainedType.ModeOfStudy(); - } - - /** - * Create an instance of {@link InformationOnTheLevelOfTheQualificationType.Level } - * - */ - public InformationOnTheLevelOfTheQualificationType.Level createInformationOnTheLevelOfTheQualificationTypeLevel() { - return new InformationOnTheLevelOfTheQualificationType.Level(); - } - - /** - * Create an instance of {@link InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme } - * - */ - public InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme createInformationOnTheLevelOfTheQualificationTypeOfficialLengthOfProgramme() { - return new InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme(); - } - - /** - * Create an instance of {@link NameAndStatusOfAwardingInstitutionType.AwardingInstitution } - * - */ - public NameAndStatusOfAwardingInstitutionType.AwardingInstitution createNameAndStatusOfAwardingInstitutionTypeAwardingInstitution() { - return new NameAndStatusOfAwardingInstitutionType.AwardingInstitution(); - } - - /** - * Create an instance of {@link InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus } - * - */ - public InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus createInformationOnTheFunctionOfTheQualificationTypeProfessionalStatus() { - return new InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link MultilingualGeneralDiplomaType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", name = "MultilingualGeneralDiploma") - public JAXBElement createMultilingualGeneralDiploma(MultilingualGeneralDiplomaType value) { - return new JAXBElement(_MultilingualGeneralDiploma_QNAME, MultilingualGeneralDiplomaType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link GeneralDiplomaType }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", name = "GeneralDiploma") - public JAXBElement createGeneralDiploma(GeneralDiplomaType value) { - return new JAXBElement(_GeneralDiploma_QNAME, GeneralDiplomaType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", name = "BreakLine", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeBreakLine(String value) { - return new JAXBElement(_RichTextTagTypeBreakLine_QNAME, String.class, RichTextTagType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RichTextTagType.AttachedRef }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", name = "AttachedRef", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeAttachedRef(RichTextTagType.AttachedRef value) { - return new JAXBElement(_RichTextTagTypeAttachedRef_QNAME, RichTextTagType.AttachedRef.class, RichTextTagType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", name = "Italic", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeItalic(String value) { - return new JAXBElement(_RichTextTagTypeItalic_QNAME, String.class, RichTextTagType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", name = "Underline", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeUnderline(String value) { - return new JAXBElement(_RichTextTagTypeUnderline_QNAME, String.class, RichTextTagType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", name = "Bold", scope = RichTextTagType.class) - public JAXBElement createRichTextTagTypeBold(String value) { - return new JAXBElement(_RichTextTagTypeBold_QNAME, String.class, RichTextTagType.class, value); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialCertifyingType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialCertifyingType.java deleted file mode 100644 index a53e855d1..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialCertifyingType.java +++ /dev/null @@ -1,141 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for OfficialCertifyingType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="OfficialCertifyingType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="FamilyName" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}FamilyNameType"/>
- *         <element name="GivenName" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}GivenNameType"/>
- *         <element name="Capacity" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="awardingInstitutionID" type="{http://www.w3.org/2001/XMLSchema}string" default="DEF-IAW" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OfficialCertifyingType", propOrder = { "familyName", "givenName", "capacity" }) -public class OfficialCertifyingType { - - @XmlElement(name = "FamilyName", required = true) - protected FamilyNameType familyName; - @XmlElement(name = "GivenName", required = true) - protected GivenNameType givenName; - @XmlElement(name = "Capacity") - protected String capacity; - @XmlAttribute(name = "awardingInstitutionID") - protected String awardingInstitutionID; - - /** - * Gets the value of the familyName property. - * - * @return possible object is {@link FamilyNameType } - * - */ - public FamilyNameType getFamilyName() { - return familyName; - } - - /** - * Sets the value of the familyName property. - * - * @param value - * allowed object is {@link FamilyNameType } - * - */ - public void setFamilyName(FamilyNameType value) { - this.familyName = value; - } - - /** - * Gets the value of the givenName property. - * - * @return possible object is {@link GivenNameType } - * - */ - public GivenNameType getGivenName() { - return givenName; - } - - /** - * Sets the value of the givenName property. - * - * @param value - * allowed object is {@link GivenNameType } - * - */ - public void setGivenName(GivenNameType value) { - this.givenName = value; - } - - /** - * Gets the value of the capacity property. - * - * @return possible object is {@link String } - * - */ - public String getCapacity() { - return capacity; - } - - /** - * Sets the value of the capacity property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setCapacity(String value) { - this.capacity = value; - } - - /** - * Gets the value of the awardingInstitutionID property. - * - * @return possible object is {@link String } - * - */ - public String getAwardingInstitutionID() { - if (awardingInstitutionID == null) { - return "DEF-IAW"; - } else { - return awardingInstitutionID; - } - } - - /** - * Sets the value of the awardingInstitutionID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAwardingInstitutionID(String value) { - this.awardingInstitutionID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialStampType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialStampType.java deleted file mode 100644 index df1051a7c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialStampType.java +++ /dev/null @@ -1,93 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for OfficialStampType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="OfficialStampType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Description" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *       </sequence>
- *       <attribute name="awardingInstitutionID" type="{http://www.w3.org/2001/XMLSchema}string" default="DEF-IAW" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OfficialStampType", propOrder = { "description" }) -public class OfficialStampType { - - @XmlElement(name = "Description", required = true) - protected String description; - @XmlAttribute(name = "awardingInstitutionID") - protected String awardingInstitutionID; - - /** - * Gets the value of the description property. - * - * @return possible object is {@link String } - * - */ - public String getDescription() { - return description; - } - - /** - * Sets the value of the description property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setDescription(String value) { - this.description = value; - } - - /** - * Gets the value of the awardingInstitutionID property. - * - * @return possible object is {@link String } - * - */ - public String getAwardingInstitutionID() { - if (awardingInstitutionID == null) { - return "DEF-IAW"; - } else { - return awardingInstitutionID; - } - } - - /** - * Sets the value of the awardingInstitutionID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAwardingInstitutionID(String value) { - this.awardingInstitutionID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialsCertifyingType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialsCertifyingType.java deleted file mode 100644 index 1760eddb3..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/OfficialsCertifyingType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for OfficialsCertifyingType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="OfficialsCertifyingType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="OfficialCertifying" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}OfficialCertifyingType" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "OfficialsCertifyingType", propOrder = { "officialCertifying" }) -public class OfficialsCertifyingType { - - @XmlElement(name = "OfficialCertifying", required = true) - protected List officialCertifying; - - /** - * Gets the value of the officialCertifying property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the officialCertifying property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getOfficialCertifying().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link OfficialCertifyingType } - * - * - */ - public List getOfficialCertifying() { - if (officialCertifying == null) { - officialCertifying = new ArrayList(); - } - return this.officialCertifying; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ProgrammeDetailsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ProgrammeDetailsType.java deleted file mode 100644 index 58d96bfe2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ProgrammeDetailsType.java +++ /dev/null @@ -1,88 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ProgrammeDetailsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ProgrammeDetailsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="CourseStructureDiagram" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CourseStructureDiagramType"/>
- *         <element name="CoursesAttendedInOtherInstitutionInMobilityPrograms" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}CoursesAttendedInOtherInstitutionInMobilityProgramsType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ProgrammeDetailsType", propOrder = { "courseStructureDiagram", "coursesAttendedInOtherInstitutionInMobilityPrograms" }) -public class ProgrammeDetailsType { - - @XmlElement(name = "CourseStructureDiagram", required = true) - protected CourseStructureDiagramType courseStructureDiagram; - @XmlElement(name = "CoursesAttendedInOtherInstitutionInMobilityPrograms") - protected CoursesAttendedInOtherInstitutionInMobilityProgramsType coursesAttendedInOtherInstitutionInMobilityPrograms; - - /** - * Gets the value of the courseStructureDiagram property. - * - * @return possible object is {@link CourseStructureDiagramType } - * - */ - public CourseStructureDiagramType getCourseStructureDiagram() { - return courseStructureDiagram; - } - - /** - * Sets the value of the courseStructureDiagram property. - * - * @param value - * allowed object is {@link CourseStructureDiagramType } - * - */ - public void setCourseStructureDiagram(CourseStructureDiagramType value) { - this.courseStructureDiagram = value; - } - - /** - * Gets the value of the coursesAttendedInOtherInstitutionInMobilityPrograms property. - * - * @return possible object is {@link CoursesAttendedInOtherInstitutionInMobilityProgramsType } - * - */ - public CoursesAttendedInOtherInstitutionInMobilityProgramsType getCoursesAttendedInOtherInstitutionInMobilityPrograms() { - return coursesAttendedInOtherInstitutionInMobilityPrograms; - } - - /** - * Sets the value of the coursesAttendedInOtherInstitutionInMobilityPrograms property. - * - * @param value - * allowed object is {@link CoursesAttendedInOtherInstitutionInMobilityProgramsType } - * - */ - public void setCoursesAttendedInOtherInstitutionInMobilityPrograms(CoursesAttendedInOtherInstitutionInMobilityProgramsType value) { - this.coursesAttendedInOtherInstitutionInMobilityPrograms = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ProgrammeRequirementsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ProgrammeRequirementsType.java deleted file mode 100644 index a0481317d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/ProgrammeRequirementsType.java +++ /dev/null @@ -1,88 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for ProgrammeRequirementsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ProgrammeRequirementsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Requirements" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType"/>
- *         <element name="KeyLearningOutcomes" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ProgrammeRequirementsType", propOrder = { "requirements", "keyLearningOutcomes" }) -public class ProgrammeRequirementsType { - - @XmlElement(name = "Requirements", required = true) - protected RichTextTagType requirements; - @XmlElement(name = "KeyLearningOutcomes") - protected RichTextTagType keyLearningOutcomes; - - /** - * Gets the value of the requirements property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getRequirements() { - return requirements; - } - - /** - * Sets the value of the requirements property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setRequirements(RichTextTagType value) { - this.requirements = value; - } - - /** - * Gets the value of the keyLearningOutcomes property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getKeyLearningOutcomes() { - return keyLearningOutcomes; - } - - /** - * Sets the value of the keyLearningOutcomes property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setKeyLearningOutcomes(RichTextTagType value) { - this.keyLearningOutcomes = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/QualificationType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/QualificationType.java deleted file mode 100644 index 5fc5377d0..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/QualificationType.java +++ /dev/null @@ -1,137 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for QualificationType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="QualificationType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="AdditionalInformation" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}RichTextTagType" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="localID" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" />
- *       <attribute name="nationalID" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "QualificationType", propOrder = { "name", "additionalInformation" }) -public class QualificationType { - - @XmlElement(name = "Name", required = true) - protected String name; - @XmlElement(name = "AdditionalInformation") - protected RichTextTagType additionalInformation; - @XmlAttribute(name = "localID") - protected String localID; - @XmlAttribute(name = "nationalID") - protected String nationalID; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - - /** - * Gets the value of the additionalInformation property. - * - * @return possible object is {@link RichTextTagType } - * - */ - public RichTextTagType getAdditionalInformation() { - return additionalInformation; - } - - /** - * Sets the value of the additionalInformation property. - * - * @param value - * allowed object is {@link RichTextTagType } - * - */ - public void setAdditionalInformation(RichTextTagType value) { - this.additionalInformation = value; - } - - /** - * Gets the value of the localID property. - * - * @return possible object is {@link String } - * - */ - public String getLocalID() { - return localID; - } - - /** - * Sets the value of the localID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setLocalID(String value) { - this.localID = value; - } - - /** - * Gets the value of the nationalID property. - * - * @return possible object is {@link String } - * - */ - public String getNationalID() { - return nationalID; - } - - /** - * Sets the value of the nationalID property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setNationalID(String value) { - this.nationalID = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/RichTextTagType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/RichTextTagType.java deleted file mode 100644 index 0a79919d7..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/RichTextTagType.java +++ /dev/null @@ -1,178 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import java.io.Serializable; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlIDREF; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlSeeAlso; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; - -/** - *

- * Java class for RichTextTagType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="RichTextTagType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded" minOccurs="0">
- *         <element name="Bold" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="BreakLine" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}EmptyType"/>
- *         <element name="Italic" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="Underline" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *         <element name="AttachedRef">
- *           <complexType>
- *             <simpleContent>
- *               <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
- *                 <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
- *               </extension>
- *             </simpleContent>
- *           </complexType>
- *         </element>
- *       </choice>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "RichTextTagType", propOrder = { "content" }) -@XmlSeeAlso({ eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.InformationOnTheFunctionOfTheQualificationType.ProfessionalStatus.class, - eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.InformationOnTheLevelOfTheQualificationType.Level.class, - eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.InformationOnTheLevelOfTheQualificationType.OfficialLengthOfProgramme.class, - eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.InformationOnTheContentsAndResultsGainedType.ModeOfStudy.class, - eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma.LanguagesOfInstructionAndExaminationType.Language.class }) -public class RichTextTagType { - - @XmlElementRefs({ @XmlElementRef(name = "Underline", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", type = JAXBElement.class, required = false), - @XmlElementRef(name = "BreakLine", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", type = JAXBElement.class, required = false), - @XmlElementRef(name = "AttachedRef", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", type = JAXBElement.class, required = false), - @XmlElementRef(name = "Italic", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", type = JAXBElement.class, required = false), - @XmlElementRef(name = "Bold", namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", type = JAXBElement.class, required = false) }) - @XmlMixed - protected List content; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement }{@code <} - * {@link String }{@code >} {@link String } {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement }{@code <}{@link RichTextTagType.AttachedRef }{@code >} - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - *

- * Java class for anonymous complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

-	 * <complexType>
-	 *   <simpleContent>
-	 *     <extension base="<urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma>PlainTextType">
-	 *       <attribute name="attachedID" use="required" type="{http://www.w3.org/2001/XMLSchema}IDREF" />
-	 *     </extension>
-	 *   </simpleContent>
-	 * </complexType>
-	 * 
- * - * - */ - @XmlAccessorType(XmlAccessType.FIELD) - @XmlType(name = "", propOrder = { "value" }) - public static class AttachedRef { - - @XmlValue - protected String value; - @XmlAttribute(name = "attachedID", required = true) - @XmlIDREF - @XmlSchemaType(name = "IDREF") - protected Object attachedID; - - /** - * Gets the value of the value property. - * - * @return possible object is {@link String } - * - */ - public String getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setValue(String value) { - this.value = value; - } - - /** - * Gets the value of the attachedID property. - * - * @return possible object is {@link Object } - * - */ - public Object getAttachedID() { - return attachedID; - } - - /** - * Sets the value of the attachedID property. - * - * @param value - * allowed object is {@link Object } - * - */ - public void setAttachedID(Object value) { - this.attachedID = value; - } - - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/SourceGradeType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/SourceGradeType.java deleted file mode 100644 index 488f87974..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/SourceGradeType.java +++ /dev/null @@ -1,60 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlEnumValue; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for SourceGradeType. - * - *

- * The following schema fragment specifies the expected content contained within this class. - *

- * - *

- * <simpleType name="SourceGradeType">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="Recognized"/>
- *     <enumeration value="MobilityProgramme"/>
- *     <enumeration value="Another"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "SourceGradeType") -@XmlEnum -public enum SourceGradeType { - - @XmlEnumValue("Recognized") - RECOGNIZED("Recognized"), @XmlEnumValue("MobilityProgramme") - MOBILITY_PROGRAMME("MobilityProgramme"), @XmlEnumValue("Another") - ANOTHER("Another"); - private final String value; - - SourceGradeType(String v) { - value = v; - } - - public String value() { - return value; - } - - public static SourceGradeType fromValue(String v) { - for (SourceGradeType c : SourceGradeType.values()) { - if (c.value.equals(v)) { - return c; - } - } - throw new IllegalArgumentException(v); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/TitleConferredType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/TitleConferredType.java deleted file mode 100644 index ea1e6e9bb..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/TitleConferredType.java +++ /dev/null @@ -1,64 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for TitleConferredType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="TitleConferredType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Name" type="{urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma}PlainTextType"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TitleConferredType", propOrder = { "name" }) -public class TitleConferredType { - - @XmlElement(name = "Name", required = true) - protected String name; - - /** - * Gets the value of the name property. - * - * @return possible object is {@link String } - * - */ - public String getName() { - return name; - } - - /** - * Sets the value of the name property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setName(String value) { - this.name = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/package-info.java deleted file mode 100644 index 0a37ab296..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/eu/stork/names/tc/stork/_2_0/academic/generaldiploma/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -@javax.xml.bind.annotation.XmlSchema(namespace = "urn:eu:stork:names:tc:STORK:2.0:academic:generaldiploma", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._2_0.academic.generaldiploma; - diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/CanonicalizationMethodType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/CanonicalizationMethodType.java deleted file mode 100644 index 98e01dc8c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/CanonicalizationMethodType.java +++ /dev/null @@ -1,101 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for CanonicalizationMethodType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="CanonicalizationMethodType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <any maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "CanonicalizationMethodType", propOrder = { "content" }) -public class CanonicalizationMethodType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "Algorithm", required = true) - @XmlSchemaType(name = "anyURI") - protected String algorithm; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link String } {@link Object } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the algorithm property. - * - * @return possible object is {@link String } - * - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Sets the value of the algorithm property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAlgorithm(String value) { - this.algorithm = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/DSAKeyValueType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/DSAKeyValueType.java deleted file mode 100644 index af0978a99..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/DSAKeyValueType.java +++ /dev/null @@ -1,198 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for DSAKeyValueType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="DSAKeyValueType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <sequence minOccurs="0">
- *           <element name="P" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
- *           <element name="Q" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
- *         </sequence>
- *         <element name="G" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
- *         <element name="Y" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
- *         <element name="J" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary" minOccurs="0"/>
- *         <sequence minOccurs="0">
- *           <element name="Seed" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
- *           <element name="PgenCounter" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
- *         </sequence>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "DSAKeyValueType", propOrder = { "p", "q", "g", "y", "j", "seed", "pgenCounter" }) -public class DSAKeyValueType { - - @XmlElement(name = "P") - protected byte[] p; - @XmlElement(name = "Q") - protected byte[] q; - @XmlElement(name = "G") - protected byte[] g; - @XmlElement(name = "Y", required = true) - protected byte[] y; - @XmlElement(name = "J") - protected byte[] j; - @XmlElement(name = "Seed") - protected byte[] seed; - @XmlElement(name = "PgenCounter") - protected byte[] pgenCounter; - - /** - * Gets the value of the p property. - * - * @return possible object is byte[] - */ - public byte[] getP() { - return p; - } - - /** - * Sets the value of the p property. - * - * @param value - * allowed object is byte[] - */ - public void setP(byte[] value) { - this.p = value; - } - - /** - * Gets the value of the q property. - * - * @return possible object is byte[] - */ - public byte[] getQ() { - return q; - } - - /** - * Sets the value of the q property. - * - * @param value - * allowed object is byte[] - */ - public void setQ(byte[] value) { - this.q = value; - } - - /** - * Gets the value of the g property. - * - * @return possible object is byte[] - */ - public byte[] getG() { - return g; - } - - /** - * Sets the value of the g property. - * - * @param value - * allowed object is byte[] - */ - public void setG(byte[] value) { - this.g = value; - } - - /** - * Gets the value of the y property. - * - * @return possible object is byte[] - */ - public byte[] getY() { - return y; - } - - /** - * Sets the value of the y property. - * - * @param value - * allowed object is byte[] - */ - public void setY(byte[] value) { - this.y = value; - } - - /** - * Gets the value of the j property. - * - * @return possible object is byte[] - */ - public byte[] getJ() { - return j; - } - - /** - * Sets the value of the j property. - * - * @param value - * allowed object is byte[] - */ - public void setJ(byte[] value) { - this.j = value; - } - - /** - * Gets the value of the seed property. - * - * @return possible object is byte[] - */ - public byte[] getSeed() { - return seed; - } - - /** - * Sets the value of the seed property. - * - * @param value - * allowed object is byte[] - */ - public void setSeed(byte[] value) { - this.seed = value; - } - - /** - * Gets the value of the pgenCounter property. - * - * @return possible object is byte[] - */ - public byte[] getPgenCounter() { - return pgenCounter; - } - - /** - * Sets the value of the pgenCounter property. - * - * @param value - * allowed object is byte[] - */ - public void setPgenCounter(byte[] value) { - this.pgenCounter = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/DigestMethodType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/DigestMethodType.java deleted file mode 100644 index e71a1fdd1..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/DigestMethodType.java +++ /dev/null @@ -1,102 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - -/** - *

- * Java class for DigestMethodType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="DigestMethodType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "DigestMethodType", propOrder = { "content" }) -public class DigestMethodType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "Algorithm", required = true) - @XmlSchemaType(name = "anyURI") - protected String algorithm; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } {@link Element } {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the algorithm property. - * - * @return possible object is {@link String } - * - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Sets the value of the algorithm property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAlgorithm(String value) { - this.algorithm = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/KeyInfoType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/KeyInfoType.java deleted file mode 100644 index b5fbd20b2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/KeyInfoType.java +++ /dev/null @@ -1,126 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.w3c.dom.Element; - -/** - *

- * Java class for KeyInfoType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="KeyInfoType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded">
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyName"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyValue"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}RetrievalMethod"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}X509Data"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}PGPData"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SPKIData"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}MgmtData"/>
- *         <any processContents='lax' namespace='##other'/>
- *       </choice>
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "KeyInfoType", propOrder = { "content" }) -public class KeyInfoType { - - @XmlElementRefs({ @XmlElementRef(name = "PGPData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509Data", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "KeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "KeyName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "SPKIData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "RetrievalMethod", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "MgmtData", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) }) - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link JAXBElement }{@code <}{@link PGPDataType }{@code >} {@link JAXBElement }{@code <}{@link X509DataType }{@code >} {@link Object } - * {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} {@link JAXBElement }{@code <}{@link String }{@code >} {@link Element } {@link String } {@link JAXBElement }{@code <}{@link SPKIDataType } - * {@code >} {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >} {@link JAXBElement }{@code <}{@link String }{@code >} - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/KeyValueType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/KeyValueType.java deleted file mode 100644 index c4d1aea20..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/KeyValueType.java +++ /dev/null @@ -1,83 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - -/** - *

- * Java class for KeyValueType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="KeyValueType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DSAKeyValue"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}RSAKeyValue"/>
- *         <any processContents='lax' namespace='##other'/>
- *       </choice>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "KeyValueType", propOrder = { "content" }) -public class KeyValueType { - - @XmlElementRefs({ @XmlElementRef(name = "RSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "DSAKeyValue", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) }) - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } {@link Element } {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} {@link JAXBElement }{@code <} - * {@link RSAKeyValueType }{@code >} {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ManifestType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ManifestType.java deleted file mode 100644 index cfd4a435d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ManifestType.java +++ /dev/null @@ -1,104 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - *

- * Java class for ManifestType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ManifestType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
- *       </sequence>
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ManifestType", propOrder = { "reference" }) -public class ManifestType { - - @XmlElement(name = "Reference", required = true) - protected List reference; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the reference property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the reference property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getReference().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link ReferenceType } - * - * - */ - public List getReference() { - if (reference == null) { - reference = new ArrayList(); - } - return this.reference; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ObjectFactory.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ObjectFactory.java deleted file mode 100644 index 64a1fd7e3..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ObjectFactory.java +++ /dev/null @@ -1,550 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.math.BigInteger; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlElementDecl; -import javax.xml.bind.annotation.XmlRegistry; -import javax.xml.namespace.QName; - -/** - * This object contains factory methods for each Java content interface and Java element interface generated in the org.w3._2000._09.xmldsig package. - *

- * An ObjectFactory allows you to programatically construct new instances of the Java representation for XML content. The Java representation of XML content can consist of schema derived interfaces - * and classes representing the binding of schema type definitions, element declarations and model groups. Factory methods for each of these are provided in this class. - * - */ -@XmlRegistry -public class ObjectFactory { - - private final static QName _SignatureMethodTypeHMACOutputLength_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "HMACOutputLength"); - private final static QName _PGPData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPData"); - private final static QName _SPKIData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKIData"); - private final static QName _RetrievalMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RetrievalMethod"); - private final static QName _CanonicalizationMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "CanonicalizationMethod"); - private final static QName _SignatureProperty_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperty"); - private final static QName _Manifest_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Manifest"); - private final static QName _Transforms_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transforms"); - private final static QName _SignatureMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureMethod"); - private final static QName _KeyInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyInfo"); - private final static QName _DigestMethod_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestMethod"); - private final static QName _MgmtData_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "MgmtData"); - private final static QName _Reference_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Reference"); - private final static QName _RSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "RSAKeyValue"); - private final static QName _Signature_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Signature"); - private final static QName _DSAKeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DSAKeyValue"); - private final static QName _SignedInfo_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignedInfo"); - private final static QName _Object_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Object"); - private final static QName _SignatureValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureValue"); - private final static QName _Transform_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "Transform"); - private final static QName _X509Data_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Data"); - private final static QName _DigestValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "DigestValue"); - private final static QName _SignatureProperties_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SignatureProperties"); - private final static QName _KeyName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyName"); - private final static QName _KeyValue_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "KeyValue"); - private final static QName _SPKIDataTypeSPKISexp_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "SPKISexp"); - private final static QName _PGPDataTypePGPKeyID_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyID"); - private final static QName _PGPDataTypePGPKeyPacket_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "PGPKeyPacket"); - private final static QName _X509DataTypeX509IssuerSerial_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509IssuerSerial"); - private final static QName _X509DataTypeX509Certificate_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509Certificate"); - private final static QName _X509DataTypeX509SKI_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SKI"); - private final static QName _X509DataTypeX509SubjectName_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509SubjectName"); - private final static QName _X509DataTypeX509CRL_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "X509CRL"); - private final static QName _TransformTypeXPath_QNAME = new QName("http://www.w3.org/2000/09/xmldsig#", "XPath"); - - /** - * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: org.w3._2000._09.xmldsig - * - */ - public ObjectFactory() { - } - - /** - * Create an instance of {@link KeyInfoType } - * - */ - public KeyInfoType createKeyInfoType() { - return new KeyInfoType(); - } - - /** - * Create an instance of {@link SignedInfoType } - * - */ - public SignedInfoType createSignedInfoType() { - return new SignedInfoType(); - } - - /** - * Create an instance of {@link RetrievalMethodType } - * - */ - public RetrievalMethodType createRetrievalMethodType() { - return new RetrievalMethodType(); - } - - /** - * Create an instance of {@link DigestMethodType } - * - */ - public DigestMethodType createDigestMethodType() { - return new DigestMethodType(); - } - - /** - * Create an instance of {@link SignatureMethodType } - * - */ - public SignatureMethodType createSignatureMethodType() { - return new SignatureMethodType(); - } - - /** - * Create an instance of {@link SPKIDataType } - * - */ - public SPKIDataType createSPKIDataType() { - return new SPKIDataType(); - } - - /** - * Create an instance of {@link X509DataType } - * - */ - public X509DataType createX509DataType() { - return new X509DataType(); - } - - /** - * Create an instance of {@link PGPDataType } - * - */ - public PGPDataType createPGPDataType() { - return new PGPDataType(); - } - - /** - * Create an instance of {@link SignatureType } - * - */ - public SignatureType createSignatureType() { - return new SignatureType(); - } - - /** - * Create an instance of {@link DSAKeyValueType } - * - */ - public DSAKeyValueType createDSAKeyValueType() { - return new DSAKeyValueType(); - } - - /** - * Create an instance of {@link ManifestType } - * - */ - public ManifestType createManifestType() { - return new ManifestType(); - } - - /** - * Create an instance of {@link SignatureValueType } - * - */ - public SignatureValueType createSignatureValueType() { - return new SignatureValueType(); - } - - /** - * Create an instance of {@link TransformsType } - * - */ - public TransformsType createTransformsType() { - return new TransformsType(); - } - - /** - * Create an instance of {@link RSAKeyValueType } - * - */ - public RSAKeyValueType createRSAKeyValueType() { - return new RSAKeyValueType(); - } - - /** - * Create an instance of {@link TransformType } - * - */ - public TransformType createTransformType() { - return new TransformType(); - } - - /** - * Create an instance of {@link SignaturePropertyType } - * - */ - public SignaturePropertyType createSignaturePropertyType() { - return new SignaturePropertyType(); - } - - /** - * Create an instance of {@link KeyValueType } - * - */ - public KeyValueType createKeyValueType() { - return new KeyValueType(); - } - - /** - * Create an instance of {@link ReferenceType } - * - */ - public ReferenceType createReferenceType() { - return new ReferenceType(); - } - - /** - * Create an instance of {@link CanonicalizationMethodType } - * - */ - public CanonicalizationMethodType createCanonicalizationMethodType() { - return new CanonicalizationMethodType(); - } - - /** - * Create an instance of {@link SignaturePropertiesType } - * - */ - public SignaturePropertiesType createSignaturePropertiesType() { - return new SignaturePropertiesType(); - } - - /** - * Create an instance of {@link ObjectType } - * - */ - public ObjectType createObjectType() { - return new ObjectType(); - } - - /** - * Create an instance of {@link X509IssuerSerialType } - * - */ - public X509IssuerSerialType createX509IssuerSerialType() { - return new X509IssuerSerialType(); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link BigInteger }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "HMACOutputLength", scope = SignatureMethodType.class) - public JAXBElement createSignatureMethodTypeHMACOutputLength(BigInteger value) { - return new JAXBElement(_SignatureMethodTypeHMACOutputLength_QNAME, BigInteger.class, SignatureMethodType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link PGPDataType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPData") - public JAXBElement createPGPData(PGPDataType value) { - return new JAXBElement(_PGPData_QNAME, PGPDataType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SPKIDataType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKIData") - public JAXBElement createSPKIData(SPKIDataType value) { - return new JAXBElement(_SPKIData_QNAME, SPKIDataType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RetrievalMethodType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RetrievalMethod") - public JAXBElement createRetrievalMethod(RetrievalMethodType value) { - return new JAXBElement(_RetrievalMethod_QNAME, RetrievalMethodType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link CanonicalizationMethodType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "CanonicalizationMethod") - public JAXBElement createCanonicalizationMethod(CanonicalizationMethodType value) { - return new JAXBElement(_CanonicalizationMethod_QNAME, CanonicalizationMethodType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePropertyType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperty") - public JAXBElement createSignatureProperty(SignaturePropertyType value) { - return new JAXBElement(_SignatureProperty_QNAME, SignaturePropertyType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ManifestType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Manifest") - public JAXBElement createManifest(ManifestType value) { - return new JAXBElement(_Manifest_QNAME, ManifestType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TransformsType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transforms") - public JAXBElement createTransforms(TransformsType value) { - return new JAXBElement(_Transforms_QNAME, TransformsType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignatureMethodType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureMethod") - public JAXBElement createSignatureMethod(SignatureMethodType value) { - return new JAXBElement(_SignatureMethod_QNAME, SignatureMethodType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link KeyInfoType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyInfo") - public JAXBElement createKeyInfo(KeyInfoType value) { - return new JAXBElement(_KeyInfo_QNAME, KeyInfoType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DigestMethodType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestMethod") - public JAXBElement createDigestMethod(DigestMethodType value) { - return new JAXBElement(_DigestMethod_QNAME, DigestMethodType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "MgmtData") - public JAXBElement createMgmtData(String value) { - return new JAXBElement(_MgmtData_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ReferenceType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Reference") - public JAXBElement createReference(ReferenceType value) { - return new JAXBElement(_Reference_QNAME, ReferenceType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link RSAKeyValueType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "RSAKeyValue") - public JAXBElement createRSAKeyValue(RSAKeyValueType value) { - return new JAXBElement(_RSAKeyValue_QNAME, RSAKeyValueType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignatureType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Signature") - public JAXBElement createSignature(SignatureType value) { - return new JAXBElement(_Signature_QNAME, SignatureType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link DSAKeyValueType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DSAKeyValue") - public JAXBElement createDSAKeyValue(DSAKeyValueType value) { - return new JAXBElement(_DSAKeyValue_QNAME, DSAKeyValueType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignedInfoType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignedInfo") - public JAXBElement createSignedInfo(SignedInfoType value) { - return new JAXBElement(_SignedInfo_QNAME, SignedInfoType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link ObjectType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Object") - public JAXBElement createObject(ObjectType value) { - return new JAXBElement(_Object_QNAME, ObjectType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignatureValueType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureValue") - public JAXBElement createSignatureValue(SignatureValueType value) { - return new JAXBElement(_SignatureValue_QNAME, SignatureValueType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link TransformType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "Transform") - public JAXBElement createTransform(TransformType value) { - return new JAXBElement(_Transform_QNAME, TransformType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link X509DataType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Data") - public JAXBElement createX509Data(X509DataType value) { - return new JAXBElement(_X509Data_QNAME, X509DataType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "DigestValue") - public JAXBElement createDigestValue(byte[] value) { - return new JAXBElement(_DigestValue_QNAME, byte[].class, null, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link SignaturePropertiesType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SignatureProperties") - public JAXBElement createSignatureProperties(SignaturePropertiesType value) { - return new JAXBElement(_SignatureProperties_QNAME, SignaturePropertiesType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyName") - public JAXBElement createKeyName(String value) { - return new JAXBElement(_KeyName_QNAME, String.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link KeyValueType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "KeyValue") - public JAXBElement createKeyValue(KeyValueType value) { - return new JAXBElement(_KeyValue_QNAME, KeyValueType.class, null, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "SPKISexp", scope = SPKIDataType.class) - public JAXBElement createSPKIDataTypeSPKISexp(byte[] value) { - return new JAXBElement(_SPKIDataTypeSPKISexp_QNAME, byte[].class, SPKIDataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyID", scope = PGPDataType.class) - public JAXBElement createPGPDataTypePGPKeyID(byte[] value) { - return new JAXBElement(_PGPDataTypePGPKeyID_QNAME, byte[].class, PGPDataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "PGPKeyPacket", scope = PGPDataType.class) - public JAXBElement createPGPDataTypePGPKeyPacket(byte[] value) { - return new JAXBElement(_PGPDataTypePGPKeyPacket_QNAME, byte[].class, PGPDataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509IssuerSerial", scope = X509DataType.class) - public JAXBElement createX509DataTypeX509IssuerSerial(X509IssuerSerialType value) { - return new JAXBElement(_X509DataTypeX509IssuerSerial_QNAME, X509IssuerSerialType.class, X509DataType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509Certificate", scope = X509DataType.class) - public JAXBElement createX509DataTypeX509Certificate(byte[] value) { - return new JAXBElement(_X509DataTypeX509Certificate_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SKI", scope = X509DataType.class) - public JAXBElement createX509DataTypeX509SKI(byte[] value) { - return new JAXBElement(_X509DataTypeX509SKI_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509SubjectName", scope = X509DataType.class) - public JAXBElement createX509DataTypeX509SubjectName(String value) { - return new JAXBElement(_X509DataTypeX509SubjectName_QNAME, String.class, X509DataType.class, value); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "X509CRL", scope = X509DataType.class) - public JAXBElement createX509DataTypeX509CRL(byte[] value) { - return new JAXBElement(_X509DataTypeX509CRL_QNAME, byte[].class, X509DataType.class, ((byte[]) value)); - } - - /** - * Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >} - * - */ - @XmlElementDecl(namespace = "http://www.w3.org/2000/09/xmldsig#", name = "XPath", scope = TransformType.class) - public JAXBElement createTransformTypeXPath(String value) { - return new JAXBElement(_TransformTypeXPath_QNAME, String.class, TransformType.class, value); - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ObjectType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ObjectType.java deleted file mode 100644 index 8f8573ead..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ObjectType.java +++ /dev/null @@ -1,156 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.w3c.dom.Element; - -/** - *

- * Java class for ObjectType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ObjectType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence maxOccurs="unbounded" minOccurs="0">
- *         <any processContents='lax'/>
- *       </sequence>
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *       <attribute name="MimeType" type="{http://www.w3.org/2001/XMLSchema}string" />
- *       <attribute name="Encoding" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ObjectType", propOrder = { "content" }) -public class ObjectType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - @XmlAttribute(name = "MimeType") - protected String mimeType; - @XmlAttribute(name = "Encoding") - @XmlSchemaType(name = "anyURI") - protected String encoding; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } {@link Element } {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Gets the value of the mimeType property. - * - * @return possible object is {@link String } - * - */ - public String getMimeType() { - return mimeType; - } - - /** - * Sets the value of the mimeType property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setMimeType(String value) { - this.mimeType = value; - } - - /** - * Gets the value of the encoding property. - * - * @return possible object is {@link String } - * - */ - public String getEncoding() { - return encoding; - } - - /** - * Sets the value of the encoding property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setEncoding(String value) { - this.encoding = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/PGPDataType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/PGPDataType.java deleted file mode 100644 index a43e2857c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/PGPDataType.java +++ /dev/null @@ -1,93 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - -/** - *

- * Java class for PGPDataType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="PGPDataType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice>
- *         <sequence>
- *           <element name="PGPKeyID" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *           <element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary" minOccurs="0"/>
- *           <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *         </sequence>
- *         <sequence>
- *           <element name="PGPKeyPacket" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *           <any processContents='lax' namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *         </sequence>
- *       </choice>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "PGPDataType", propOrder = { "content" }) -public class PGPDataType { - - @XmlElementRefs({ @XmlElementRef(name = "PGPKeyPacket", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "PGPKeyID", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) }) - @XmlAnyElement(lax = true) - protected List content; - - /** - * Gets the rest of the content model. - * - *

- * You are getting this "catch-all" property because of the following reason: The field name "PGPKeyPacket" is used by two different parts of a schema. See: line 209 of - * file:/C:/Source/LatestSource/webgate.ec.europa.eu/branches/IS_branch/Commons/src/main/resources/schema/xmldsig-core-schema.xsd line 204 of - * file:/C:/Source/LatestSource/webgate.ec.europa.eu/branches/IS_branch/Commons/src/main/resources/schema/xmldsig-core-schema.xsd - *

- * To get rid of this property, apply a property customization to one of both of the following declarations to change their names: Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } {@link JAXBElement }{@code <}{@link byte[]}{@code >} {@link Element } {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/RSAKeyValueType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/RSAKeyValueType.java deleted file mode 100644 index eedb02899..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/RSAKeyValueType.java +++ /dev/null @@ -1,84 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for RSAKeyValueType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="RSAKeyValueType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="Modulus" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
- *         <element name="Exponent" type="{http://www.w3.org/2000/09/xmldsig#}CryptoBinary"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "RSAKeyValueType", propOrder = { "modulus", "exponent" }) -public class RSAKeyValueType { - - @XmlElement(name = "Modulus", required = true) - protected byte[] modulus; - @XmlElement(name = "Exponent", required = true) - protected byte[] exponent; - - /** - * Gets the value of the modulus property. - * - * @return possible object is byte[] - */ - public byte[] getModulus() { - return modulus; - } - - /** - * Sets the value of the modulus property. - * - * @param value - * allowed object is byte[] - */ - public void setModulus(byte[] value) { - this.modulus = value; - } - - /** - * Gets the value of the exponent property. - * - * @return possible object is byte[] - */ - public byte[] getExponent() { - return exponent; - } - - /** - * Sets the value of the exponent property. - * - * @param value - * allowed object is byte[] - */ - public void setExponent(byte[] value) { - this.exponent = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ReferenceType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ReferenceType.java deleted file mode 100644 index 83f03f3c8..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/ReferenceType.java +++ /dev/null @@ -1,192 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - *

- * Java class for ReferenceType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="ReferenceType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestMethod"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}DigestValue"/>
- *       </sequence>
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "ReferenceType", propOrder = { "transforms", "digestMethod", "digestValue" }) -public class ReferenceType { - - @XmlElement(name = "Transforms") - protected TransformsType transforms; - @XmlElement(name = "DigestMethod", required = true) - protected DigestMethodType digestMethod; - @XmlElement(name = "DigestValue", required = true) - protected byte[] digestValue; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - @XmlAttribute(name = "URI") - @XmlSchemaType(name = "anyURI") - protected String uri; - @XmlAttribute(name = "Type") - @XmlSchemaType(name = "anyURI") - protected String type; - - /** - * Gets the value of the transforms property. - * - * @return possible object is {@link TransformsType } - * - */ - public TransformsType getTransforms() { - return transforms; - } - - /** - * Sets the value of the transforms property. - * - * @param value - * allowed object is {@link TransformsType } - * - */ - public void setTransforms(TransformsType value) { - this.transforms = value; - } - - /** - * Gets the value of the digestMethod property. - * - * @return possible object is {@link DigestMethodType } - * - */ - public DigestMethodType getDigestMethod() { - return digestMethod; - } - - /** - * Sets the value of the digestMethod property. - * - * @param value - * allowed object is {@link DigestMethodType } - * - */ - public void setDigestMethod(DigestMethodType value) { - this.digestMethod = value; - } - - /** - * Gets the value of the digestValue property. - * - * @return possible object is byte[] - */ - public byte[] getDigestValue() { - return digestValue; - } - - /** - * Sets the value of the digestValue property. - * - * @param value - * allowed object is byte[] - */ - public void setDigestValue(byte[] value) { - this.digestValue = value; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - - /** - * Gets the value of the uri property. - * - * @return possible object is {@link String } - * - */ - public String getURI() { - return uri; - } - - /** - * Sets the value of the uri property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setURI(String value) { - this.uri = value; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/RetrievalMethodType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/RetrievalMethodType.java deleted file mode 100644 index 6f1a94de5..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/RetrievalMethodType.java +++ /dev/null @@ -1,116 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for RetrievalMethodType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="RetrievalMethodType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transforms" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="URI" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="Type" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "RetrievalMethodType", propOrder = { "transforms" }) -public class RetrievalMethodType { - - @XmlElement(name = "Transforms") - protected TransformsType transforms; - @XmlAttribute(name = "URI") - @XmlSchemaType(name = "anyURI") - protected String uri; - @XmlAttribute(name = "Type") - @XmlSchemaType(name = "anyURI") - protected String type; - - /** - * Gets the value of the transforms property. - * - * @return possible object is {@link TransformsType } - * - */ - public TransformsType getTransforms() { - return transforms; - } - - /** - * Sets the value of the transforms property. - * - * @param value - * allowed object is {@link TransformsType } - * - */ - public void setTransforms(TransformsType value) { - this.transforms = value; - } - - /** - * Gets the value of the uri property. - * - * @return possible object is {@link String } - * - */ - public String getURI() { - return uri; - } - - /** - * Sets the value of the uri property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setURI(String value) { - this.uri = value; - } - - /** - * Gets the value of the type property. - * - * @return possible object is {@link String } - * - */ - public String getType() { - return type; - } - - /** - * Sets the value of the type property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setType(String value) { - this.type = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SPKIDataType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SPKIDataType.java deleted file mode 100644 index 5199fb0e2..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SPKIDataType.java +++ /dev/null @@ -1,77 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - -/** - *

- * Java class for SPKIDataType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="SPKIDataType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence maxOccurs="unbounded">
- *         <element name="SPKISexp" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *         <any processContents='lax' namespace='##other' minOccurs="0"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SPKIDataType", propOrder = { "spkiSexpAndAny" }) -public class SPKIDataType { - - @XmlElementRef(name = "SPKISexp", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class) - @XmlAnyElement(lax = true) - protected List spkiSexpAndAny; - - /** - * Gets the value of the spkiSexpAndAny property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the spkiSexpAndAny property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getSPKISexpAndAny().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Element } {@link JAXBElement }{@code <}{@link byte[]}{@code >} {@link Object } - * - * - */ - public List getSPKISexpAndAny() { - if (spkiSexpAndAny == null) { - spkiSexpAndAny = new ArrayList(); - } - return this.spkiSexpAndAny; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureMethodType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureMethodType.java deleted file mode 100644 index 4f5658011..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureMethodType.java +++ /dev/null @@ -1,106 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.math.BigInteger; -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for SignatureMethodType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="SignatureMethodType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="HMACOutputLength" type="{http://www.w3.org/2000/09/xmldsig#}HMACOutputLengthType" minOccurs="0"/>
- *         <any namespace='##other' maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignatureMethodType", propOrder = { "content" }) -public class SignatureMethodType { - - @XmlElementRef(name = "HMACOutputLength", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "Algorithm", required = true) - @XmlSchemaType(name = "anyURI") - protected String algorithm; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link JAXBElement }{@code <}{@link BigInteger }{@code >} {@link Object } {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the algorithm property. - * - * @return possible object is {@link String } - * - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Sets the value of the algorithm property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAlgorithm(String value) { - this.algorithm = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignaturePropertiesType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignaturePropertiesType.java deleted file mode 100644 index 481abd165..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignaturePropertiesType.java +++ /dev/null @@ -1,104 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - *

- * Java class for SignaturePropertiesType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="SignaturePropertiesType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureProperty" maxOccurs="unbounded"/>
- *       </sequence>
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignaturePropertiesType", propOrder = { "signatureProperty" }) -public class SignaturePropertiesType { - - @XmlElement(name = "SignatureProperty", required = true) - protected List signatureProperty; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the signatureProperty property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the signatureProperty property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getSignatureProperty().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link SignaturePropertyType } - * - * - */ - public List getSignatureProperty() { - if (signatureProperty == null) { - signatureProperty = new ArrayList(); - } - return this.signatureProperty; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignaturePropertyType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignaturePropertyType.java deleted file mode 100644 index 027675315..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignaturePropertyType.java +++ /dev/null @@ -1,132 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; -import org.w3c.dom.Element; - -/** - *

- * Java class for SignaturePropertyType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="SignaturePropertyType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded">
- *         <any processContents='lax' namespace='##other'/>
- *       </choice>
- *       <attribute name="Target" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignaturePropertyType", propOrder = { "content" }) -public class SignaturePropertyType { - - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "Target", required = true) - @XmlSchemaType(name = "anyURI") - protected String target; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } {@link Element } {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the target property. - * - * @return possible object is {@link String } - * - */ - public String getTarget() { - return target; - } - - /** - * Sets the value of the target property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setTarget(String value) { - this.target = value; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureType.java deleted file mode 100644 index 131cee1bc..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureType.java +++ /dev/null @@ -1,176 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - *

- * Java class for SignatureType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="SignatureType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignedInfo"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureValue"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}KeyInfo" minOccurs="0"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Object" maxOccurs="unbounded" minOccurs="0"/>
- *       </sequence>
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignatureType", propOrder = { "signedInfo", "signatureValue", "keyInfo", "object" }) -public class SignatureType { - - @XmlElement(name = "SignedInfo", required = true) - protected SignedInfoType signedInfo; - @XmlElement(name = "SignatureValue", required = true) - protected SignatureValueType signatureValue; - @XmlElement(name = "KeyInfo") - protected KeyInfoType keyInfo; - @XmlElement(name = "Object") - protected List object; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the signedInfo property. - * - * @return possible object is {@link SignedInfoType } - * - */ - public SignedInfoType getSignedInfo() { - return signedInfo; - } - - /** - * Sets the value of the signedInfo property. - * - * @param value - * allowed object is {@link SignedInfoType } - * - */ - public void setSignedInfo(SignedInfoType value) { - this.signedInfo = value; - } - - /** - * Gets the value of the signatureValue property. - * - * @return possible object is {@link SignatureValueType } - * - */ - public SignatureValueType getSignatureValue() { - return signatureValue; - } - - /** - * Sets the value of the signatureValue property. - * - * @param value - * allowed object is {@link SignatureValueType } - * - */ - public void setSignatureValue(SignatureValueType value) { - this.signatureValue = value; - } - - /** - * Gets the value of the keyInfo property. - * - * @return possible object is {@link KeyInfoType } - * - */ - public KeyInfoType getKeyInfo() { - return keyInfo; - } - - /** - * Sets the value of the keyInfo property. - * - * @param value - * allowed object is {@link KeyInfoType } - * - */ - public void setKeyInfo(KeyInfoType value) { - this.keyInfo = value; - } - - /** - * Gets the value of the object property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the object property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getObject().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link ObjectType } - * - * - */ - public List getObject() { - if (object == null) { - object = new ArrayList(); - } - return this.object; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureValueType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureValueType.java deleted file mode 100644 index af43e55cd..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignatureValueType.java +++ /dev/null @@ -1,91 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.XmlValue; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - *

- * Java class for SignatureValueType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="SignatureValueType">
- *   <simpleContent>
- *     <extension base="<http://www.w3.org/2001/XMLSchema>base64Binary">
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </extension>
- *   </simpleContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignatureValueType", propOrder = { "value" }) -public class SignatureValueType { - - @XmlValue - protected byte[] value; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the value property. - * - * @return possible object is byte[] - */ - public byte[] getValue() { - return value; - } - - /** - * Sets the value of the value property. - * - * @param value - * allowed object is byte[] - */ - public void setValue(byte[] value) { - this.value = value; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignedInfoType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignedInfoType.java deleted file mode 100644 index 2523af53c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/SignedInfoType.java +++ /dev/null @@ -1,152 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlID; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; -import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; - -/** - *

- * Java class for SignedInfoType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="SignedInfoType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}SignatureMethod"/>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Reference" maxOccurs="unbounded"/>
- *       </sequence>
- *       <attribute name="Id" type="{http://www.w3.org/2001/XMLSchema}ID" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "SignedInfoType", propOrder = { "canonicalizationMethod", "signatureMethod", "reference" }) -public class SignedInfoType { - - @XmlElement(name = "CanonicalizationMethod", required = true) - protected CanonicalizationMethodType canonicalizationMethod; - @XmlElement(name = "SignatureMethod", required = true) - protected SignatureMethodType signatureMethod; - @XmlElement(name = "Reference", required = true) - protected List reference; - @XmlAttribute(name = "Id") - @XmlJavaTypeAdapter(CollapsedStringAdapter.class) - @XmlID - @XmlSchemaType(name = "ID") - protected String id; - - /** - * Gets the value of the canonicalizationMethod property. - * - * @return possible object is {@link CanonicalizationMethodType } - * - */ - public CanonicalizationMethodType getCanonicalizationMethod() { - return canonicalizationMethod; - } - - /** - * Sets the value of the canonicalizationMethod property. - * - * @param value - * allowed object is {@link CanonicalizationMethodType } - * - */ - public void setCanonicalizationMethod(CanonicalizationMethodType value) { - this.canonicalizationMethod = value; - } - - /** - * Gets the value of the signatureMethod property. - * - * @return possible object is {@link SignatureMethodType } - * - */ - public SignatureMethodType getSignatureMethod() { - return signatureMethod; - } - - /** - * Sets the value of the signatureMethod property. - * - * @param value - * allowed object is {@link SignatureMethodType } - * - */ - public void setSignatureMethod(SignatureMethodType value) { - this.signatureMethod = value; - } - - /** - * Gets the value of the reference property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the reference property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getReference().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link ReferenceType } - * - * - */ - public List getReference() { - if (reference == null) { - reference = new ArrayList(); - } - return this.reference; - } - - /** - * Gets the value of the id property. - * - * @return possible object is {@link String } - * - */ - public String getId() { - return id; - } - - /** - * Sets the value of the id property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setId(String value) { - this.id = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/TransformType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/TransformType.java deleted file mode 100644 index f47dc1251..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/TransformType.java +++ /dev/null @@ -1,106 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlAttribute; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlMixed; -import javax.xml.bind.annotation.XmlSchemaType; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - -/** - *

- * Java class for TransformType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="TransformType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <choice maxOccurs="unbounded" minOccurs="0">
- *         <any processContents='lax' namespace='##other'/>
- *         <element name="XPath" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *       </choice>
- *       <attribute name="Algorithm" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TransformType", propOrder = { "content" }) -public class TransformType { - - @XmlElementRef(name = "XPath", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) - @XmlMixed - @XmlAnyElement(lax = true) - protected List content; - @XmlAttribute(name = "Algorithm", required = true) - @XmlSchemaType(name = "anyURI") - protected String algorithm; - - /** - * Gets the value of the content property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the content property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getContent().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link Object } {@link JAXBElement }{@code <}{@link String }{@code >} {@link Element } {@link String } - * - * - */ - public List getContent() { - if (content == null) { - content = new ArrayList(); - } - return this.content; - } - - /** - * Gets the value of the algorithm property. - * - * @return possible object is {@link String } - * - */ - public String getAlgorithm() { - return algorithm; - } - - /** - * Sets the value of the algorithm property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setAlgorithm(String value) { - this.algorithm = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/TransformsType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/TransformsType.java deleted file mode 100644 index b31f36764..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/TransformsType.java +++ /dev/null @@ -1,72 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for TransformsType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="TransformsType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element ref="{http://www.w3.org/2000/09/xmldsig#}Transform" maxOccurs="unbounded"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "TransformsType", propOrder = { "transform" }) -public class TransformsType { - - @XmlElement(name = "Transform", required = true) - protected List transform; - - /** - * Gets the value of the transform property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the transform property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getTransform().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link TransformType } - * - * - */ - public List getTransform() { - if (transform == null) { - transform = new ArrayList(); - } - return this.transform; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/X509DataType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/X509DataType.java deleted file mode 100644 index b6260d67d..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/X509DataType.java +++ /dev/null @@ -1,89 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.util.ArrayList; -import java.util.List; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlAnyElement; -import javax.xml.bind.annotation.XmlElementRef; -import javax.xml.bind.annotation.XmlElementRefs; -import javax.xml.bind.annotation.XmlType; -import org.w3c.dom.Element; - -/** - *

- * Java class for X509DataType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="X509DataType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence maxOccurs="unbounded">
- *         <choice>
- *           <element name="X509IssuerSerial" type="{http://www.w3.org/2000/09/xmldsig#}X509IssuerSerialType"/>
- *           <element name="X509SKI" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *           <element name="X509SubjectName" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *           <element name="X509Certificate" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *           <element name="X509CRL" type="{http://www.w3.org/2001/XMLSchema}base64Binary"/>
- *           <any processContents='lax' namespace='##other'/>
- *         </choice>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "X509DataType", propOrder = { "x509IssuerSerialOrX509SKIOrX509SubjectName" }) -public class X509DataType { - - @XmlElementRefs({ @XmlElementRef(name = "X509SubjectName", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509Certificate", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509CRL", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509SKI", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false), - @XmlElementRef(name = "X509IssuerSerial", namespace = "http://www.w3.org/2000/09/xmldsig#", type = JAXBElement.class, required = false) }) - @XmlAnyElement(lax = true) - protected List x509IssuerSerialOrX509SKIOrX509SubjectName; - - /** - * Gets the value of the x509IssuerSerialOrX509SKIOrX509SubjectName property. - * - *

- * This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is - * not a set method for the x509IssuerSerialOrX509SKIOrX509SubjectName property. - * - *

- * For example, to add a new item, do as follows: - * - *

-	 * getX509IssuerSerialOrX509SKIOrX509SubjectName().add(newItem);
-	 * 
- * - * - *

- * Objects of the following type(s) are allowed in the list {@link JAXBElement }{@code <}{@link byte[]}{@code >} {@link JAXBElement }{@code <}{@link byte[]}{@code >} {@link Object } {@link Element } - * {@link JAXBElement }{@code <}{@link String }{@code >} {@link JAXBElement }{@code <}{@link X509IssuerSerialType }{@code >} {@link JAXBElement }{@code <}{@link byte[]}{@code >} - * - * - */ - public List getX509IssuerSerialOrX509SKIOrX509SubjectName() { - if (x509IssuerSerialOrX509SKIOrX509SubjectName == null) { - x509IssuerSerialOrX509SKIOrX509SubjectName = new ArrayList(); - } - return this.x509IssuerSerialOrX509SKIOrX509SubjectName; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/X509IssuerSerialType.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/X509IssuerSerialType.java deleted file mode 100644 index 7da3185c8..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/X509IssuerSerialType.java +++ /dev/null @@ -1,89 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - -import java.math.BigInteger; -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlType; - -/** - *

- * Java class for X509IssuerSerialType complex type. - * - *

- * The following schema fragment specifies the expected content contained within this class. - * - *

- * <complexType name="X509IssuerSerialType">
- *   <complexContent>
- *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
- *       <sequence>
- *         <element name="X509IssuerName" type="{http://www.w3.org/2001/XMLSchema}string"/>
- *         <element name="X509SerialNumber" type="{http://www.w3.org/2001/XMLSchema}integer"/>
- *       </sequence>
- *     </restriction>
- *   </complexContent>
- * </complexType>
- * 
- * - * - */ -@XmlAccessorType(XmlAccessType.FIELD) -@XmlType(name = "X509IssuerSerialType", propOrder = { "x509IssuerName", "x509SerialNumber" }) -public class X509IssuerSerialType { - - @XmlElement(name = "X509IssuerName", required = true) - protected String x509IssuerName; - @XmlElement(name = "X509SerialNumber", required = true) - protected BigInteger x509SerialNumber; - - /** - * Gets the value of the x509IssuerName property. - * - * @return possible object is {@link String } - * - */ - public String getX509IssuerName() { - return x509IssuerName; - } - - /** - * Sets the value of the x509IssuerName property. - * - * @param value - * allowed object is {@link String } - * - */ - public void setX509IssuerName(String value) { - this.x509IssuerName = value; - } - - /** - * Gets the value of the x509SerialNumber property. - * - * @return possible object is {@link BigInteger } - * - */ - public BigInteger getX509SerialNumber() { - return x509SerialNumber; - } - - /** - * Sets the value of the x509SerialNumber property. - * - * @param value - * allowed object is {@link BigInteger } - * - */ - public void setX509SerialNumber(BigInteger value) { - this.x509SerialNumber = value; - } - -} diff --git a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/package-info.java b/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/package-info.java deleted file mode 100644 index 52572b90c..000000000 --- a/id/server/stork2-commons/src/main/java/eu/stork/peps/complex/attributes/org/w3/_2000/_09/xmldsig/package-info.java +++ /dev/null @@ -1,10 +0,0 @@ -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2014.04.12 at 12:22:50 PM GMT -// - -@javax.xml.bind.annotation.XmlSchema(namespace = "http://www.w3.org/2000/09/xmldsig#", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) -package eu.stork.peps.complex.attributes.org.w3._2000._09.xmldsig; - diff --git a/id/server/stork2-commons/src/main/resources/log4j.xml b/id/server/stork2-commons/src/main/resources/log4j.xml deleted file mode 100644 index a3055599b..000000000 --- a/id/server/stork2-commons/src/main/resources/log4j.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/id/server/stork2-commons/src/main/resources/schema/StorkcomplexAttributes.xsd b/id/server/stork2-commons/src/main/resources/schema/StorkcomplexAttributes.xsd deleted file mode 100644 index 6db304388..000000000 --- a/id/server/stork2-commons/src/main/resources/schema/StorkcomplexAttributes.xsd +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-commons/src/main/resources/schema/crue-academic-language-diplomasupplement-schema-1_1.xsd b/id/server/stork2-commons/src/main/resources/schema/crue-academic-language-diplomasupplement-schema-1_1.xsd deleted file mode 100644 index 3728a7904..000000000 --- a/id/server/stork2-commons/src/main/resources/schema/crue-academic-language-diplomasupplement-schema-1_1.xsd +++ /dev/null @@ -1,3778 +0,0 @@ - - - - - - - - Academic year constraint YYYY-YY. (e.g. 2005-06, 2006-07, ...) - - - - - - - - ISO 3166-1-alpha-2 - - - - - Andorra - - - - - United Arab Emirates - - - - - Afghanistan - - - - - Antigua and Barbuda - - - - - Albania - - - - - Armenia - - - - - Angola - - - - - Argentina - - - - - Austria - - - - - Australia - - - - - Azerbaijan - - - - - Bosnia and Herzegovina - - - - - Barbados - - - - - Bangladesh - - - - - Belgium - - - - - Burkina Faso - - - - - Bulgaria - - - - - Bahrain - - - - - Burundi - - - - - Benin - - - - - Brunei Darussalam - - - - - Bolivia - - - - - Brazil - - - - - Bahamas - - - - - Bhutan - - - - - Botswana - - - - - Belarus - - - - - Belize - - - - - Canada - - - - - Congo, Democratic Republic of the - - - - - Central African Republic - - - - - Congo, Republic of the - - - - - Switzerland - - - - - Cote d/Ivoire - - - - - Chile - - - - - Cameroon - - - - - China - - - - - Colombia - - - - - Costa Rica - - - - - Cuba - - - - - Cape Verde - - - - - Cyprus - - - - - Czech Republic - - - - - Germany - - - - - Djibouti - - - - - Denmark - - - - - Dominica - - - - - Dominican Republic - - - - - Algeria - - - - - Ecuador - - - - - Estonia - - - - - Egypt - - - - - Eritrea - - - - - Spain - - - - - Ethiopia - - - - - Finland - - - - - Fiji - - - - - Federated States of Micronesia - - - - - France - - - - - Gabon - - - - - United Kingdom - - - - - Grenada - - - - - Georgia - - - - - Ghana - - - - - Greenland - - - - - Gambia - - - - - Guinea - - - - - Equatorial Guinea - - - - - Greece - - - - - Guatemala - - - - - Guinea-Bissau - - - - - Guyana - - - - - Honduras - - - - - Croatia - - - - - Haiti - - - - - Hungary - - - - - Indonesia - - - - - Ireland - - - - - Israel - - - - - India - - - - - Iraq - - - - - Iran - - - - - Iceland - - - - - Italy - - - - - Jamaica - - - - - Jordan - - - - - Japan - - - - - Kenya - - - - - Kyrgyzstan - - - - - Cambodia - - - - - Kiribati - - - - - Comoros - - - - - Saint Kitts and Nevis - - - - - Korea, Democratic People/s Republic - - - - - Korea, Republic of - - - - - Kuwait - - - - - Kazakstan - - - - - Lao People/s Democratic Republic - - - - - Lebanon - - - - - Saint Lucia - - - - - Liechtenstein - - - - - Sri Lanka - - - - - Liberia - - - - - Lesotho - - - - - Lithuania - - - - - Luxembourg - - - - - Latvia - - - - - Libyan Arab Jamahiriya - - - - - Morocco - - - - - Monaco - - - - - Moldova, Republic of - - - - - Montenegro - - - - - Madagascar - - - - - Marshall Islands - - - - - Macedonia, the former Yugoslav Republic of - - - - - Mali - - - - - Myanmar - - - - - Mongolia - - - - - Mauritania - - - - - Malta - - - - - Mauritius - - - - - Maldives - - - - - Malawi - - - - - Mexico - - - - - Malaysia - - - - - Mozambique - - - - - Namibia - - - - - Niger - - - - - Nigeria - - - - - Nicaragua - - - - - Netherlands - - - - - Norway - - - - - Nepal - - - - - Nauru - - - - - Niue - - - - - New Zealand - - - - - Oman - - - - - Panama - - - - - Peru - - - - - Papua New Guinea - - - - - Philippines - - - - - Pakistan - - - - - Poland - - - - - Puerto Rico - - - - - Palestinian Territory, Occupied - - - - - Portugal - - - - - Palau - - - - - Paraguay - - - - - Qatar - - - - - Romania - - - - - Serbia - - - - - Russian Federation - - - - - Rwanda - - - - - Saudi Arabia - - - - - Solomon Islands - - - - - Seychelles - - - - - Sudan - - - - - Sweden - - - - - Singapore - - - - - Slovenia - - - - - Slovakia - - - - - Sierra Leone - - - - - San Marino - - - - - Senegal - - - - - Somalia - - - - - Suriname - - - - - Sao Tome and Principe - - - - - El Salvador - - - - - Syrian Arab Republic - - - - - Swaziland - - - - - Chad - - - - - Togo - - - - - Thailand - - - - - Tajikistan - - - - - Timor-Leste - - - - - Turkmenistan - - - - - Tunisia - - - - - Tonga - - - - - Turkey - - - - - Trindidad and Tobago - - - - - Tuvalu - - - - - Tanzania, United republic of - - - - - Ukraina - - - - - Uganda - - - - - United States - - - - - Uruguay - - - - - Uzbekistan - - - - - Holy See (Vatican City State) - - - - - Saint Vincent and the Granadines - - - - - Venezuela - - - - - Viet Nam - - - - - Vanuatu - - - - - Samoa - - - - - Yemen - - - - - South Africa - - - - - Zambia - - - - - Zimbabwe - - - - - - - Type of course unit - - - - - Compulsory - - - - - Optional - - - - - - - Date format yyyy-mm-dd. Ex.: 2013-05-04, ... - - - - - - ECTS grading scale - - - - - Top 10% - - - - - Next 25% - - - - - Next 30% - - - - - Next 25% - - - - - Lowest 10% - - - - - Fail - - - - - Fail - - - - - - - E-Mail address constraint - - - - - - EHEA Framework (Bologna: Framework of Qualifications/European Qualifications Framework) - - - - - First Cycle - - - - - Second Cycle - - - - - Third Cycle - - - - - - - Empty text constraint - - - - Empty text constraint - - - - - - - Gender - - - - - Female - - - - - Male - - - - - - - MIME: Type image - - - - - GIF image - - - - - JPEG JFIF image - - - - - JPEG JFIF image - - - - - Portable Network Graphics - - - - - Tag Image File Format - - - - - - - International Standard Classification of Education (ISCED) 1997 - - - - - Level 0: Pre-primary education - - - - - Level 1: Primary education or first stage of basic education - - - - - Level 2: Lower secondary education or second stage of basic education - - - - - Level 3: Upper secondary education - - - - - Level 4: Post-secondary non-tertiary education - - - - - Level 5A: First stage of tertiary education: largely theoretically based programmes intended to provide qualifications for gaining entry into more advanced research programmes and professions with higher skills requirements - - - - - Level 5B: First stage of tertiary education: shorter, more practical/technical/occupationally specific prgrammes leading to professional qualifications - - - - - Level 6: Second stage of tertiary education (leading to an advanced research qualification) - - - - - - - International Standard Classification of Education (ISCED) 2011 - - - - - Level 0: Early childhood Education - - - - - Level 1: Primary education - - - - - Level 2: Lower secondary education - - - - - Level 3: Upper secondary education - - - - - Level 4: Post-secondary non-tertiary education - - - - - Level 5: Short-cycle teriary education - - - - - Level 6: Bachelor or equivalent - - - - - Level 7: Master or equivalent - - - - - Level 8: Doctoral or equivalent - - - - - - - ISO 639-1 languages - - - - - Abkhazian - - - - - Afrikaans - - - - - Aragonese - - - - - Arabic - - - - - Assamese - - - - - Azerbaijani - - - - - Belarusian - - - - - Bulgarian - - - - - Bengali - - - - - Tibetan - - - - - Breton - - - - - Bosnian - - - - - Catalan / Valencian - - - - - Chechen - - - - - Corsican - - - - - Czech - - - - - Welsh - - - - - Danish - - - - - German - - - - - Greek - - - - - English - - - - - Spanish / Castilian - - - - - Estonian - - - - - Basque - - - - - Persian - - - - - Finnish - - - - - Fijian - - - - - Faroese - - - - - French - - - - - Western Frisian - - - - - Irish - - - - - Gaelic / Scottish Gaelic - - - - - Galician - - - - - Manx - - - - - Ancient Greek - - - - - Alemanic; Swiss German - - - - - Hebrew - - - - - Hindi - - - - - Croatian - - - - - Haitian; Haitian Creole - - - - - Hungarian - - - - - Armenian - - - - - Indonesian - - - - - Icelandic - - - - - Italian - - - - - Japanese - - - - - Javanese - - - - - Georgian - - - - - Kongo - - - - - Korean - - - - - Kurdish - - - - - Cornish - - - - - Kirghiz - - - - - Luxembourgish; Letzeburgesch - - - - - Limburgan; Limburger; Limburgish - - - - - Lingala - - - - - Lithuanian - - - - - Latvian - - - - - Malagasy - - - - - Macedonian - - - - - Mongolian - - - - - Moldavian - - - - - Malay - - - - - Maltese - - - - - Burmese - - - - - Norwegian (Bokmål) - - - - - Nepali - - - - - Dutch - - - - - Norwegian (Nynorsk) - - - - - Norwegian - - - - - Polish - - - - - Portuguese - - - - - Raeto-Romance - - - - - Romanian - - - - - Russian - - - - - Sardinian - - - - - Northern Sami - - - - - Slovak - - - - - Slovenian - - - - - Somali - - - - - Albanian - - - - - Serbian - - - - - Swedish - - - - - Swahili - - - - - Turkmen - - - - - Turkish - - - - - Tahitian - - - - - Ukrainian - - - - - Urdu - - - - - Uzbek - - - - - Vietnamese - - - - - Yiddish - - - - - Chinese - - - - - Church Slavic - - - - - Esperanto - - - - - Latin - - - - - Occitan (post 1500); Provençal - - - - - VVolapük - - - - - - - MIME types - - - - - GIF image - - - - - JPEG JFIF image - - - - - JPEG JFIF image - - - - - Portable Network Graphics - - - - - Tag Image File Format - - - - - HTML - - - - - Portable Document Format - - - - - - - Mode of study - - - - - Full time - - - - - Par time - - - - - Distance - - - - - eLearning - - - - - Another - - - - - - - Model of delivery - - - - - Face-to-face - - - - - Distance learning - - - - - - - National Framework of Qualifications (NFQ) Level - - - - - - Plain text constraint - - - - Non empty text - - - - - - - Percent constraint - - - - Restriction between 0 and 100 - - - - - - - - Positive decimal number - - - - Positive decimal numbers restriction - - - - - - - Positive integer number - - - - Positive integer numbers restriction - - - - - - - Source of the course unit performance - - - - - Recognized - - - - - Course unit attended in mobility programme - - - - - Another - - - - - - - Uniform Resource Locator (URL) - - - - http and https restriction - - - - - - - - Additional information - - - - - Specific information - - - - - Other sources - - - - - - - Address - - - - - Name, street, PO box, ... - - - - - City - - - - - State or region - - - - - Postal code - - - - - Country - - - - - - - Country code ISO 3166-1-alpha-2 - - - - - - - - - - - Data file - - - - - Description - - - - - MIME type code - - - - - Base64 binary data - - - - - - - URL reference to the file - - - - - Description - - - - - MIME type code - - - - - URL - - - - - - - Image data file - - - - - Description - - - - - MIME type image code - - - - - Base64 binary data - - - - - - - URL reference to the image file - - - - - Description - - - - - MIME type image code - - - - - URL - - - - - - - Attachment resource - - - - - Data file - - - - - URL reference to the file - - - - - Image data file - - - - - URL reference to the image file - - - - - - Attached identifier - - - - - - Attachments resources - - - - - Attachment resource - - - - - - - Certification of the Supplement - - - - - Date was issued - - - - - Officials certifying - - - - - Official stamp or seal of the institution - - - - - - - Contact information - - - - - Address - - - - - Phone number - - - - - E-Mail address - - - - - Web site - - - - - - - - - Mobility programme - - - - - - - Course structure diagram - - - - - Courses groups - - - - - Course units - - - - Unique: Course unit code - - - - - - - - - - Course units - - - - - Course unit - - - - - - - Language of instruction - - - - - Language of instruction - - - - - - - Student performance - - - - - Local grade - - - - - ECTS grade - - - - - - - Course unit - - - - - Course unit code - - - - - - Course unit title - - - - - Theme (example: Academic project) - - - - - Type of course unit - - - - - - - Type of course unit code - - - - - - - - - Year of study - - - - - - - Year of study - - - - - - - - - Level of course unit - - - - - - - EHEA Framework code - - - - - - - - - Number of ECTS credits - - - - - Number of local credits - - - - - Number of hours - - - - - Languages of instruction - - - - Unique: Language - - - - - - - - Mode of delivery - - - - - - - Mode of delivery oode - - - - - - - - - Work placements - - - - - Student performance - - - - - Name of lecturer(s) - - - - - Learning outcomes of the course unit - - - - - Prerequisites and co-requisites - - - - - Recomended optional programme components - - - - - Course contents - - - - - Recomended or required reading - - - - - Planed learning activities and teaching method - - - - - Assesment methods and criteria - - - - - Observations - - - - - - Group identifier - - - - - Institution administering studies identifier - - - - - Is required by the programme? - - - - - - Course unit work placements - - - - - Work placement - - - - - - - Course unit work placement - - - - - Name of collaborating institution - - - - - Date from - - - - - Date to - - - - - Training Hours - - - - - - - Language of instruction - - - - - - Language code ISO 639-1 of the Supplement - - - - - - - - Diploma Supplement - - - - - Information identifying the holder of the qualification - - - - - Information identifying the qualification - - - - - Information on the level of the qualification - - - - - Information on the contents and results gained - - - - - Information on the function of the qualification - - - - - Additional informationType - - - - - Certification of the Supplement - - - - - Information on the national higher education system - - - - - Attachments resources - - - - - Extension content - - - - - Digital signature - - - - - - Language code ISO 639-1 of the Supplement - - - - - Indicate if language is the original language - - - - - - Extension content - - - - - - - - - Family name(s) - - - - - Surname - - - - - - - Given name(s) - - - - - Name - - - - - - - Grading scheme and grade distribution guidance - - - - - Grading scheme - - - - - Grade distribution guidance - - - - - - - Courses groups - - - - - Groups set name - - - - - Header information - - - - - Courses group - - - - - Footer information - - - - - - - Courses group - - - - - Name of the group - - - - - Header information - - - - - Courses group - - - - - Footer information - - - - - - Group identifier - - - - - - Information identifying the holder of the qualification - - - - - Family name(s) - - - - - Given name(s) - - - - - Date of birth - - - - - Student identification number or code - - - - - Country of birth - - - - - - - Country code ISO 3166-1-alpha-2 - - - - - - - - - Place of birth - - - - - Gender - - - - - - - Gender code - - - - - - - - - - - Information identifying the qualification - - - - - Qualification - - - - - Title conferred - - - - - Main fields of study - - - - - Name and status of awarding institution - - - - - Name and status of institution administering studies - - - - - Language of instruction and examination - - - - Unique: Language of instruction and examinatio - - - - - - - - - - Information on the contents and results gained - - - - - Mode of study - - - - - - - Mode of study - - - - - - - - - Programme requirements - - - - - Programme details - - - - - Grading scheme and grade distribution guidance - - - - - Overall classification of the qualification - - - - - - - Information on the function of the qualification type - - - - - Access to further study - - - - - Professional status - - - - - - - Is regulated profession - - - - - - - - - - - Information on the level of the qualification - - - - - Level ff the qualification - - - - - - - ISCED 1997 code - - - - - ISCED 2011 code - - - - - EHEA Framework code - - - - - NFQ code - - - - - - - - - Official length of programme - - - - - - - Number of ECTS credits - - - - - Number of years - - - - - Number of semesters - - - - - - - - - Access requirements - - - - - - - Name and status of the institution - - - - - Name of the institution - - - - - Status of the institution - - - - - Country of the institution - - - - - - - Country code ISO 3166-1-alpha-2 - - - - - - - - - Additional Information about the institution - - - - - Contact information - - - - - Logo of the institution reference - - - - - - - Attached identifier reference - - - - - - - - - - National identification code or number of the institution - - - - - ERASMUS code of the institution - - - - - - Language of instruction and examination - - - - - Language of instruction and examination - - - - - - - Language code ISO 639-1 - - - - - Percent - - - - - - - - - - - Local grade - - - - - Academic year - - - - - Date issued - - - - - Grade - - - - - Source grade - - - - - - - Source grade code - - - - - - - - - - - Mobility programme courses units - - - - - Course unit - - - - - - - Mobility programme course unit - - - - - Course unit code - - - - - Course unit title - - - - - - - Language code ISO 639-1 - - - - - - - - - Number of ECTS credits - - - - - Additional information - - - - - - Is in the learning agreement? - - - - - - Mobility programme - - - - - Mobility programme type (e.g. ERASMUS, ISEP, ...) - - - - - Field of study - - - - - Country - - - - - - - Country code ISO 3166-1-alpha-2 - - - - - - - - - Receiving institution - - - - - Academic year - - - - - Study period (Date from) - - - - - Study period (Date to) - - - - - Course units - - - - - - - Multilingual Diploma Supplement (DS) - - - - - Diploma Supplement - - - - - Digital signature - - - - - - - Name and status of awarding institution - - - - - Awarding institution - - - - - - - Awarding institution identifier - - - - - - - - - - - Name and status of institution administering studies - - - - - Institution administering studies - - - - - - - Institution administering studies identifier - - - - - - - - - - - Official certifying the DS - - - - - Family name(s) - - - - - Given name(s) - - - - - Official capacity - - - - - - Identifier of awarding institution - - - - - - Officials certifying - - - - - Official certifying - - - - - - - Official stamp or seal of the institution - - - - - Stamp description - - - - - - Identifier of awarding institution - - - - - - Programme details - - - - - Course structure diagram - - - - - Courses attended in other institution in mobility programs - - - - - - - Programme requirements - - - - - Programme requirements - - - - - Key learning outcomes of the programme - - - - - - - Qualification - - - - - Name of the qualification - - - - - Additional information about the qualification - - - - - - Local identification code or number of the qualification - - - - - National identification code or number of the qualification - - - - - - Rich text tag - - - - - Specifies bold text - - - - - Specifies break line - - - - - Specifies italic text - - - - - Specifies underline text - - - - - Specifies reference to the attached resource - - - - - - - Attached identifier reference - - - - - - - - - - - Title conferred - - - - - Name of the title conferred - - - - - - - Diploma Supplement - - - - - Primary Key: Group identifier - - - - - - - Primary Key: Awarding institution identifier - - - - - - - Primary Key: Intitution administering studies identifier - - - - - - - - Foreign Key: Group identifier - - - - - - - Foreign Key: Awarding institution (Official Stamp) identifier - - - - - - - Foreign Key: Awarding institution (Official Stamp) identifier - - - - - - - Foreign Key: Institution administering studies identifier - - - - - - - - Multilingual Diploma Supplement - - - - - Unique: Diploma Supplement language - - - - - - diff --git a/id/server/stork2-commons/src/main/resources/schema/diploma.xsd b/id/server/stork2-commons/src/main/resources/schema/diploma.xsd deleted file mode 100644 index b1c0b060f..000000000 --- a/id/server/stork2-commons/src/main/resources/schema/diploma.xsd +++ /dev/null @@ -1,1687 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-commons/src/main/resources/schema/xmldsig-core-schema.xsd b/id/server/stork2-commons/src/main/resources/schema/xmldsig-core-schema.xsd deleted file mode 100644 index 54527e0bc..000000000 --- a/id/server/stork2-commons/src/main/resources/schema/xmldsig-core-schema.xsd +++ /dev/null @@ -1,309 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java deleted file mode 100644 index 3d0aa4d45..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeProvidersMapTestCase.java +++ /dev/null @@ -1,135 +0,0 @@ -package eu.stork.peps.tests; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import eu.stork.peps.auth.commons.AttributeProvider; -import eu.stork.peps.auth.commons.AttributeProvidersMap; -import eu.stork.peps.auth.commons.AttributeSource; -import eu.stork.peps.auth.commons.Country; -import eu.stork.peps.auth.commons.IAttributeProvidersMap; -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PersonalAttributeList; - -/** - * The AttributeSource's Test Case. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos - * (ilias@aegean.gr) - * - * @version $Revision: $, $Date: $ - */ -public class AttributeProvidersMapTestCase { - - @Test - public void testObjectOK1() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if (map.containsKey(source)) { - outcome = true; - } - - assertTrue(outcome); - } - - @Test - public void testObjectOK2() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if (map.containsKey(source)) { - if (map.get(source) != null) { - outcome = true; - } - } - - assertTrue(outcome); - } - - @Test - public void testObjectOK3() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final AttributeSource target = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if (map.containsKey(target)) { - outcome = true; - } - - assertTrue(outcome); - } - - @Test - public void testObjectOK4() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final AttributeSource target = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if (map.containsKey(target)) { - if (map.get(target) != null) { - outcome = true; - } - } - - assertTrue(outcome); - } - - @Test - public void testObjectNOK1() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final AttributeSource target = new AttributeSource(new Country("ID1", "Name 1"), "URL"); - final IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if (map.containsKey(target)) { - outcome = true; - } - - assertFalse(outcome); - } - - @Test - public void testObjectNOK2() { - final IAttributeProvidersMap map = new AttributeProvidersMap(); - final AttributeSource source = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL"); - final AttributeSource target = new AttributeSource(new AttributeProvider("ID2", "Name 1", null), "URL"); - final IPersonalAttributeList pal = new PersonalAttributeList(); - boolean outcome = false; - - //Add a single item - map.put(source, pal); - - if (map.containsKey(target)) { - outcome = true; - } - - assertFalse(outcome); - } -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java deleted file mode 100644 index a3fb6468f..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeSourceTestCase.java +++ /dev/null @@ -1,90 +0,0 @@ -package eu.stork.peps.tests; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; - -import eu.stork.peps.auth.commons.AttributeProvider; -import eu.stork.peps.auth.commons.AttributeSource; -import eu.stork.peps.auth.commons.Country; - -/** - * The AttributeSource's Test Case. - * - * @author Stelios Lelis (stelios.lelis@aegean.gr), Elias Pastos - * (ilias@aegean.gr) - * - * @version $Revision: $, $Date: $ - */ -public final class AttributeSourceTestCase { - - private final AttributeSource ap1 = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL1"); - private final AttributeSource ap2 = new AttributeSource(new AttributeProvider("ID2", "Name 2", null), "URL2"); - private final AttributeSource ap3 = new AttributeSource(new AttributeProvider("ID1", "Name 2", null), "URL2"); - private final AttributeSource ap4 = new AttributeSource(new AttributeProvider("ID1", "Name 2", null), "URL1"); - private final AttributeSource ap5 = new AttributeSource(new AttributeProvider("ID1", "Name 1", null), "URL1"); - - private final AttributeSource c1 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); - private final AttributeSource c2 = new AttributeSource(new Country("ID2", "Name 2"), "URL2"); - private final AttributeSource c3 = new AttributeSource(new Country("ID1", "Name 2"), "URL2"); - private final AttributeSource c4 = new AttributeSource(new Country("ID1", "Name 2"), "URL1"); - private final AttributeSource c5 = new AttributeSource(new Country("ID1", "Name 1"), "URL1"); - - @Test - public void testNotEquals1() { - assertFalse(ap1.innerEquals(ap2)); - } - - @Test - public void testNotEquals2() { - assertFalse(ap1.innerEquals(c1)); - } - - @Test - public void testNotEquals3() { - assertFalse(c1.innerEquals(c2)); - } - - @Test - public void testEquals1() { - assertTrue(ap1.innerEquals(ap3)); - } - - @Test - public void testEquals2() { - assertTrue(ap1.innerEquals(ap4)); - } - - @Test - public void testEquals3() { - assertTrue(ap1.innerEquals(ap5)); - } - - @Test - public void testEquals4() { - assertTrue(c1.innerEquals(c3)); - } - - @Test - public void testEquals5() { - assertTrue(c1.innerEquals(c4)); - } - - @Test - public void testEquals6() { - assertTrue(c1.innerEquals(c5)); - } - - @Test - public void testEquals7() { - final Object obj = ap5; - assertTrue(ap1.equals(obj)); - } - - @Test - public void testEquals8() { - final Object obj = c5; - assertTrue(c1.equals(obj)); - } -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeUtilTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeUtilTestCase.java deleted file mode 100644 index 524a7446c..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/AttributeUtilTestCase.java +++ /dev/null @@ -1,537 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertEquals; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.junit.Test; - -import eu.stork.peps.auth.commons.AttributeUtil; -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PEPSValues; -import eu.stork.peps.auth.commons.PersonalAttributeList; - -/** - * The AttributeUtil's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com - * - * @version $Revision: $, $Date: $ - */ -public final class AttributeUtilTestCase { - - /** - * Empty String to be used on the tests. - */ - private static final String EMPTY_STRING = ""; - - /** - * Tuple value sample to be used on the tests. - */ - private static final String[] TUPLE_STRING = new String[]{"age", "true", - "[18]", "Available"}; - - /** - * Complex value to be used on escape/unescape tests. - */ - private static final String COMPLEX_VAL = "postalCode=4100," - + "apartmentNumber=A,state=Porto,countryCodeAddress=PT,streetNumber=379," - + "streetName=Avenida Sidonio Pais,town=Porto,"; - - /** - * Escaped Complex value to be used on escape/unescape tests. - */ - private static final String ESC_COMPLEX_VAL = "postalCode=4100%44" - + "apartmentNumber=A%44state=Porto%44countryCodeAddress=PT%44" - + "streetNumber=379%44streetName=Avenida Sidonio Pais%44town=Porto%44"; - - /** - * Simple value to be used on escape/unescape tests. - */ - private static final String SIMPLE_VAL = "Avenida da Boavista, Porto"; - - /** - * Escaped simple value to be used on escape/unescape tests. - */ - private static final String ESC_SIMPLE_VAL = "Avenida da Boavista%44 Porto"; - - /** - * Simple text to be used on escape/unescape tests. Must match the escaped - * text. - */ - private static final String SIMPLE_TEXT = "John Doe"; - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given - * complex attribute value (canonical address' example attribute value). - */ - @Test - public void testEscapeSpecialCharsComplexVal() { - assertEquals(AttributeUtil.escape(COMPLEX_VAL), ESC_COMPLEX_VAL); - } - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given - * attribute value. - */ - @Test - public void testEscapeSpecialCharsVal() { - assertEquals(AttributeUtil.escape(SIMPLE_VAL), ESC_SIMPLE_VAL); - } - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given - * simple text: no special characters to escape. - */ - @Test - public void testEscapeNormalChars() { - assertEquals(AttributeUtil.escape(SIMPLE_TEXT), SIMPLE_TEXT); - } - - /** - * Tests the {@link AttributeUtil#unescape(String)} method for the given - * escape complex attribute value (canonical address' example attribute - * value). - */ - @Test - public void testUnescapeSpecialCharsComplexVal() { - assertEquals(AttributeUtil.unescape(ESC_COMPLEX_VAL), COMPLEX_VAL); - } - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given - * escape attribute value. - */ - @Test - public void testUnescapeSpecialCharsVal() { - assertEquals(AttributeUtil.unescape(ESC_SIMPLE_VAL), SIMPLE_VAL); - } - - /** - * Tests the {@link AttributeUtil#escape(String)} method for the given - * simple text: no special characters to unescape. - */ - @Test - public void testUnescapeNormalChars() { - assertEquals(AttributeUtil.unescape(SIMPLE_TEXT), SIMPLE_TEXT); - } - - /** - * Tests the {@link AttributeUtil#appendIfNotNull(StringBuilder, Object)} - * method for the given empty string. - */ - @Test - public void testAppendIfNotNullEmptyStr() { - final StringBuilder strBuilder = new StringBuilder(SIMPLE_TEXT); - AttributeUtil.appendIfNotNull(strBuilder, EMPTY_STRING); - assertEquals(strBuilder.toString(), SIMPLE_TEXT); - } - - /** - * Tests the {@link AttributeUtil#appendIfNotNull(StringBuilder, Object)} - * method for the given string. - */ - @Test - public void testAppendIfNotNullStr() { - final StringBuilder strBuilder = new StringBuilder(); - AttributeUtil.appendIfNotNull(strBuilder, SIMPLE_TEXT); - assertEquals(strBuilder.toString(), SIMPLE_TEXT); - } - - /** - * Tests the {@link AttributeUtil#appendIfNotNull(StringBuilder, Object)} - * method for the given null value. - */ - @Test - public void testAppendIfNotNull() { - final StringBuilder strBuilder = new StringBuilder(); - AttributeUtil.appendIfNotNull(strBuilder, null); - assertEquals(strBuilder.toString(), EMPTY_STRING); - } - - /** - * Tests the {@link AttributeUtil#listToString(List, String)} method for the - * given List with two values. - */ - @Test - public void testListToStringTwoVals() { - final List vals = new ArrayList(); - vals.add(SIMPLE_VAL); - vals.add(SIMPLE_TEXT); - - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append(SIMPLE_TEXT); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - assertEquals( - AttributeUtil.listToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#listToString(List, String)} method for the - * given List with one values. - */ - @Test - public void testListToStringOneVal() { - final List vals = new ArrayList(); - vals.add(SIMPLE_VAL); - - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - assertEquals( - AttributeUtil.listToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#listToString(List, String)} method for the - * given List with one value. - */ - @Test - public void testListToStringEmptyVal() { - final List vals = new ArrayList(); - - final StringBuilder strBuilder = new StringBuilder(); - - assertEquals( - AttributeUtil.listToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#mapToString(java.util.Map, String)} method - * for the given Map with one value. - */ - @Test - public void testMapToStringOneVal() { - final Map vals = new HashMap(); - vals.put("CanonicalAddress", COMPLEX_VAL); - - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("CanonicalAddress="); - strBuilder.append(ESC_COMPLEX_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - - assertEquals(AttributeUtil.mapToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#mapToString(java.util.Map, String)} method - * for the given empty Map. - */ - @Test - public void testMapToStringEmptyVal() { - final Map vals = new HashMap(); - - final StringBuilder strBuilder = new StringBuilder(); - - assertEquals(AttributeUtil.mapToString(vals, - PEPSValues.ATTRIBUTE_VALUE_SEP.toString()), strBuilder.toString()); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * invalid List. - */ - @Test - public void testIsValidValueInvalidList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append("]"); - assertFalse(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * null value. - */ - @Test - public void testIsValidValueNullList() { - assertFalse(AttributeUtil.isValidValue(null)); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * empty List. - */ - @Test - public void testIsValidValueEmptyList() { - assertTrue(AttributeUtil.isValidValue("[]")); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * empty List. - */ - @Test - public void testIsValidValueEmptyCommaList() { - assertTrue(AttributeUtil.isValidValue("[,]")); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * one simple value List. - */ - @Test - public void testIsValidValueOneValueList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * one simple value List. - */ - @Test - public void testIsValidValueOneValueCommaList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * one complex value List. - */ - @Test - public void testIsValidValueOneComplexValueList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_COMPLEX_VAL); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * one complex value List. - */ - @Test - public void testIsValidValueOneComplexValueCommaList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_COMPLEX_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * multi value List. - */ - @Test - public void testIsValidValueMultiValueList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append("["); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append(SIMPLE_TEXT); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append("]"); - assertTrue(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidValue(String)} method for the given - * invalid multi value List. - */ - @Test - public void testIsValidValueInvalidMultiValueList() { - final StringBuilder strBuilder = new StringBuilder(); - strBuilder.append(ESC_SIMPLE_VAL); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append(SIMPLE_TEXT); - strBuilder.append(PEPSValues.ATTRIBUTE_VALUE_SEP.toString()); - strBuilder.append("]"); - assertFalse(AttributeUtil.isValidValue(strBuilder.toString())); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * true type. - */ - @Test - public void testIsValidTypetrue() { - assertTrue(AttributeUtil.isValidType("true")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * True type. - */ - @Test - public void testIsValidTypeTrue() { - assertTrue(AttributeUtil.isValidType("True")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * TRUE type. - */ - @Test - public void testIsValidTypeTRUE() { - assertTrue(AttributeUtil.isValidType("TRUE")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * invalid type. - */ - @Test - public void testIsValidTypeInvalidType() { - assertFalse(AttributeUtil.isValidType("str")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * false type. - */ - @Test - public void testIsValidTypefalse() { - assertTrue(AttributeUtil.isValidType("false")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * False type. - */ - @Test - public void testIsValidTypeFalse() { - assertTrue(AttributeUtil.isValidType("False")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * FALSE type. - */ - @Test - public void testIsValidTypeFALSEVal() { - assertTrue(AttributeUtil.isValidType("False")); - } - - /** - * Tests the {@link AttributeUtil#isValidType(String)} method for the given - * null. - */ - @Test - public void testIsValidTypeNullVal() { - assertFalse(AttributeUtil.isValidType(null)); - } - - /** - * Tests the {@link AttributeUtil#hasValidTuples(String[])} method for the - * given valid tuple. - */ - @Test - public void testHasValidTuples() { - assertTrue(AttributeUtil.hasValidTuples(TUPLE_STRING)); - } - - /** - * Tests the {@link AttributeUtil#hasValidTuples(String[])} method for the - * given invalid tuple. - */ - @Test - public void testHasValidTuplesInvalid() { - final String[] tuple = new String[]{"name", "type"}; - assertFalse(AttributeUtil.hasValidTuples(tuple)); - } - - /** - * Tests the {@link AttributeUtil#hasValidTuples(String[])} method for the - * given invalid tuple with valid size. - */ - @Test - public void testHasValidTuplesSameSizeInvalidValues() { - final String[] tuple = new String[]{"age", "type", "[18]", "Available"}; - assertFalse(AttributeUtil.hasValidTuples(tuple)); - } - - /** - * Tests the {@link AttributeUtil#hasValidTuples(String[])} method for the - * given null value. - */ - @Test - public void testHasValidTuplesNull() { - assertFalse(AttributeUtil.hasValidTuples(null)); - } - - /** - * Tests the - * {@link AttributeUtil#checkMandatoryAttributes(IPersonalAttributeList)} - * method for the given attribute list.. - */ - @Test - public void testCheckMandatoryAttributes() { - final IPersonalAttributeList attrList = new PersonalAttributeList(); - attrList.populate("isAgeOver:true:[18,]:Available;"); - assertTrue(AttributeUtil.checkMandatoryAttributes(attrList)); - - } - - /** - * Tests the - * {@link AttributeUtil#checkMandatoryAttributes(IPersonalAttributeList)} - * method for the given null value. - */ - @Test(expected = NullPointerException.class) - public void testCheckMandatoryAttributesNullAttrList() { - assertTrue(AttributeUtil.checkMandatoryAttributes(null)); - } - - /** - * Tests the - * {@link AttributeUtil#checkMandatoryAttributes(IPersonalAttributeList)} - * method for the given empty attribute list. - */ - @Test - public void testCheckMandatoryAttributesEmptyAttrList() { - final IPersonalAttributeList attrList = new PersonalAttributeList(); - assertTrue(AttributeUtil.checkMandatoryAttributes(attrList)); - } - - /** - * Tests the - * {@link AttributeUtil#checkMandatoryAttributes(IPersonalAttributeList)} - * method for the given attribute list (missing mandatory attribute). - */ - @Test - public void testCheckMandatoryAttributesMissingAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(); - attrList.populate("isAgeOver:true:[]:NotAvailable;"); - assertFalse(AttributeUtil.checkMandatoryAttributes(attrList)); - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/ComplexAttributesMarshalling.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/ComplexAttributesMarshalling.java deleted file mode 100644 index f2383c07a..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/ComplexAttributesMarshalling.java +++ /dev/null @@ -1,246 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the conditions of the European Public License - * v1.1 (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); any use of this file implies acceptance of - * the conditions of this license. Unless required by applicable law or agreed to in writing, software distributed under - * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - * implied. See the License for the specific language governing permissions and limitations under the License. --- Test - * cases for marshalling complex attributes. Implemented are two testcases for marshalling and unmarshalling. These - * testcases are for canonical residenc address and has bank account. - */ - -package eu.stork.peps.tests; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.StringWriter; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBElement; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Marshaller; -import javax.xml.bind.Unmarshaller; -import javax.xml.transform.stream.StreamSource; - -import org.joda.time.DateTime; -import org.junit.Test; - -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.CanonicalAddressType; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.HasAccountInBankType; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.MandateContentType; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.MandateType; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.ObjectFactory; -import eu.stork.peps.complex.attributes.eu.stork.names.tc.stork._1_0.assertion.RepresentationPersonType; - -/** - * @author Advania Examples on how to use the jaxb marshaller. The classes are created from the - * StorkcomplexAttributes.xsd schema located in resources. - * @version $Revision: 1.00 $, $Date: 2014-17-02 11:15:00 $ - */ - -public class ComplexAttributesMarshalling { - - MandateContentType mtObject = new MandateContentType(); - RepresentationPersonType rpObject = new RepresentationPersonType(); - RepresentationPersonType rptObject = new RepresentationPersonType(); - - void initMandateValues() { - // Fill in the information ... - mtObject.setIsChained(false); - // mtObject.setIsJoined("IsJoined"); - mtObject.setTypeOfPower("The Force"); - mtObject.setIsChained(false); - // ... fill in info for the representative - rpObject.setTextRegisteredAddress("Address at some street"); - rpObject.setDateOfBirth(DateTime.now().toString()); - rpObject.setEIdentifier("123456"); - rpObject.setGivenName("Name of some person"); - rpObject.setLegalForm("Type of person"); - // .... fill in the info for the represented - rptObject.setTextRegisteredAddress("Another Address at some street"); - rptObject.setDateOfBirth(DateTime.now().toString()); - rptObject.setEIdentifier("654321"); - rptObject.setGivenName("Another Name of some person"); - rptObject.setLegalForm("Yet another type of person"); - } - - /** - * Test marshalling canonical address - * - * IS Reykjavik RVK - * Reykjavik 101 Laugavegur - * 1 10 - */ - @Test - public void testMarshallCanonicalResidencAddress() { - try { - final CanonicalAddressType object = new CanonicalAddressType(); - object.setApartmentNumber("10"); - object.setCountryCodeAddress("IS"); - object.setMunicipalityCode("RVK"); - object.setPostalCode("101"); - object.setState("Reykjavik"); - object.setStreetName("Laugavegur"); - object.setStreetNumber("1"); - object.setTown("Reykjavik"); - - final JAXBContext context = JAXBContext.newInstance(CanonicalAddressType.class); - final Marshaller m = context.createMarshaller(); - m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - final ObjectFactory objf = new ObjectFactory(); - - m.marshal(objf.createCanonicalResidenceAddress(object), new FileOutputStream("CanonicalAddressType.xml")); - m.marshal(objf.createCanonicalResidenceAddress(object), System.out); - } - catch ( Exception e ) { - e.printStackTrace(); - } - } - - @Test - public void testForDiana() { - initMandateValues(); - - try { - // Create the marshallers' - - final JAXBContext mandateTypeContext = JAXBContext.newInstance(MandateType.class); - final Marshaller mandateMarshaller = mandateTypeContext.createMarshaller(); - - final ObjectFactory objf = new ObjectFactory(); - MandateType mandate = new MandateType(); - RepresentationPersonType representative = new RepresentationPersonType(); - representative.setDateOfBirth("1990-01-01"); - representative.setGivenName("Bilbo"); - representative.setSurname("Baggins"); - representative.setEIdentifier("IT/IT/12345678990"); - mandate.setRepresentative(representative); - - RepresentationPersonType represented = new RepresentationPersonType(); - represented.setTextRegisteredAddress("Via...."); - represented.setELPIdentifier("IT/1111111"); - represented.setLegalName("Shire Corp."); - mandate.setRepresented(represented); - - MandateContentType mandateContent1 = new MandateContentType(); - mandateContent1.setOriginalMandate("Chief executive officer".getBytes()); - mandateContent1.setOriginalMandateType("text/plain"); - MandateContentType mandateContent2 = new MandateContentType(); - mandateContent2.setOriginalMandate("Chief executive officer2".getBytes()); - mandateContent2.setOriginalMandateType("text/plain"); - mandate.getMandateContent().add(mandateContent1); - mandate.getMandateContent().add(mandateContent2); - - // marshall the mandatecontent - StringWriter sw = new StringWriter(); - mandateMarshaller.marshal(objf.createMandate(mandate), sw); - - System.out.print(sw.toString()); - - } - catch ( JAXBException e ) { - e.printStackTrace(); - } - } - - @Test - public void testMandateContent() { - initMandateValues(); - try { - final MandateType object = new MandateType(); - // Make the object .... - object.getMandateContent().add(mtObject); - object.setRepresented(rpObject); - object.setRepresentative(rptObject); - - final JAXBContext context = JAXBContext.newInstance(MandateType.class); - // Create the marshaller - final Marshaller m = context.createMarshaller(); - m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true); - final ObjectFactory objf = new ObjectFactory(); - // Various types of output - m.marshal(objf.createMandate(object), new FileOutputStream("MandateContentType.xml")); - m.marshal(objf.createMandate(object), System.out); - - StringWriter sw = new StringWriter(); - m.marshal(objf.createMandate(object), sw); - - } - catch ( Exception e ) { - e.printStackTrace(); - } - } - - /** - * Test unmarshalling canonical address - * - * IS Reykjavik RVK - * Reykjavik 101 Laugavegur - * 1 10 - */ - @Test - public void testUnmarshallCanonicalAddress() { - JAXBContext uContext; - try { - uContext = JAXBContext.newInstance(CanonicalAddressType.class); - final Unmarshaller u = uContext.createUnmarshaller(); - final File file = new File("CanonicalAddressType.xml"); - - final JAXBElement root = u.unmarshal(new StreamSource(file), - CanonicalAddressType.class); - final CanonicalAddressType foo = root.getValue(); - - final String A = foo.getStreetName(); - final String B = foo.getStreetNumber(); - - System.out.println("Streetname: " + A); - System.out.println("Streetnumber: " + B); - - } - catch ( final JAXBException e ) { - e.printStackTrace(); - } - } - - /** - * Test marshalling has bank account Arion 3 - */ - @Test - public void testMarshallHasBankAccount() { - try { - final HasAccountInBankType object = new HasAccountInBankType(); - object.setAQAA(3); - object.setBankName("Arion Bank"); - final JAXBContext context = JAXBContext.newInstance(HasAccountInBankType.class); - final Marshaller m = context.createMarshaller(); - final ObjectFactory o = new ObjectFactory(); - m.marshal(o.createHasAccountInBank(object), new FileOutputStream("hasbankaccount.xml")); - m.marshal(o.createHasAccountInBank(object), System.out); - - } - catch ( Exception e ) { - e.printStackTrace(); - } - } - - /** - * Test unmarshalling has bank account Arion 3 - */ - @Test - public void testUnmarshallHasBankAccount() { - try { - final JAXBContext context = JAXBContext.newInstance(HasAccountInBankType.class); - final Unmarshaller um = context.createUnmarshaller(); - final File file = new File("hasbankaccount.xml"); - final JAXBElement root = um.unmarshal(new StreamSource(file), - HasAccountInBankType.class); - final HasAccountInBankType foo = root.getValue(); - System.out.println(foo.getBankName()); - } - catch ( final JAXBException e ) { - e.printStackTrace(); - } - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/DateUtilTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/DateUtilTestCase.java deleted file mode 100644 index 6c9a17ddc..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/DateUtilTestCase.java +++ /dev/null @@ -1,294 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import java.sql.Timestamp; -import java.util.Properties; - -import org.joda.time.DateTime; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.DateUtil; -import eu.stork.peps.auth.commons.PEPSUtil; -import eu.stork.peps.auth.commons.exceptions.SecurityPEPSException; - -/** - * The PersonalAttribute's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.2 $, $Date: 2010-11-17 05:17:03 $ - */ -public final class DateUtilTestCase { - - /** - * Stork Format date. - */ - private static final String FORMAT = "yyyyMMdd"; - - /** - * Expected 10 value. - */ - private static final int TEN = 10; - - /** - * Expected 11 value. - */ - private static final int ELEVEN = 11; - - /** - * The testing Date ("current" date). - */ - private static final DateTime TESTDATE = new DateTime(2011, 10, 10, 15, 20, - 0, 0); - - /** - * Init DateUtilTestCase class. - */ - @BeforeClass - public static void runsBeforeTheTestSuite() { - final Properties configs = new Properties(); - configs.setProperty("invalidAgeDateValue.code", "35"); - configs.setProperty("invalidAttributeValue.code", "34"); - configs - .setProperty( - "invalidAttributeValue.message", - "Unexpected or invalid content was encountered within a " - + " or element."); - PEPSUtil.createInstance(configs); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given year against - * the testDate: 2011-10-10 15:20:00.0. Must return 10. - */ - @Test - public void calculateAgeFromYear() { - Assert.assertTrue(TEN == DateUtil.calculateAge("2000", TESTDATE, FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given year and - * month against the testDate: 2011-10-10 15:20:00.0. Must return 11. - */ - @Test - public void calculateAgeFromEarlyMonth() { - Assert.assertTrue(ELEVEN == DateUtil.calculateAge("200001", TESTDATE, - FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given year and - * month against the testDate: 2011-10-10 15:20:00.0. Must return 10. - */ - @Test - public void calculateAgeFromSameMonth() { - Assert.assertTrue(TEN == DateUtil.calculateAge("200010", TESTDATE, FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given year and - * month against the testDate: 2011-10-10 15:20:00.0. Must return 10. - */ - @Test - public void calculateAgeFromLaterMonth() { - Assert.assertTrue(TEN == DateUtil.calculateAge("200011", TESTDATE, FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return 11. - */ - @Test - public void calculateAgeFromEarlyFullDate() { - Assert.assertTrue(ELEVEN == DateUtil.calculateAge("20000101", TESTDATE, - FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return 11. - */ - @Test - public void calculateAgeFromSameDay() { - Assert.assertTrue(ELEVEN == DateUtil.calculateAge("20001010", TESTDATE, - FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return 10. - */ - @Test - public void calculateAgeFromLaterFullDate() { - Assert.assertTrue(TEN == DateUtil - .calculateAge("20001011", TESTDATE, FORMAT)); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromInvalidDate() { - DateUtil.calculateAge("200", TESTDATE, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromInvalidMonth() { - DateUtil.calculateAge("200013", TESTDATE, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromInvalidDay() { - DateUtil.calculateAge("20000230", TESTDATE, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromNullDate() { - DateUtil.calculateAge(null, TESTDATE, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromNullCurDate() { - DateUtil.calculateAge("2000", null, FORMAT); - } - - /** - * Tests the {@link DateUtil#calculateAge} method for the given full date - * against the testDate: 2011-10-10 15:20:00.0. Must return a - * SecurityPEPSException exception. - */ - @Test(expected = SecurityPEPSException.class) - public void calculateAgeFromNullFormat() { - DateUtil.calculateAge("2000", TESTDATE, null); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return true - */ - @Test - public void isValidFormatDateFromYear() { - Assert.assertTrue(DateUtil.isValidFormatDate("2000", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year - * and month. Must return true. - */ - @Test - public void isValidFormatDateFromMonth() { - Assert.assertTrue(DateUtil.isValidFormatDate("200001", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDate() { - Assert.assertTrue(DateUtil.isValidFormatDate("20000101", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateInvalidYear() { - Assert.assertFalse(DateUtil.isValidFormatDate("200", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateInvalidMonth() { - Assert.assertFalse(DateUtil.isValidFormatDate("200013", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateInvalidDate() { - Assert.assertFalse(DateUtil.isValidFormatDate("20010229", FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateNullDate() { - Assert.assertFalse(DateUtil.isValidFormatDate(null, FORMAT)); - } - - /** - * Tests the {@link DateUtil#isValidFormatDate} method for the given year. - * Must return false. - */ - @Test - public void isValidFormatDateNullFormat() { - Assert.assertFalse(DateUtil.isValidFormatDate("2000", null)); - } - - /** - * Tests the {@link DateUtil#currentTimeStamp()} method for the current - * TimeStamp (TS). Must return true. - */ - @Test - public void testCurrentTimeStampBefore() { - Timestamp ts = DateUtil.currentTimeStamp(); - Assert.assertNotSame(ts, DateUtil.currentTimeStamp()); - } - - /** - * Tests the {@link DateUtil#currentTimeStamp()} method for the current - * TimeStamp (TS). Must return true. - */ - @Test - public void testCurrentTimeStampAfter() { - Timestamp ts = DateUtil.currentTimeStamp(); - Assert.assertEquals(DateUtil.currentTimeStamp(), ts); - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PEPSUtilTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PEPSUtilTestCase.java deleted file mode 100644 index 95c1f4594..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PEPSUtilTestCase.java +++ /dev/null @@ -1,553 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import static org.junit.Assert.assertArrayEquals; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotSame; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.assertFalse; - -import java.util.Properties; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PEPSErrors; -import eu.stork.peps.auth.commons.PEPSParameters; -import eu.stork.peps.auth.commons.PEPSUtil; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.exceptions.InternalErrorPEPSException; -import eu.stork.peps.auth.commons.exceptions.InvalidParameterPEPSException; - -/** - * The PEPSUtil's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com - * - * @version $Revision: $, $Date: $ - */ -public final class PEPSUtilTestCase { - - /** - * Message example. - */ - private static final String MESSAGE_SAMPLE = "003002 - Authentication Failed"; - - /** - * Error message example. - */ - private static final String ERROR_MESSAGE_SAMPLE = "Authentication Failed"; - - /** - * Error code example. - */ - private static final String ERROR_CODE_SAMPLE = "003002"; - - /** - * Properties values for testing proposes. - */ - private static final Properties CONFIGS1 = new Properties(); - - /** - * Properties values for testing proposes. - */ - private static final Properties CONFIGS2 = new Properties(); - - /** - * The empty string value: "". - */ - private static final String EMPTY_STRING = ""; - - /** - * The empty byte value: []. - */ - private static final byte[] EMPTY_BYTE = new byte[]{}; - - /** - * The empty byte hash value. - */ - private static final byte[] EMPTY_HASH_BYTE = new byte[]{-49, -125, -31, - 53, 126, -17, -72, -67, -15, 84, 40, 80, -42, 109, -128, 7, -42, 32, -28, - 5, 11, 87, 21, -36, -125, -12, -87, 33, -45, 108, -23, -50, 71, -48, -47, - 60, 93, -123, -14, -80, -1, -125, 24, -46, -121, 126, -20, 47, 99, -71, 49, - -67, 71, 65, 122, -127, -91, 56, 50, 122, -7, 39, -38, 62}; - - /** - * The SAML example byte[] value. - */ - private static final byte[] SAML_BYTE_SAMPLE = new byte[]{60, 115, 97, 109, - 108, 62, 46, 46, 46, 60, 47, 115, 97, 109, 108}; - - /** - * The SAML's Base64 example value. - */ - private static final String SAML_BASE64_SAMPLE = "PHNhbWw+Li4uPC9zYW1s"; - - /** - * The SAML's Base64 byte[] example value. - */ - private static byte[] SAML_BASE64_BYTE_SAMPLE = new byte[]{80, 72, 78, 104, - 98, 87, 119, 43, 76, 105, 52, 117, 80, 67, 57, 122, 89, 87, 49, 115}; - - /** - * The SAML's Base64 Hash byte[] example value. - */ - private static byte[] HASH_BYTE_SAMPLE = new byte[]{67, 38, 11, 115, 49, - -5, 54, -85, 38, 43, -99, 96, 71, -41, 50, -96, 71, -86, 90, -97, 66, -67, - 90, 101, 30, 82, -13, 60, -106, -72, -103, -75, 19, 2, -107, 107, -6, -56, - 34, -111, -44, -57, -26, -5, 33, 78, -1, 30, 21, 74, -26, 118, -46, -12, - -102, 12, -56, 30, -59, -104, -21, -42, -103, 82}; - - /** - * Init PEPSUtilTestCase class. - */ - @BeforeClass - public static void runsBeforeTheTestSuite() { - - CONFIGS1.setProperty("max.attrList.size", "20000"); - CONFIGS1.setProperty("attrList.code", "202005"); - CONFIGS1.setProperty("attrList.message", "invalid.attrList.parameter"); - - CONFIGS1.setProperty("max.qaaLevel.size", "1"); - CONFIGS1.setProperty("max.spUrl.size", "inv"); - CONFIGS1.setProperty("validation.active", "true"); - CONFIGS1.setProperty("hashDigest.className", - "org.bouncycastle.crypto.digests.SHA512Digest"); - CONFIGS1.setProperty("invalidAgeDateValue.code", "35"); - CONFIGS1.setProperty("invalidAttributeValue.code", "34"); - CONFIGS1.setProperty("invalidAttributeValue.message", - "Unexpected or invalid content was encountered within a " - + " or element."); - } - - /** - * Tests the {@link PEPSUtil#createInstance(Properties)} method for the - * given properties object. - */ - @Test - public void testCreateInstance() { - Assert.assertNotNull(PEPSUtil.createInstance(CONFIGS2)); - } - - /** - * Tests the {@link PEPSUtil#getConfigs()}. - */ - @Test - public void testGetConfigs() { - final PEPSUtil pepsUtils = PEPSUtil.createInstance(CONFIGS1); - assertEquals(pepsUtils.getConfigs(), CONFIGS1); - } - - /** - * Tests the {@link PEPSUtil#getConfigs()}. - */ - @Test - public void testGetConfigsDifferent() { - final PEPSUtil pepsUtils = PEPSUtil.createInstance(CONFIGS1); - assertNotSame(pepsUtils.getConfigs(), CONFIGS2); - } - - /** - * Tests the {@link PEPSUtil#getConfig(String)} method for the given - * existing config. - */ - @Test - public void testGetConfigExists() { - assertEquals(PEPSUtil.getConfig("hashDigest.className"), - "org.bouncycastle.crypto.digests.SHA512Digest"); - } - - /** - * Tests the {@link PEPSUtil#getConfig(String)} method for the given not - * existing config. - */ - @Test - public void testGetConfigNoExists() { - assertNull(PEPSUtil.getConfig("doesnt.exists")); - } - - /** - * Tests the {@link PEPSUtil#getConfig(String)} method for the given null - * value. - */ - @Test(expected = NullPointerException.class) - public void testGetConfigNull() { - assertNull(PEPSUtil.getConfig(null)); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for - * the given param values. - */ - @Test - public void testIsValidParameterExists() { - assertTrue(PEPSUtil.isValidParameter("qaaLevel", "1")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for - * the given param values. - */ - @Test - public void testIsValidParameterExistsGreat() { - assertFalse(PEPSUtil.isValidParameter("qaaLevel", "12")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for - * the given param values. - */ - @Test - public void testIsValidParameterExistsIvalidConf() { - assertFalse(PEPSUtil - .isValidParameter("spUrl", "http://localhost:8080/SP/")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for - * the given param values. - */ - @Test - public void testIsValidParameterNotExists() { - assertFalse(PEPSUtil.isValidParameter("doesntexists", - "http://localhost:8080/SP/")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for - * the given param values. - */ - @Test - public void testIsValidParameterNullParamName() { - assertFalse(PEPSUtil.isValidParameter(null, "http://localhost:8080/SP/")); - } - - /** - * Tests the {@link PEPSUtil#isValidParameter(String, String)} method for - * the given param values. - */ - @Test - public void testIsValidParameterNullParamValue() { - assertFalse(PEPSUtil.isValidParameter("spUrl", null)); - } - - /** - * Tests the {@link PEPSUtil#validateParameter(String, String, Object)} - * method for the given object values. - */ - @Test - public void testValidateParameterValid() { - final IPersonalAttributeList persAttrList = new PersonalAttributeList(); - persAttrList.populate("isAgeOver:true:[15,]:Available;"); - PEPSUtil.validateParameter("ServiceProviderAction", - PEPSParameters.ATTRIBUTE_LIST.toString(), persAttrList); - } - - /** - * Tests the {@link PEPSUtil#validateParameter(String, String, Object)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterNull() { - PEPSUtil.validateParameter("ServiceProviderAction", - PEPSParameters.ATTRIBUTE_LIST.toString(), null); - } - - /** - * Tests the {@link PEPSUtil#validateParameter(String, String, String)} - * method for the given string values. - * - * The tested class just invokes - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * so further tests will be later. - */ - @Test - public void testValidateParameter() { - PEPSUtil.validateParameter("ServiceProviderAction", - PEPSParameters.ATTRIBUTE_LIST.toString(), - "isAgeOver:true:[15,]:Available;"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, PEPSErrors)} - * method for the given string value and {@link PEPSErrors} enum. - * - * The tested class just invokes - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * so further tests will be later. - */ - @Test - public void testValidateParameterPEPSErrors() { - PEPSUtil.validateParameter("CountrySelectorAction", - PEPSParameters.ATTRIBUTE_LIST.toString(), - "isAgeOver:true:[15,]:Available;", - PEPSErrors.SP_COUNTRY_SELECTOR_INVALID_ATTR); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test - public void testValidateParameterValidParams() { - PEPSUtil.validateParameter("ServiceProviderAction", "qaaLevel", "1", - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterInvalidParamValue() { - PEPSUtil.validateParameter("ServiceProviderAction", "qaaLevel", "10", - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterInvalidParamName() { - PEPSUtil.validateParameter("ServiceProviderAction", "doesnt.exists", "1", - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterNullParamName() { - PEPSUtil.validateParameter("ServiceProviderAction", null, "1", - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the - * {@link PEPSUtil#validateParameter(String, String, String, String, String)} - * method for the given string values. - */ - @Test(expected = InvalidParameterPEPSException.class) - public void testValidateParameterNullParamValue() { - PEPSUtil.validateParameter("ServiceProviderAction", "qaaLevel", null, - "qaaLevel.code", "qaaLevel.message"); - } - - /** - * Tests the {@link PEPSUtil#encodeSAMLToken(byte[])} method for the given - * string value. - */ - @Test - public void testEncodeSAMLToken() { - assertEquals(PEPSUtil.encodeSAMLToken(SAML_BYTE_SAMPLE), SAML_BASE64_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#encodeSAMLToken(byte[])} method for the given - * null. - */ - @Test(expected = NullPointerException.class) - public void testEncodeSAMLTokenNull() { - assertNotSame(PEPSUtil.encodeSAMLToken(null), SAML_BASE64_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#encodeSAMLToken(byte[])} method for the given - * empty byte[] value. - */ - @Test - public void testEncodeSAMLTokenEmpty() { - assertEquals(PEPSUtil.encodeSAMLToken(EMPTY_BYTE), EMPTY_STRING); - } - - /** - * Tests the {@link PEPSUtil#decodeSAMLToken(byte[])} method for the given - * byte[] value. - */ - @Test - public void testDecodeSAMLToken() { - assertArrayEquals(PEPSUtil.decodeSAMLToken(SAML_BASE64_SAMPLE), - SAML_BYTE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#decodeSAMLToken(byte[])} method for the given - * null value. - */ - @Test(expected = NullPointerException.class) - public void testDecodeSAMLTokenNull() { - assertNotSame(PEPSUtil.decodeSAMLToken(null), SAML_BYTE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#decodeSAMLToken(byte[])} method for the given - * empty string value. - */ - @Test(expected = StringIndexOutOfBoundsException.class) - public void testDecodeSAMLTokenEmpty() { - assertTrue(PEPSUtil.decodeSAMLToken(EMPTY_STRING) == EMPTY_BYTE); - } - - /** - * Tests the {@link PEPSUtil#hashPersonalToken(byte[])} method for the given - * byte[] value. - */ - @Test - public void testHashPersonalToken() { - assertArrayEquals(PEPSUtil.hashPersonalToken(SAML_BASE64_BYTE_SAMPLE), - HASH_BYTE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#hashPersonalToken(byte[])} method for the given - * null value. - */ - @Test(expected = InternalErrorPEPSException.class) - public void testHashPersonalTokenNull() { - assertNull(PEPSUtil.hashPersonalToken(null)); - } - - /** - * Tests the {@link PEPSUtil#hashPersonalToken(byte[])} method for the given - * empty value. - */ - @Test - public void testHashPersonalTokenEmpty() { - assertArrayEquals(PEPSUtil.hashPersonalToken(EMPTY_BYTE), EMPTY_HASH_BYTE); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * correct message. - */ - @Test - public void testGetStorkErrorCodeExists() { - assertEquals(PEPSUtil.getStorkErrorCode(MESSAGE_SAMPLE), ERROR_CODE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * invalid message. - */ - @Test - public void testGetStorkErrorCodeNoExists() { - assertNull(PEPSUtil.getStorkErrorCode(ERROR_MESSAGE_SAMPLE)); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * empty message. - */ - @Test - public void testGetStorkErrorCodeEmpty() { - assertNull(PEPSUtil.getStorkErrorCode(EMPTY_STRING)); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * null message. - */ - @Test - public void testGetStorkErrorCodeNull() { - assertNull(PEPSUtil.getStorkErrorCode(null)); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * invalid message. - */ - @Test - public void testGetStorkErrorCodeWithSepFake() { - assertNull(PEPSUtil.getStorkErrorCode("-")); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorCode(String)} method for the given - * invalid message. - */ - @Test - public void testGetStorkErrorCodeWithSepAndCodeFake() { - assertNull(PEPSUtil.getStorkErrorCode("000001 -")); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given correct message. - */ - @Test - public void testGetStorkErrorMessageExists() { - assertEquals(PEPSUtil.getStorkErrorMessage(MESSAGE_SAMPLE), - ERROR_MESSAGE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given invalid message. - */ - @Test - public void testGetStorkErrorMessageNoExists() { - assertEquals(PEPSUtil.getStorkErrorMessage(ERROR_MESSAGE_SAMPLE), - ERROR_MESSAGE_SAMPLE); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given empty message. - */ - @Test - public void testGetStorkErrorMessageEmpty() { - assertEquals(PEPSUtil.getStorkErrorMessage(EMPTY_STRING), - EMPTY_STRING); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given null message. - */ - @Test - public void testGetStorkErrorMessageNull() { - assertNull(PEPSUtil.getStorkErrorMessage(null)); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given invalid message. - */ - @Test - public void testGetStorkErrorMessageWithSepFake() { - assertEquals(PEPSUtil.getStorkErrorMessage("-"), "-"); - } - - /** - * Tests the {@link PEPSUtil#getStorkErrorMessage(String)} method for the - * given invalid message. - */ - @Test - public void testGetStorkErrorMessageWithSepAndCodeFake() { - assertEquals(PEPSUtil.getStorkErrorMessage("000001 -"), "000001 -"); - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeListTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeListTestCase.java deleted file mode 100644 index 7800e78b5..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeListTestCase.java +++ /dev/null @@ -1,777 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKStatusCode; - -/** - * The PersonalAttributeList's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.5 $, $Date: 2010-11-17 05:17:02 $ - */ -public final class PersonalAttributeListTestCase { - - /** - * isAgeOver constant value. - */ - private static final String ISAGEOVER_CONS = "isAgeOver"; - - /** - * 1 constant value. - */ - private static final int ONE_CONS = 1; - - /** - * 2 constant value. - */ - private static final int TWO_CONS = 2; - - /** - * An empty attribute. - */ - @SuppressWarnings("unused") - private static final IPersonalAttributeList EMPTY_ATTR_LIST - = new PersonalAttributeList(0); - - /** - * An attribute with a complex value (canonicalResidenceAddress). - */ - private static PersonalAttribute complexAttrValue = null; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST - = "isAgeOver:true:[15]:Available;"; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST2 - = "isAgeOver:true:[18]:Available;"; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST3 - = "isAgeOver:true:[15]:Available;isAgeOver:true:[18]:Available;"; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST4 - = "isAgeOver:true:[15,18]:Available;"; - - /** - * Simple attribute value list string. - */ - private static final String SIMPLE_ATTRLIST3_REVERSE - = "isAgeOver:true:[18]:Available;isAgeOver:true:[15]:Available;"; - /** - * Simple attribute value list string. - */ - private static final String COMPLEX_ATTRLIST - = "canonicalResidenceAddress:true:[postalCode=4100,apartmentNumber=Ed. B," - + "state=Porto,countryCodeAddress=PT,streetNumber=379," - + "streetName=Avenida Sidonio Pais,town=Porto]:Available;"; - /** - * Mix attribute list string. - */ - private static final String STR_MIX_ATTR_LIST - = "isAgeOver:true:[15]:Available;canonicalResidenceAddress:true:[" - + "postalCode=4100,apartmentNumber=Ed.B,state=Porto,countryCodeAddress=PT," - + "streetNumber=379,streetName=Avenida Sidonio Pais,town=Porto]:" - + "Available;"; - - /** - * Mix attribute list 2 string. - */ - private static final String STR_MIX_ATTR_LIST2 - = "isAgeOver:true:[15]:Available;canonicalResidenceAddress:true:[" - + "postalCode=4100,apartmentNumber=Ed.B,state=Porto,countryCodeAddress=PT," - + "streetNumber=379,streetName=Avenida Sidonio Pais,town=Porto]:Available;" - + "mandateContent:true:[" - + "isJoint=\"isjoint\",typeOfPower=\"power\",ValidTo=\"validto\",validfrom=\"validfrom\",AQAA=\"3\",isChained=\"ischained\",]:" - + "Available;"; - - /** - * Attribute List example. - */ - @SuppressWarnings({"serial"}) - private static final PersonalAttribute ATTR_VALUE = new PersonalAttribute( - "age", true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - /** - * Init PersonalAttributeListTestCase class. - */ - @SuppressWarnings("serial") - @BeforeClass - public static void runsBeforeTheTestSuite() { - final Map values = new HashMap() { - { - put("countryCodeAddress", "PT"); - put("state", "Porto"); - put("town", "Porto"); - put("postalCode", "4100"); - put("streetName", "Avenida Sidonio Pais"); - put("streetNumber", "379"); - put("apartmentNumber", "Ed. B"); - } - }; - - complexAttrValue - = new PersonalAttribute("canonicalResidenceAddress", true, values, - STORKStatusCode.STATUS_AVAILABLE.toString()); - - } - - /** - * Testing Personal Attribute List add method. Personal Attribute list must - * be size 1 - Simple attribute. - */ - @Test - public void testAddSimpleAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(ATTR_VALUE); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List add method. Personal Attribute list must - * be size 1 - Complex attribute. - */ - @Test - public void testAddCompleAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(complexAttrValue); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List add method. Personal Attribute list must - * be size 0 - no attribute. - */ - @Test - public void testAddNull() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(null); - Assert.assertTrue(attrList.size() == 0); - } - - /** - * Testing Personal Attribute List add method. Same attribute name added - * twice. Personal Attribute list must be size 2 - IsAgeOver attribute added - * twice. - */ - @SuppressWarnings("serial") - @Test - public void testAddSameAttrName() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - System.out.println(); - Assert.assertTrue(attrList.get(attrValueOver.getName()).getValue().size() == 2); - } - - /** - * Testing Personal Attribute List add method. Same attribute name added - * twice. Personal Attribute list must be size 2 - IsAgeOver attribute added - * twice. - */ - @SuppressWarnings("serial") - @Test - public void testAddSameAttrNameEmpty() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add(""); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertTrue(attrList.size() == 1); - Assert.assertTrue(attrList.get(attrValueOver.getName()).getValue().size() == 2); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must - * be size 1 - Simple Value. - */ - @Test - public void testPutSimpleAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(ATTR_VALUE.getName(), ATTR_VALUE); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must - * be size 1 - Complex Value. - */ - @Test - public void testPutComplexAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(ATTR_VALUE.getName(), complexAttrValue); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must - * be size 0 - no attribute. - */ - @Test(expected = NullPointerException.class) - public void testPutNull() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put("", null); - Assert.assertTrue(attrList.size() == 0); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must - * be size 2 - IsAgeOver attribute added twice. - */ - @SuppressWarnings("serial") - @Test - public void testPutSameAttrName() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(attrValueUnder.getName(), attrValueUnder); - attrList.put(attrValueOver.getName(), attrValueOver); - Assert.assertTrue(attrList.size() == 1); - Assert.assertTrue(attrList.get(attrValueOver.getName()).getValue().size() == 2); - } - - /** - * Testing Personal Attribute List put method. Personal Attribute list must - * be size 2 - IsAgeOver attribute added twice. - */ - @SuppressWarnings("serial") - @Test - public void testPutSameAttrNameEmpty() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add(""); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(attrValueUnder.getName(), attrValueUnder); - attrList.put(attrValueOver.getName(), attrValueOver); - Assert.assertTrue(attrList.size() == 1); - Assert.assertTrue(attrList.get(attrValueOver.getName()).getValue().size() == 2); - } - - /** - * Testing Personal Attribute List get method. Personal Attribute list must - * be size 1 - Simple attribute. - */ - @Test - public void testGetSimpleAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(ATTR_VALUE); - Assert.assertEquals(ATTR_VALUE, attrList.get(ATTR_VALUE.getName())); - } - - /** - * Testing Personal Attribute List add method. Personal Attribute list must - * be size 1 - Complex attribute. - */ - @Test - public void testGetCompleAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(complexAttrValue); - Assert.assertEquals(complexAttrValue.toString(), - attrList.get(complexAttrValue.getName()).toString()); - } - - /** - * Testing Personal Attribute List get method. Personal Attribute list must - * be size 2 - IsAgeOver attribute. - */ - @SuppressWarnings("serial") - @Test - public void testGetIsAgeOverAttr() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertNotEquals(SIMPLE_ATTRLIST, - attrList.get(attrValueUnder.getName()).toString()); - Assert.assertNotEquals(SIMPLE_ATTRLIST2, - attrList.get(attrValueOver.getName()).toString()); - Assert.assertEquals(SIMPLE_ATTRLIST4, - attrList.get(attrValueOver.getName()).toString()); - } - - /** - * Testing Personal Attribute List populate method. Personal Attribute list - * must be size 1 - Simple attribute. - */ - @Test - public void testPopulateSimpleAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(SIMPLE_ATTRLIST); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List populate method. Personal Attribute list - * must be size 1 - Complex attribute. - */ - @Test - public void testPopulateComplexAttr() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(COMPLEX_ATTRLIST); - Assert.assertTrue(attrList.size() == 1); - } - - /** - * Testing Personal Attribute List populate method. Personal Attribute list - * must be size 1 - Simple and Complex attribute. - */ - @Test - public void testPopulateMixAttrs() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(STR_MIX_ATTR_LIST); - Assert.assertTrue(attrList.size() == 2); - //Assert.assertTrue(attrList.get(attrValueOver.getName()).getValue().size() == 2); - } - - /** - * Testing Personal Attribute List toString method using add. - */ - @SuppressWarnings("serial") - @Test - public void testToStringFromAdd() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertEquals(SIMPLE_ATTRLIST4, attrList.toString()); - } - - /** - * Testing Personal Attribute List toString method using put. - * - */ - @SuppressWarnings("serial") - @Test - public void testToStringFromPut() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(attrValueUnder.getName(), attrValueUnder); - attrList.put(attrValueOver.getName(), attrValueOver); - Assert.assertEquals(SIMPLE_ATTRLIST4, attrList.toString()); - } - - /** - * Testing Personal Attribute List toString method using populate. - */ - @Test - public void testToStringFromSimplePopulate() { - final String strAttrList = "isAgeOver:true"; - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(strAttrList); - Assert.assertEquals("isAgeOver:true:[]:;", attrList.toString()); - } - - /** - * Testing Personal Attribute List toString method using populate. - */ - @Test - public void testToStringFromPopulate() { - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.populate(SIMPLE_ATTRLIST3); - Assert.assertEquals(SIMPLE_ATTRLIST4, attrList.toString()); - } - - /** - * Testing Personal Attribute List populate method, with invalid values. - */ - @Test - public void testPopulateWithInvalidValuesFormat() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate("name:type:values:status;"); - Assert.assertEquals(pal, new PersonalAttributeList()); - } - - /** - * Testing Personal Attribute List populate method, with invalid format. - */ - @Test - public void testPopulateWithInvalidFormat() { - - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate("name:type::status;"); - Assert.assertEquals(pal, new PersonalAttributeList()); - } - - /** - * Testing Personal Attribute List clone method using add. - */ - @SuppressWarnings("serial") - @Test - public void testCloneFromAdd() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.add(attrValueUnder); - attrList.add(attrValueOver); - Assert.assertNotSame(attrList, attrList.clone()); - } - - /** - * Testing Personal Attribute List clone method using put. - */ - @SuppressWarnings("serial") - @Test - public void testCloneFromPut() { - final PersonalAttribute attrValueUnder - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - final PersonalAttribute attrValueOver - = new PersonalAttribute(ISAGEOVER_CONS, true, new ArrayList() { - { - add("18"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - final IPersonalAttributeList attrList = new PersonalAttributeList(1); - attrList.put(attrValueUnder.getName(), attrValueUnder); - attrList.put(attrValueOver.getName(), attrValueOver); - Assert.assertNotSame(attrList, attrList.clone()); - } - - /** - * Testing Personal Attribute List clone method using populate. - */ - @Test - public void testCloneFromPopulate() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(SIMPLE_ATTRLIST3); - Assert.assertNotSame(pal, pal.clone()); - } - - /** - * Testing Personal Attribute List iterator. - */ - @Test - public void testIterator() { - final String strAttrList - = "isAgeOver:true:[15,]:Available;isAgeOver:true:[18,]:Available;"; - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - final Iterator itAttr = pal.iterator(); - while (itAttr.hasNext()) { - final PersonalAttribute attr = itAttr.next(); - Assert.assertEquals(ISAGEOVER_CONS, attr.getName()); - } - } - - /** - * Testing Personal Attribute List's GetOptionalAttributes method with empty - * attribute list. - */ - @Test - public void testGetOptionalAttributesWithEmptyList() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - Assert.assertTrue(pal.getOptionalAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's GetOptionalAttributes method without - * optional attributes. - */ - @Test - public void testGetOptionalAttributesWithoutOptional() { - final String strAttrList - = "isAgeOver:true:[15,]:Available;isAgeOver:true:[18,]:Available;"; - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getOptionalAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's GetOptionalAttributes method with one - * optional attribute. - */ - @Test - public void testGetOptionalAttributesWithOneOptional() { - final String strAttrList - = "age:false:[]:;isAgeOver:true:[15,]:;isAgeOver:true:[18,]:;"; - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getOptionalAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's GetOptionalAttributes method with two - * optional attribute. - */ - @Test - public void testGetOptionalAttributesWithOnlyOptional() { - final String strAttrList - = "age:false:[]:;isAgeOver:false:[18,]:;"; - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getOptionalAttributes().size() == TWO_CONS); - } - - /** - * Testing Personal Attribute List's getMandatoryAttributes method with - * empty attribute list. - */ - @Test - public void testGetMandatoryAttributesWithEmptyList() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - Assert.assertTrue(pal.getMandatoryAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getMandatoryAttributes method without - * mandatory attributes. - */ - @Test - public void testGetMandatoryAttributesWithoutMandatory() { - final String strAttrList - = "isAgeOver:false:[15,]:Available;isAgeOver:false:[18,]:Available;"; - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getMandatoryAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's GetMandatoryAttributes method with one - * mandatory attribute. - */ - @Test - public void testGetMandatoryAttributesWithOneMandatory() { - final String strAttrList - = "age:true:[]:;isAgeOver:false:[15,]:;isAgeOver:false:[18,]:;"; - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getMandatoryAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's GetMandatoryAttributes method with two - * mandatory attribute. - */ - @Test - public void testGetMandatoryAttributesWithOnlyMandatory() { - final String strAttrList - = "age:true:[]:;isAgeOver:true:[18,]:;"; - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(strAttrList); - Assert.assertTrue(pal.getMandatoryAttributes().size() == TWO_CONS); - } - - /** - * Testing Personal Attribute List's getSimpleValueAttributes method with - * empty attribute list. - */ - @Test - public void testGetSimpleValueAttributesWithEmptyList() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - Assert.assertTrue(pal.getSimpleValueAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getSimpleValueAttributes() method - * without simple attributes. - */ - @Test - public void testGetSimpleValueAttributesWithoutSimple() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(COMPLEX_ATTRLIST); - Assert.assertTrue(pal.getSimpleValueAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getSimpleValueAttributes() method with - * one simple attribute. - */ - @Test - public void testGetSimpleValueAttributesWithOneSimple() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(STR_MIX_ATTR_LIST); - Assert.assertTrue(pal.getSimpleValueAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's GetMandatoryAttributes method with two - * simple attribute. - */ - @Test - public void testGetSimpleValueAttributesWithOnlySimple() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(SIMPLE_ATTRLIST3); - Assert.assertTrue(pal.getSimpleValueAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's getComplexValueAttributes method with - * empty attribute list. - */ - @Test - public void testGetComplexAttributesWithEmptyList() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - Assert.assertTrue(pal.getComplexAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getComplexAttributes() method without - * complex attributes. - */ - @Test - public void testGetComplexAttributesWithoutSimple() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(SIMPLE_ATTRLIST2); - Assert.assertTrue(pal.getComplexAttributes().isEmpty()); - } - - /** - * Testing Personal Attribute List's getComplexAttributes() method with one - * complex attribute. - */ - @Test - public void testGetComplexAttributesWithOneComplex() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(STR_MIX_ATTR_LIST); - Assert.assertTrue(pal.getComplexAttributes().size() == ONE_CONS); - } - - /** - * Testing Personal Attribute List's GetMandatoryAttributes method with only - * two Complex attribute. - */ - @Test - public void testGetComplexAttributesWithOnlyComplex() { - final IPersonalAttributeList pal = new PersonalAttributeList(); - pal.populate(STR_MIX_ATTR_LIST2); - Assert.assertTrue(pal.getComplexAttributes().size() == TWO_CONS); - } - -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeTestCase.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeTestCase.java deleted file mode 100644 index 82676ccf0..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/PersonalAttributeTestCase.java +++ /dev/null @@ -1,191 +0,0 @@ -/* - * This work is Open Source and licensed by the European Commission under the - * conditions of the European Public License v1.1 - * - * (http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1); - * - * any use of this file implies acceptance of the conditions of this license. - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -package eu.stork.peps.tests; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.Map; - -import org.junit.BeforeClass; -import org.junit.Test; - -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.STORKStatusCode; - -/** - * The PersonalAttribute's Test Case. - * - * @author ricardo.ferreira@multicert.com, renato.portela@multicert.com, - * luis.felix@multicert.com, hugo.magalhaes@multicert.com, - * paulo.ribeiro@multicert.com - * @version $Revision: 1.4 $, $Date: 2010-11-17 05:17:03 $ - */ -public final class PersonalAttributeTestCase { - - /** - * An empty attribute. - */ - private static final PersonalAttribute EMPTYATTR = new PersonalAttribute(); - - /** - * An attribute with a complex value (canonicalResidenceAddress). - */ - private static PersonalAttribute complexAttrValue = null; - - /** - * An attribute with a simple value (age). - */ - @SuppressWarnings("serial") - private static final PersonalAttribute ATTR_VALUE = new PersonalAttribute( - "age", true, new ArrayList() { - { - add("15"); - } - }, STORKStatusCode.STATUS_AVAILABLE.toString()); - - /** - * Init PersonalAttributeTestCase class. - */ - @SuppressWarnings("serial") - @BeforeClass - public static void runsBeforeTheTestSuite() { - final Map values = new HashMap() { - { - put("countryCodeAddress", "PT"); - put("state", "Porto"); - put("town", "Porto"); - put("postalCode", "4100"); - put("streetName", "Avenida Sidonio Pais"); - put("streetNumber", "379"); - put("apartmentNumber", "B"); - } - }; - - complexAttrValue - = new PersonalAttribute("canonicalResidenceAddress", true, values, - STORKStatusCode.STATUS_AVAILABLE.toString()); - - } - - /** - * Tests the {@link PersonalAttribute#toString()} method for the given - * simple attribute value. Values must match. - */ - @Test - public void testToStringValues() { - final String attrVal = ATTR_VALUE.toString(); - assert "age:true:[15]:Available;".equals(attrVal); - } - - /** - * Tests the {@link PersonalAttribute#toString()} method for the given - * complex attribute value. Values must match. - */ - @Test - public void testToStringComplexValues() { - //We are testing normal attribute Canonical address, only one value! - final Map complexAttrVal = complexAttrValue.getComplexValue(); - final boolean testResult = containsKeyAndValue(complexAttrVal, "postalCode", "4100") && - containsKeyAndValue(complexAttrVal, "apartmentNumber", "B") && - containsKeyAndValue(complexAttrVal, "state", "Porto") && - containsKeyAndValue(complexAttrVal, "countryCodeAddress", "PT") && - containsKeyAndValue(complexAttrVal, "streetNumber", "379") && - containsKeyAndValue(complexAttrVal, "streetName", "Avenida Sidonio Pais") && - containsKeyAndValue(complexAttrVal, "town", "Porto"); - assert testResult; - } - - private boolean containsKeyAndValue(final Map complexAttrVal, final String key, final String expectedValue) { - final boolean res = complexAttrVal.containsKey(key) && complexAttrVal.get(key).equals(expectedValue); - return res; - } - - /** - * Tests the {@link PersonalAttribute#isEmptyStatus()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyStatusWithNull() { - assert EMPTYATTR.isEmptyStatus(); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyStatus()} method for the given - * new attribute. Must return true. - */ - @Test - public void testToIsEmptyStatusWithEmptyString() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setStatus(""); - assert attr.isEmptyStatus(); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyValue()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyValueWithNull() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setValue(null); - assert attr.isEmptyValue(); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyValue()} method for the given - * empty attribute. Must return true. - */ - @Test - public void testToIsEmptyValue() { - assert EMPTYATTR.isEmptyValue(); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyComplexValue()} method for the - * given empty attribute. Must return true. - */ - @Test - public void testToIsEmptyComplexValueWithNull() { - final PersonalAttribute attr = (PersonalAttribute) EMPTYATTR.clone(); - attr.setComplexValue(null); - assert attr.isEmptyComplexValue(); - } - - /** - * Tests the {@link PersonalAttribute#isEmptyComplexValue()} method for the - * given empty attribute. Must return true. - */ - @Test - public void testToIsEmptyComplexValueWithEmptyComplexValue() { - assert EMPTYATTR.isEmptyComplexValue(); - } - - /** - * Tests the {@link PersonalAttribute#clone()} method for the given - * attribute. Must return true. - */ - @Test - public void testCloneToComplexValue() { - assert (complexAttrValue.getComplexValue().toString().equals(complexAttrValue.getComplexValue().toString()) && !complexAttrValue.equals(complexAttrValue.clone())); - } - - /** - * Tests the {@link PersonalAttribute#clone()} method for the given - * attribute. Must return true. - */ - @Test - public void testCloneToValue() { - assert !ATTR_VALUE.equals(ATTR_VALUE.clone()); - } -} diff --git a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/package-info.java b/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/package-info.java deleted file mode 100644 index 37841dd03..000000000 --- a/id/server/stork2-commons/src/test/java/eu/stork/peps/tests/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * This package provides all JUnit test classes. - */ -package eu.stork.peps.tests; diff --git a/id/server/stork2-commons/src/test/resources/log4j.xml b/id/server/stork2-commons/src/test/resources/log4j.xml deleted file mode 100644 index 2bba8b69f..000000000 --- a/id/server/stork2-commons/src/test/resources/log4j.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/id/server/stork2-saml-engine/.gitignore b/id/server/stork2-saml-engine/.gitignore deleted file mode 100644 index ea8c4bf7f..000000000 --- a/id/server/stork2-saml-engine/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/target diff --git a/id/server/stork2-saml-engine/pom.xml b/id/server/stork2-saml-engine/pom.xml deleted file mode 100644 index 6e013370a..000000000 --- a/id/server/stork2-saml-engine/pom.xml +++ /dev/null @@ -1,204 +0,0 @@ - - - MOA.id - moa-id - 3.x - - - 4.0.0 - eu.stork - SamlEngine - jar - STORKSAMLEngine - - UTF-8 - 1.5.1 - 0.5.2 - 0.5.1 - 1.5.1 - ${maven.build.timestamp} - ${basedir}/../../../repository - - ${saml.version} - - The STORKSAMLEngine library provides tools to support developers working with the Security Assertion Markup Language (SAML). - - - - - org.opensaml - https://build.shibboleth.net/nexus/content/repositories/releases - - - - shibboleth-release - Internet2 Releases - default - https://build.shibboleth.net/nexus/content/repositories/releases - - false - - - - - - - - eu.stork - Commons - 1.5.1 - - - - org.opensaml - xmltooling - - - - - org.opensaml - opensaml - - - org.slf4j - slf4j-api - - - org.slf4j - slf4j-simple - - - org.slf4j - jcl-over-slf4j - - - org.slf4j - log4j-over-slf4j - - - org.slf4j - jul-to-slf4j - - - bcprov-jdk15on - org.bouncycastle - - - - - - org.slf4j - slf4j-api - - - - org.slf4j - jcl-over-slf4j - - - - org.slf4j - jul-to-slf4j - - - - commons-io - commons-io - compile - - - xerces - xercesImpl - test - - - junit - junit - test - - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - - - - org.apache.maven.plugins - maven-surefire-plugin - - true - - - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - verify - - jar - - - - - - org.apache.maven.plugins - maven-jar-plugin - - - - ${saml.version} - ${samlspecacept.version} - ${samlspec.version} - None - ${timestamp} - - - - - - - - - metrics - - - - org.codehaus.mojo - cobertura-maven-plugin - 2.5.1 - - - html - xml - - - - - - - - - - diff --git a/id/server/stork2-saml-engine/src/main/java/META-INF/MANIFEST.MF b/id/server/stork2-saml-engine/src/main/java/META-INF/MANIFEST.MF deleted file mode 100644 index 254272e1c..000000000 --- a/id/server/stork2-saml-engine/src/main/java/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngine.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngine.java deleted file mode 100644 index 1dcaf4c95..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngine.java +++ /dev/null @@ -1,407 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine; - -import java.io.ByteArrayInputStream; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; -import java.util.HashMap; -import java.util.Map; -import java.util.Properties; - -import javax.xml.XMLConstants; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.opensaml.Configuration; -import org.opensaml.DefaultBootstrap; -import org.opensaml.common.SAMLObject; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.xml.ConfigurationException; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.Marshaller; -import org.opensaml.xml.io.MarshallerFactory; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.io.Unmarshaller; -import org.opensaml.xml.io.UnmarshallerFactory; -import org.opensaml.xml.io.UnmarshallingException; -import org.opensaml.xml.parse.BasicParserPool; -import org.opensaml.xml.parse.XMLParserException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; -import eu.stork.peps.auth.engine.core.SAMLEngineSignI; -import eu.stork.peps.auth.engine.core.STORKSAMLCore; -import eu.stork.peps.auth.engine.core.impl.CustomAttributeQueryMarshaller; -import eu.stork.peps.auth.engine.core.impl.CustomAttributeQueryUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.SignModuleFactory; -import eu.stork.peps.configuration.ConfigurationCreator; -import eu.stork.peps.configuration.ConfigurationReader; -import eu.stork.peps.configuration.InstanceEngine; -import eu.stork.peps.exceptions.SAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineRuntimeException; - -/** - * Class that wraps the operations over SAML tokens, both generation and validation of SAML requests and SAML responses. Compliant with "OASIS Secure Assertion Markup Language (SAML) 2.0, May 2005", - * but taking into account STORK specific requirements. - * - * @author fjquevedo - * @author iinigo - */ - -public class SAMLEngine { - - /** The Document Builder Factory. */ - private static javax.xml.parsers.DocumentBuilderFactory dbf = null; - - /** The instance of every engine SAML. */ - private static Map instanceConfigs; - - /** The instances of SAML engine. */ - private static Map> instances; - - /** The logger. */ - private static final Logger LOG = LoggerFactory.getLogger(SAMLEngine.class.getName()); - - /** The Constant MODULE_SIGN_CONF. */ - private static final String MODULE_SIGN_CONF = "SignatureConf"; - - /** The Constant SAML_ENGINE_SIGN_CLASS. */ - private static final String SAML_ENGINE_SIGN_CLASS = "class"; - - /** The Constant SAML_ENGINE_CONF. */ - private static final String SAML_ENGINE_CONF = "SamlEngineConf"; - - /** The Constant SAML_ENGINE_FILE_CONF. */ - private static final String SAML_ENGINE_FILE_CONF = "fileConfiguration"; - - /** - * Additional trust store for HW signing - */ - private static final String HW_TRUST_STORE_CONF = "softTrustStoreConfig"; - - /** - * The codification of characters. - */ - private static final String CHARACTER_ENCODING = "UTF-8"; - - /** The SAML core. */ - private STORKSAMLCore samlCore; - - /** The Module of Signature. */ - private SAMLEngineSignI signer; - - /** Initializes the SAML engine. */ - /** Configure Document Builder Factory. */ - - static { - startUp(); - loadDocumentFactory(); - } - - /** - * Load document factory. - */ - private static void loadDocumentFactory() { - try { - dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); - dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); - dbf.setNamespaceAware(true); - dbf.setIgnoringComments(true); - } catch (ParserConfigurationException e) { - LOG.error("Error parser configuration."); - throw new STORKSAMLEngineRuntimeException(e); - } - } - - /** - * Method that initializes the basic services for the SAML Engine, like the OpenSAML library and the BouncyCastle provider. - */ - private static void startUp() { - - LOG.info("SAMLEngine: Initialize OpenSAML"); - - /* - * Commented because it makes a problems with PVP2 MOA-ID try { DefaultBootstrap.bootstrap(); } catch (ConfigurationException e) { LOG.error("Problem initializing the OpenSAML library."); - * throw new STORKSAMLEngineRuntimeException(e); } - */ - - LOG.debug("Read all file configurations. (instances of SAMLEngine)"); - try { - instanceConfigs = ConfigurationReader.readConfiguration(); - } catch (SAMLEngineException e) { - LOG.error("Error read configuration file."); - throw new STORKSAMLEngineRuntimeException(e); - } - - LOG.debug("Create all instances of saml engine. (instances of SAMLEngine)"); - try { - instances = ConfigurationCreator.createConfiguration(instanceConfigs); - } catch (STORKSAMLEngineException e) { - LOG.error("Error initializing instances from Stork SAML engine."); - throw new STORKSAMLEngineRuntimeException(e); - } - } - - /** - * Instantiates a new SAML engine. - * - * @param nameInstance - * the name instance - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - protected SAMLEngine(final String nameInstance) throws STORKSAMLEngineException { - LOG.info("Loading Specific Configuration."); - - LOG.debug("Create intance of saml messages."); - - Map instance = instances.get(nameInstance); - - if (instance == null || instance.isEmpty()) { - LOG.error("Instance: " + nameInstance + " not exist."); - throw new STORKSAMLEngineException("Instance: " + nameInstance + " not exist."); - } - - Properties properties = (Properties) instance.get(SAML_ENGINE_CONF); - - if (properties == null) { - LOG.error("SamlEngine.xml: not exist."); - throw new STORKSAMLEngineException("SamlEngine.xml: not exist."); - } - - samlCore = new STORKSAMLCore(properties); - - final HashMap propertiesSign = (HashMap) instance.get(MODULE_SIGN_CONF); - - LOG.debug("Loading Module of sign."); - signer = SignModuleFactory.getInstance(propertiesSign.get(SAML_ENGINE_SIGN_CLASS)); - - try { - LOG.info("Initialize module of sign."); - signer.init(propertiesSign.get(SAML_ENGINE_FILE_CONF)); - LOG.info("Load cryptographic service provider of module of sign."); - signer.loadCryptServiceProvider(); - } catch (SAMLEngineException e) { - LOG.error("Error create signature module: " + propertiesSign.get(SAML_ENGINE_FILE_CONF)); - LOG.info("Exception" + e); - throw new STORKSAMLEngineException(e); - } - } - - /** - * Gets the Signer properties. - * - * @return the SAML Sign properties - */ - protected SAMLEngineSignI getSigner() { - return signer; - } - - /** - * Gets the SAML core properties. - * - * @return the SAML core properties - */ - protected final STORKSAMLCore getSamlCoreProperties() { - return samlCore; - } - - /** - * Method that transform the received SAML object into a byte array representation. - * - * @param samlToken - * the SAML token. - * - * @return the byte[] of the SAML token. - * - * @throws SAMLEngineException - * the SAML engine exception - */ - private byte[] marshall(final XMLObject samlToken) throws SAMLEngineException { - - try { - javax.xml.parsers.DocumentBuilder docBuilder = null; - - final MarshallerFactory marshallerFactory = Configuration.getMarshallerFactory(); - - final Marshaller marshaller; - if (samlToken.getElementQName().toString().endsWith(CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME)) - marshaller = new CustomAttributeQueryMarshaller(); - else - marshaller = marshallerFactory.getMarshaller(samlToken); - - docBuilder = dbf.newDocumentBuilder(); - - final Document doc = docBuilder.newDocument(); - - marshaller.marshall(samlToken, doc); - - // Obtain a byte array representation of the marshalled SAML object - final DOMSource domSource = new DOMSource(doc); - final StringWriter writer = new StringWriter(); - final StreamResult result = new StreamResult(writer); - final TransformerFactory transFactory = TransformerFactory.newInstance(); - Transformer transformer; - - transformer = transFactory.newTransformer(); - transformer.transform(domSource, result); - LOG.debug("SAML request \n" + writer.toString()); - return writer.toString().getBytes(CHARACTER_ENCODING); - - } catch (ParserConfigurationException e) { - LOG.error("ParserConfigurationException."); - throw new SAMLEngineException(e); - } catch (MarshallingException e) { - LOG.error("MarshallingException."); - throw new SAMLEngineException(e); - } catch (TransformerConfigurationException e) { - LOG.error("TransformerConfigurationException."); - throw new SAMLEngineException(e); - } catch (TransformerException e) { - LOG.error("TransformerException."); - throw new SAMLEngineException(e); - } catch (UnsupportedEncodingException e) { - LOG.error("UnsupportedEncodingException: " + CHARACTER_ENCODING); - throw new SAMLEngineException(e); - } - } - - /** - * Method that signs a SAML Token. - * - * @param tokenSaml - * the token SAML - * - * @return the SAML object sign - * - * @throws SAMLEngineException - * the SAML engine exception - */ - private SignableSAMLObject sign(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - LOG.debug("Sign SamlToken."); - signer.sign(tokenSaml); - return tokenSaml; - } - - /** - * Sign and transform to byte array. - * - * @param samlToken - * the SAML token - * - * @return the byte[] of the SAML token - * - * @throws SAMLEngineException - * the SAML engine exception - */ - protected final byte[] signAndMarshall(final SignableSAMLObject samlToken) throws SAMLEngineException { - LOG.debug("Marshall Saml Token."); - SignableSAMLObject signElement = sign(samlToken); - return marshall(signElement); - } - - /** - * Method that unmarshalls a SAML Object from a byte array representation to an XML Object. - * - * @param samlToken - * Byte array representation of a SAML Object - * - * @return XML Object (superclass of SAMLObject) - * - * @throws SAMLEngineException - * the SAML engine exception - */ - protected final XMLObject unmarshall(final byte[] samlToken) throws SAMLEngineException { - try { - // Get parser pool manager - final BasicParserPool ppMgr = new BasicParserPool(); - // Note: this is necessary due to an unresolved Xerces deferred DOM - // issue/bug - final HashMap features = new HashMap(); - features.put(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); - ppMgr.setBuilderFeatures(features); - - ppMgr.setNamespaceAware(true); - - // Parse SAMLToken - Document document = ppMgr.parse(new ByteArrayInputStream(samlToken)); - if (document != null) { - final Element root = document.getDocumentElement(); - // Get appropriate unmarshaller - final UnmarshallerFactory unmarshallerFact = Configuration.getUnmarshallerFactory(); - // Unmarshall using the SAML Token root element - if (unmarshallerFact != null && root != null) { - final Unmarshaller unmarshaller; - if (root.getLocalName().equals(CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME)) - unmarshaller = new CustomAttributeQueryUnmarshaller(); - else - unmarshaller = unmarshallerFact.getUnmarshaller(root); - try { - return unmarshaller.unmarshall(root); - } catch (NullPointerException e) { - LOG.error("Error element tag incomplet or null."); - throw new SAMLEngineException("NullPointerException", e); - } - } else { - LOG.error("Error element tag incomplet or null."); - throw new SAMLEngineException("NullPointerException : unmarshallerFact or root is null"); - } - } else { - LOG.error("Error element tag incomplet or null."); - throw new SAMLEngineException("NullPointerException : document is null"); - } - } catch (XMLParserException e) { - LOG.error("XML Parsing Error.", e); - throw new SAMLEngineException(e); - } catch (UnmarshallingException e) { - LOG.error("TransformerException.", e); - throw new SAMLEngineException(e); - } catch (NullPointerException e) { - LOG.error("Error element tag incomplet or null.", e); - throw new SAMLEngineException(e); - } - } - - /** - * Method that validates an XML Signature contained in a SAML Token. - * - * @param samlToken - * the SAML token - * - * @return the SAML object - * - * @throws SAMLEngineException - * the SAML engine exception - */ - protected final SAMLObject validateSignature(final SignableSAMLObject samlToken) throws SAMLEngineException { - - LOG.info("Validate Signature"); - signer.validateSignature(samlToken); - - return samlToken; - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngineUtils.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngineUtils.java deleted file mode 100644 index 3cc323c96..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/SAMLEngineUtils.java +++ /dev/null @@ -1,768 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.UnsupportedEncodingException; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.util.Iterator; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.apache.commons.lang.StringUtils; -import org.joda.time.DateTime; -import org.opensaml.Configuration; -import org.opensaml.common.SAMLVersion; -import org.opensaml.common.impl.SecureRandomIdentifierGenerator; -import org.opensaml.saml2.common.Extensions; -import org.opensaml.saml2.common.impl.ExtensionsBuilder; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.AttributeValue; -import org.opensaml.saml2.core.AuthnContext; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.core.AuthnStatement; -import org.opensaml.saml2.core.Issuer; -import org.opensaml.saml2.core.LogoutRequest; -import org.opensaml.saml2.core.LogoutResponse; -import org.opensaml.saml2.core.NameID; -import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.core.Status; -import org.opensaml.saml2.core.StatusCode; -import org.opensaml.saml2.core.StatusMessage; -import org.opensaml.saml2.core.Subject; -import org.opensaml.saml2.core.SubjectConfirmation; -import org.opensaml.saml2.core.SubjectConfirmationData; -import org.opensaml.saml2.core.SubjectLocality; -import org.opensaml.saml2.core.impl.AssertionBuilder; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.schema.XSAny; -import org.opensaml.xml.signature.KeyInfo; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; -import eu.stork.peps.auth.engine.core.QAAAttribute; -import eu.stork.peps.auth.engine.core.RequestedAttribute; -import eu.stork.peps.auth.engine.core.SAMLCore; -import eu.stork.peps.auth.engine.core.SPApplication; -import eu.stork.peps.auth.engine.core.SPCountry; -import eu.stork.peps.auth.engine.core.SPInstitution; -import eu.stork.peps.auth.engine.core.SPSector; -import eu.stork.peps.auth.engine.core.impl.CustomAttributeQueryBuilder; -import eu.stork.peps.exceptions.STORKSAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineRuntimeException; - -/** - * The Class SAMLEngineUtils. - * - * @author fjquevedo - * @author iinigo - * - */ -public final class SAMLEngineUtils { - - /** The Constant UTF_8. */ - public static final String UTF_8 = "UTF-8"; - - /** The Constant SHA_512. */ - public static final String SHA_512 = "SHA-512"; - - /** The generator. */ - private static SecureRandomIdentifierGenerator generator; - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(SAMLEngineUtils.class.getName()); - - /** - * Method that generates a random value according to NCName grammar. - * - * NCName ::= NCNameStartChar NCNameChar* NCNameChar ::= NameChar - ':' NCNameStartChar ::= Letter | '_' NameStartChar ::= ":" | [A-Z] | "_" | [a-z] | [#xC0-#xD6] | [#xD8-#xF6] | [#xF8-#x2FF] | - * [#x370-#x37D] | [#x37F-#x1FFF] | [#x200C-#x200D] | [#x2070-#x218F] | [#x2C00-#x2FEF] | [#x3001-#xD7FF] | [#xF900-#xFDCF] | [#xFDF0-#xFFFD] | [#x10000-#xEFFFF] NameChar ::= NameStartChar | "-" | - * "." | [0-9] | #xB7 | [#x0300-#x036F] | [#x203F-#x2040] Name ::= NameStartChar (NameChar)* Letter ::= BaseChar | Ideographic BaseChar ::= [#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | - * [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] | [#x01FA-#x0217] | - * [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 | [#x0388-#x038A] | #x038C | [#x038E-#x03A1] | [#x03A3-#x03CE] | [#x03D0-#x03D6] | #x03DA | #x03DC | #x03DE | #x03E0 | [#x03E2-#x03F3] | - * [#x0401-#x040C] | [#x040E-#x044F] | [#x0451-#x045C] | [#x045E-#x0481] | [#x0490-#x04C4] | [#x04C7-#x04C8] | [#x04CB-#x04CC] | [#x04D0-#x04EB] | [#x04EE-#x04F5] | [#x04F8-#x04F9] | - * [#x0531-#x0556] | #x0559 | [#x0561-#x0586] | [#x05D0-#x05EA] | [#x05F0-#x05F2] | [#x0621-#x063A] | [#x0641-#x064A] | [#x0671-#x06B7] | [#x06BA-#x06BE] | [#x06C0-#x06CE] | [#x06D0-#x06D3] | - * #x06D5 | [#x06E5-#x06E6] | [#x0905-#x0939] | #x093D | [#x0958-#x0961] | [#x0985-#x098C] | [#x098F-#x0990] | [#x0993-#x09A8] | [#x09AA-#x09B0] | #x09B2 | [#x09B6-#x09B9] | [#x09DC-#x09DD] | - * [#x09DF-#x09E1] | [#x09F0-#x09F1] | [#x0A05-#x0A0A] | [#x0A0F-#x0A10] | [#x0A13-#x0A28] | [#x0A2A-#x0A30] | [#x0A32-#x0A33] | [#x0A35-#x0A36] | [#x0A38-#x0A39] | [#x0A59-#x0A5C] | #x0A5E | - * [#x0A72-#x0A74] | [#x0A85-#x0A8B] | #x0A8D | [#x0A8F-#x0A91] | [#x0A93-#x0AA8] | [#x0AAA-#x0AB0] | [#x0AB2-#x0AB3] | [#x0AB5-#x0AB9] | #x0ABD | #x0AE0 | [#x0B05-#x0B0C] | [#x0B0F-#x0B10] | - * [#x0B13-#x0B28] | [#x0B2A-#x0B30] | [#x0B32-#x0B33] | [#x0B36-#x0B39] | #x0B3D | [#x0B5C-#x0B5D] | [#x0B5F-#x0B61] | [#x0B85-#x0B8A] | [#x0B8E-#x0B90] | [#x0B92-#x0B95] | [#x0B99-#x0B9A] | - * #x0B9C | [#x0B9E-#x0B9F] | [#x0BA3-#x0BA4] | [#x0BA8-#x0BAA] | [#x0BAE-#x0BB5] | [#x0BB7-#x0BB9] | [#x0C05-#x0C0C] | [#x0C0E-#x0C10] | [#x0C12-#x0C28] | [#x0C2A-#x0C33] | [#x0C35-#x0C39] | - * [#x0C60-#x0C61] | [#x0C85-#x0C8C] | [#x0C8E-#x0C90] | [#x0C92-#x0CA8] | [#x0CAA-#x0CB3] | [#x0CB5-#x0CB9] | #x0CDE | [#x0CE0-#x0CE1] | [#x0D05-#x0D0C] | [#x0D0E-#x0D10] | [#x0D12-#x0D28] | - * [#x0D2A-#x0D39] | [#x0D60-#x0D61] | [#x0E01-#x0E2E] | #x0E30 | [#x0E32-#x0E33] | [#x0E40-#x0E45] | [#x0E81-#x0E82] | #x0E84 | [#x0E87-#x0E88] | #x0E8A | #x0E8D | [#x0E94-#x0E97] | - * [#x0E99-#x0E9F] | [#x0EA1-#x0EA3] | #x0EA5 | #x0EA7 | [#x0EAA-#x0EAB] | [#x0EAD-#x0EAE] | #x0EB0 | [#x0EB2-#x0EB3] | #x0EBD | [#x0EC0-#x0EC4] | [#x0F40-#x0F47] | [#x0F49-#x0F69] | - * [#x10A0-#x10C5] | [#x10D0-#x10F6] | #x1100 | [#x1102-#x1103] | [#x1105-#x1107] | #x1109 | [#x110B-#x110C] | [#x110E-#x1112] | #x113C | #x113E | #x1140 | #x114C | #x114E | #x1150 | - * [#x1154-#x1155] | #x1159 | [#x115F-#x1161] | #x1163 | #x1165 | #x1167 | #x1169 | [#x116D-#x116E] | [#x1172-#x1173] | #x1175 | #x119E | #x11A8 | #x11AB | [#x11AE-#x11AF] | [#x11B7-#x11B8] | - * #x11BA | [#x11BC-#x11C2] | #x11EB | #x11F0 | #x11F9 | [#x1E00-#x1E9B] | [#x1EA0-#x1EF9] | [#x1F00-#x1F15] | [#x1F18-#x1F1D] | [#x1F20-#x1F45] | [#x1F48-#x1F4D] | [#x1F50-#x1F57] | #x1F59 | - * #x1F5B | #x1F5D | [#x1F5F-#x1F7D] | [#x1F80-#x1FB4] | [#x1FB6-#x1FBC] | #x1FBE | [#x1FC2-#x1FC4] | [#x1FC6-#x1FCC] | [#x1FD0-#x1FD3] | [#x1FD6-#x1FDB] | [#x1FE0-#x1FEC] | [#x1FF2-#x1FF4] | - * [#x1FF6-#x1FFC] | #x2126 | [#x212A-#x212B] | #x212E | [#x2180-#x2182] | [#x3041-#x3094] | [#x30A1-#x30FA] | [#x3105-#x312C] | [#xAC00-#xD7A3] Ideographic ::= [#x4E00-#x9FA5] | #x3007 | - * [#x3021-#x3029] - * - * @return Random ID value - */ - - // Initialization of a generator of identifiers for all token SAML. - static { - loadRandomIdentifierGenerator(); - } - - /** - * Load random identifier generator. - * - * @throws STORKSAMLEngineRuntimeException - * the STORKSAML engine runtime exception - */ - private static void loadRandomIdentifierGenerator() { - try { - generator = new SecureRandomIdentifierGenerator(); - } catch (NoSuchAlgorithmException ex) { - LOG.error("Error init SecureRandomIdentifierGenerator", ex); - throw new STORKSAMLEngineRuntimeException(ex); - } - - } - - /** - * Creates the SAML object. - * - * @param qname - * the QName - * - * @return the XML object - */ - public static XMLObject createSamlObject(final QName qname) { - if (qname.toString().endsWith(CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME)) { - CustomAttributeQueryBuilder builder = new CustomAttributeQueryBuilder(); - return builder.buildObject(qname); - } else { - return Configuration.getBuilderFactory().getBuilder(qname).buildObject(qname); - } - } - - /** - * Creates the SAML object. - * - * @param qname - * the quality name - * @param qname1 - * the qname1 - * - * @return the xML object - */ - public static XMLObject createSamlObject(final QName qname, final QName qname1) { - return Configuration.getBuilderFactory().getBuilder(qname1).buildObject(qname, qname1); - } - - /** - * Encode value with an specific algorithm. - * - * @param value - * the value - * @param alg - * the algorithm - * - * @return the string - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static String encode(final String value, final String alg) throws STORKSAMLEngineException { - LOG.debug("Encode value with " + alg + " algorithm."); - byte[] buffer; - final StringBuffer hash = new StringBuffer(""); - try { - buffer = value.getBytes(UTF_8); - MessageDigest msgDig; - msgDig = MessageDigest.getInstance(alg); - msgDig.update(buffer); - final byte[] digest = msgDig.digest(); - final int signedByte = 0xff; - for (byte aux : digest) { - final int byt = aux & signedByte; - if (Integer.toHexString(byt).length() == 1) { - hash.append('0'); - } - hash.append(Integer.toHexString(byt)); - } - } catch (UnsupportedEncodingException e1) { - LOG.error("UnsupportedEncodingException: " + UTF_8); - throw new STORKSAMLEngineException(e1); - } catch (NoSuchAlgorithmException e) { - LOG.error("NoSuchAlgorithmException: " + alg); - throw new STORKSAMLEngineException(e); - } - return hash.toString(); - } - - /** - * Generate assertion. - * - * @param version - * the version - * @param identifier - * the identifier - * @param issueInstant - * the issue instant - * @param issuer - * the issuer - * - * @return the assertion - */ - public static Assertion generateAssertion(final SAMLVersion version, final String identifier, final DateTime issueInstant, final Issuer issuer) { - final AssertionBuilder assertionBuilder = new AssertionBuilder(); - final Assertion assertion = assertionBuilder.buildObject(); - assertion.setVersion(version); - assertion.setID(identifier); - assertion.setIssueInstant(issueInstant); - // - assertion.setIssuer(issuer); - return assertion; - } - - /** - * Generate authentication statement. - * - * @param authnInstant - * the authentication instant - * @param authnContext - * the authentication context - * - * @return the authentication statement - */ - public static AuthnStatement generateAthnStatement(final DateTime authnInstant, final AuthnContext authnContext) { - // - final AuthnStatement authnStatement = (AuthnStatement) SAMLEngineUtils.createSamlObject(AuthnStatement.DEFAULT_ELEMENT_NAME); - authnStatement.setAuthnInstant(authnInstant); - authnStatement.setAuthnContext(authnContext); - return authnStatement; - } - - /** - * Generate attribute from a list of values. - * - * @param name - * the name of the attribute. - * @param status - * the status of the parameter: "Available", "NotAvailable" or "Withheld". - * @param values - * the value of the attribute. - * @param isHashing - * the is hashing with "SHA-512" algorithm. - * @return the attribute - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static Attribute generateAttrComplex(final String name, final String status, final Map values, final boolean isHashing) throws STORKSAMLEngineException { - LOG.debug("Generate attribute complex: " + name); - final Attribute attribute = (Attribute) SAMLEngineUtils.createSamlObject(Attribute.DEFAULT_ELEMENT_NAME); - - attribute.setName(name); - attribute.setNameFormat(Attribute.URI_REFERENCE); - attribute.getUnknownAttributes().put(new QName(SAMLCore.STORK10_NS.getValue(), "AttributeStatus", SAMLCore.STORK10_PREFIX.getValue()), status); - - if (!values.isEmpty()) { - LOG.debug("Add attribute values."); - // Create an attribute that contains all XSAny elements. - final XSAny attrValue = (XSAny) SAMLEngineUtils.createSamlObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSAny.TYPE_NAME); - final Iterator> iterator = values.entrySet().iterator(); - while (iterator.hasNext()) { - final Map.Entry pairs = iterator.next(); - final String value = pairs.getValue(); - - if (StringUtils.isNotBlank(value)) { - // Create the attribute statement - final XSAny attrValueSimple = (XSAny) SAMLEngineUtils.createSamlObject(new QName(SAMLCore.STORK10_NS.getValue(), pairs.getKey().toString(), SAMLCore.STORK10_PREFIX.getValue()), - XSAny.TYPE_NAME); - // if it's necessary encode the information. - if (isHashing) { - attrValueSimple.setTextContent(encode(value, SHA_512)); - } else { - attrValueSimple.setTextContent(value); - } - attrValue.getUnknownXMLObjects().add(attrValueSimple); - attribute.getAttributeValues().add(attrValue); - } - } - - } - return attribute; - } - - /** - * Generate extension. - * - * @return the extensions - */ - public static Extensions generateExtension() { - final ExtensionsBuilder extensionsBuilder = new ExtensionsBuilder(); - return extensionsBuilder.buildObject("urn:oasis:names:tc:SAML:2.0:protocol", "Extensions", "saml2p"); - } - - /** - * Generate issuer. - * - * @return the issuer - */ - public static Issuer generateIssuer() { - return (Issuer) SAMLEngineUtils.createSamlObject(Issuer.DEFAULT_ELEMENT_NAME); - } - - /** - * Generate key info. - * - * @return the key info - */ - public static KeyInfo generateKeyInfo() { - return (KeyInfo) SAMLEngineUtils.createSamlObject(KeyInfo.DEFAULT_ELEMENT_NAME); - } - - /** - * Generate name id. - * - * @return the name id - */ - public static NameID generateNameID() { - return (NameID) SAMLEngineUtils.createSamlObject(NameID.DEFAULT_ELEMENT_NAME); - } - - /** - * Generate name id. - * - * @param nameQualifier - * the name qualifier - * @param format - * the format - * @param spNameQualifier - * the sP name qualifier - * - * @return the name id - */ - public static NameID generateNameID(final String nameQualifier, final String format, final String spNameQualifier) { - // - final NameID nameId = (NameID) Configuration.getBuilderFactory().getBuilder(NameID.DEFAULT_ELEMENT_NAME).buildObject(NameID.DEFAULT_ELEMENT_NAME); - // optional - nameId.setNameQualifier(nameQualifier); - // optional - nameId.setFormat(format); - // optional - nameId.setSPNameQualifier(spNameQualifier); - return nameId; - } - - /** - * Generate NCName. - * - * @return the string - */ - public static String generateNCName() { - return generator.generateIdentifier(); - } - - /** - * Generate the quality authentication assurance level. - * - * @param qaal - * the level of quality authentication assurance. - * - * @return the quality authentication assurance attribute - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static QAAAttribute generateQAAAttribute(final int qaal) throws STORKSAMLEngineException { - LOG.debug("Generate QAAAttribute."); - - final QAAAttribute qaaAttribute = (QAAAttribute) SAMLEngineUtils.createSamlObject(QAAAttribute.DEF_ELEMENT_NAME); - qaaAttribute.setQaaLevel(String.valueOf(qaal)); - return qaaAttribute; - } - - /** - * Generate requested attribute. - * - * @param name - * the name - * @param friendlyName - * the friendly name - * @param isRequired - * the is required - * @param value - * the value - * - * @return the requested attribute - */ - public static RequestedAttribute generateReqAuthnAttributeSimple(final String name, final String friendlyName, final String isRequired, final List value) { - LOG.debug("Generate the requested attribute."); - - final RequestedAttribute requested = (RequestedAttribute) SAMLEngineUtils.createSamlObject(RequestedAttribute.DEF_ELEMENT_NAME); - requested.setName(name); - requested.setNameFormat(RequestedAttribute.URI_REFERENCE); - - requested.setFriendlyName(friendlyName); - - requested.setIsRequired(isRequired); - - // The value is optional in an authentication request. - if (!value.isEmpty()) { - for (int nextValue = 0; nextValue < value.size(); nextValue++) { - final String valor = value.get(nextValue); - if (StringUtils.isNotBlank(valor)) { - - if (!name.equals("http://www.stork.gov.eu/1.0/signedDoc")) { - - // Create the attribute statement - final XSAny attrValue = (XSAny) SAMLEngineUtils.createSamlObject(new QName(SAMLCore.STORK10_NS.getValue(), "AttributeValue", SAMLCore.STORK10_PREFIX.getValue()), - XSAny.TYPE_NAME); - - attrValue.setTextContent(valor.trim()); - requested.getAttributeValues().add(attrValue); - - } else { - - DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance(); - domFactory.setNamespaceAware(true); - Document document = null; - DocumentBuilder builder; - - // Parse the signedDoc value into an XML DOM Document - try { - builder = domFactory.newDocumentBuilder(); - InputStream is; - is = new ByteArrayInputStream(valor.trim().getBytes(UTF_8)); - document = builder.parse(is); - is.close(); - } catch (SAXException e1) { - LOG.error("SAX Error while parsing signModule attribute", e1); - throw new STORKSAMLEngineRuntimeException(e1); - } catch (ParserConfigurationException e2) { - LOG.error("Parser Configuration Error while parsing signModule attribute", e2); - throw new STORKSAMLEngineRuntimeException(e2); - } catch (UnsupportedEncodingException e3) { - LOG.error("Unsupported encoding Error while parsing signModule attribute", e3); - throw new STORKSAMLEngineRuntimeException(e3); - } catch (IOException e4) { - LOG.error("IO Error while parsing signModule attribute", e4); - throw new STORKSAMLEngineRuntimeException(e4); - } - - // Create the XML statement(this will be overwritten with the previous DOM structure) - final XSAny xmlValue = (XSAny) SAMLEngineUtils.createSamlObject(new QName(SAMLCore.STORK10_NS.getValue(), "XMLValue", SAMLCore.STORK10_PREFIX.getValue()), XSAny.TYPE_NAME); - - // Set the signedDoc XML content to this element - xmlValue.setDOM(document.getDocumentElement()); - - // Create the attribute statement - final XSAny attrValue = (XSAny) SAMLEngineUtils.createSamlObject(new QName(SAMLCore.STORK10_NS.getValue(), "AttributeValue", SAMLCore.STORK10_PREFIX.getValue()), - XSAny.TYPE_NAME); - - // Add previous signedDocXML to the AttributeValue Element - attrValue.getUnknownXMLObjects().add(xmlValue); - - requested.getAttributeValues().add(attrValue); - } - - } - } - } - - return requested; - } - - /** - * Generate response. - * - * @param version - * the version - * @param identifier - * the identifier - * @param issueInstant - * the issue instant - * @param status - * the status - * - * @return the response - */ - public static Response generateResponse(final SAMLVersion version, final String identifier, final DateTime issueInstant, final Status status) { - final Response response = (Response) SAMLEngineUtils.createSamlObject(Response.DEFAULT_ELEMENT_NAME); - response.setID(identifier); - response.setIssueInstant(issueInstant); - response.setStatus(status); - return response; - } - - /** - * Method that generates a SAML Authentication Request basing on the provided information. - * - * @param identifier - * the identifier - * @param version - * the version - * @param issueInstant - * the issue instant - * - * @return the authentication request - */ - public static AuthnRequest generateSAMLAuthnRequest(final String identifier, final SAMLVersion version, final DateTime issueInstant) { - LOG.debug("Generate basic authentication request."); - final AuthnRequest authnRequest = (AuthnRequest) SAMLEngineUtils.createSamlObject(AuthnRequest.DEFAULT_ELEMENT_NAME); - - authnRequest.setID(identifier); - authnRequest.setVersion(version); - authnRequest.setIssueInstant(issueInstant); - return authnRequest; - } - - public static CustomAttributeQuery generateSAMLAttrQueryRequest(final String identifier, final SAMLVersion version, final DateTime issueInstant) { - LOG.debug("Generate attribute query request."); - final CustomAttributeQuery attrQueryRequest = (CustomAttributeQuery) SAMLEngineUtils.createSamlObject(CustomAttributeQuery.DEFAULT_ELEMENT_NAME); - - attrQueryRequest.setID(identifier); - attrQueryRequest.setVersion(version); - attrQueryRequest.setIssueInstant(issueInstant); - return attrQueryRequest; - } - - public static LogoutRequest generateSAMLLogoutRequest(final String identifier, final SAMLVersion version, final DateTime issueInstant) { - LOG.debug("Generate logout request."); - final LogoutRequest logoutRequest = (LogoutRequest) SAMLEngineUtils.createSamlObject(LogoutRequest.DEFAULT_ELEMENT_NAME); - - logoutRequest.setID(identifier); - logoutRequest.setVersion(version); - logoutRequest.setIssueInstant(issueInstant); - return logoutRequest; - } - - public static LogoutResponse generateSAMLLogoutResponse(final String identifier, final SAMLVersion version, final DateTime issueInstant, final Status status, final String inResponseTo) { - LOG.debug("Generate logout response."); - final LogoutResponse logoutResponse = (LogoutResponse) SAMLEngineUtils.createSamlObject(LogoutResponse.DEFAULT_ELEMENT_NAME); - - logoutResponse.setInResponseTo(inResponseTo); - logoutResponse.setStatus(status); - logoutResponse.setID(identifier); - logoutResponse.setVersion(version); - logoutResponse.setIssueInstant(issueInstant); - return logoutResponse; - } - - /** - * Generate service provider application. - * - * @param spApplication - * the service provider application - * - * @return the sP application - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static SPApplication generateSPApplication(final String spApplication) throws STORKSAMLEngineException { - LOG.debug("Generate SPApplication."); - - final SPApplication applicationAttr = (SPApplication) SAMLEngineUtils.createSamlObject(SPApplication.DEF_ELEMENT_NAME); - applicationAttr.setSPApplication(spApplication); - return applicationAttr; - } - - /** - * Generate service provider country. - * - * @param spCountry - * the service provider country - * - * @return the service provider country - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static SPCountry generateSPCountry(final String spCountry) throws STORKSAMLEngineException { - LOG.debug("Generate SPApplication."); - - final SPCountry countryAttribute = (SPCountry) SAMLEngineUtils.createSamlObject(SPCountry.DEF_ELEMENT_NAME); - countryAttribute.setSPCountry(spCountry); - return countryAttribute; - } - - /** - * Generate service provider institution. - * - * @param spInstitution - * the service provider institution - * - * @return the service provider institution - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static SPInstitution generateSPInstitution(final String spInstitution) throws STORKSAMLEngineException { - LOG.debug("Generate SPInstitution."); - - final SPInstitution institutionAttr = (SPInstitution) SAMLEngineUtils.createSamlObject(SPInstitution.DEF_ELEMENT_NAME); - institutionAttr.setSPInstitution(spInstitution); - return institutionAttr; - } - - /** - * Generate service provider sector. - * - * @param spSector - * the service provider sector - * - * @return the service provider sector - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static SPSector generateSPSector(final String spSector) throws STORKSAMLEngineException { - LOG.debug("Generate SPSector."); - - final SPSector sectorAttribute = (SPSector) SAMLEngineUtils.createSamlObject(SPSector.DEF_ELEMENT_NAME); - sectorAttribute.setSPSector(spSector); - return sectorAttribute; - } - - /** - * Generate status. - * - * @param statusCode - * the status code - * - * @return the status - */ - public static Status generateStatus(final StatusCode statusCode) { - final Status status = (Status) SAMLEngineUtils.createSamlObject(Status.DEFAULT_ELEMENT_NAME); - status.setStatusCode(statusCode); - return status; - } - - /** - * Generate status code. - * - * @param value - * the value - * - * @return the status code - */ - public static StatusCode generateStatusCode(final String value) { - final StatusCode statusCode = (StatusCode) SAMLEngineUtils.createSamlObject(StatusCode.DEFAULT_ELEMENT_NAME); - statusCode.setValue(value); - return statusCode; - } - - /** - * Generate status message. - * - * @param message - * the message - * - * @return the status message - */ - public static StatusMessage generateStatusMessage(final String message) { - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.createSamlObject(StatusMessage.DEFAULT_ELEMENT_NAME); - statusMessage.setMessage(message); - return statusMessage; - } - - /** - * Generate subject. - * - * @return the subject - */ - public static Subject generateSubject() { - return (Subject) SAMLEngineUtils.createSamlObject(Subject.DEFAULT_ELEMENT_NAME); - } - - /** - * Generate subject confirmation. - * - * @param method - * the method - * @param data - * the data - * - * @return the subject confirmation - */ - public static SubjectConfirmation generateSubjectConfirmation(final String method, final SubjectConfirmationData data) { - final SubjectConfirmation subjectConf = (SubjectConfirmation) Configuration.getBuilderFactory().getBuilder(SubjectConfirmation.DEFAULT_ELEMENT_NAME) - .buildObject(SubjectConfirmation.DEFAULT_ELEMENT_NAME); - - subjectConf.setMethod(method); - - subjectConf.setSubjectConfirmationData(data); - - return subjectConf; - } - - /** - * Generate subject confirmation data. - * - * @param notOnOrAfter - * the not on or after - * @param recipient - * the recipient - * @param inResponseTo - * the in response to - * - * @return the subject confirmation data - */ - public static SubjectConfirmationData generateSubjectConfirmationData(final DateTime notOnOrAfter, final String recipient, final String inResponseTo) { - final SubjectConfirmationData subjectConfData = (SubjectConfirmationData) SAMLEngineUtils.createSamlObject(SubjectConfirmationData.DEFAULT_ELEMENT_NAME); - subjectConfData.setNotOnOrAfter(notOnOrAfter); - subjectConfData.setRecipient(recipient); - subjectConfData.setInResponseTo(inResponseTo); - return subjectConfData; - } - - /** - * Generate subject locality. - * - * @param address - * the address - * - * @return the subject locality - */ - public static SubjectLocality generateSubjectLocality(final String address) { - final SubjectLocality subjectLocality = (SubjectLocality) SAMLEngineUtils.createSamlObject(SubjectLocality.DEFAULT_ELEMENT_NAME); - subjectLocality.setAddress(address); - return subjectLocality; - } - - /** - * Method that returns the current time. - * - * @return the current time - */ - public static DateTime getCurrentTime() { - return new DateTime(); - } - - /** - * Instantiates a new SAML engine utilities. - */ - private SAMLEngineUtils() { - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/STORKSAMLEngine.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/STORKSAMLEngine.java deleted file mode 100644 index 7bf5d5ca8..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/STORKSAMLEngine.java +++ /dev/null @@ -1,3339 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.cert.CertificateException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; - -import javax.xml.namespace.QName; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.apache.commons.lang.StringUtils; -import org.bouncycastle.jce.X509Principal; -import org.joda.time.DateTime; -import org.opensaml.Configuration; -import org.opensaml.common.SAMLVersion; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.common.Extensions; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.AttributeStatement; -import org.opensaml.saml2.core.AttributeValue; -import org.opensaml.saml2.core.Audience; -import org.opensaml.saml2.core.AudienceRestriction; -import org.opensaml.saml2.core.AuthnContext; -import org.opensaml.saml2.core.AuthnContextDecl; -import org.opensaml.saml2.core.AuthnRequest; -import org.opensaml.saml2.core.AuthnStatement; -import org.opensaml.saml2.core.Conditions; -import org.opensaml.saml2.core.Issuer; -import org.opensaml.saml2.core.LogoutRequest; -import org.opensaml.saml2.core.LogoutResponse; -import org.opensaml.saml2.core.NameID; -import org.opensaml.saml2.core.OneTimeUse; -import org.opensaml.saml2.core.Response; -import org.opensaml.saml2.core.Status; -import org.opensaml.saml2.core.StatusCode; -import org.opensaml.saml2.core.StatusMessage; -import org.opensaml.saml2.core.Subject; -import org.opensaml.saml2.core.SubjectConfirmation; -import org.opensaml.saml2.core.SubjectConfirmationData; -import org.opensaml.saml2.core.SubjectLocality; -import org.opensaml.saml2.core.impl.SubjectConfirmationBuilder; -import org.opensaml.xml.Namespace; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.schema.XSAny; -import org.opensaml.xml.schema.impl.XSAnyBuilder; -import org.opensaml.xml.schema.impl.XSAnyImpl; -import org.opensaml.xml.schema.impl.XSAnyMarshaller; -import org.opensaml.xml.schema.impl.XSAnyUnmarshaller; -import org.opensaml.xml.schema.impl.XSStringImpl; -import org.opensaml.xml.signature.KeyInfo; -import org.opensaml.xml.util.Base64; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; -import org.opensaml.xml.validation.ValidatorSuite; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKAttrQueryRequest; -import eu.stork.peps.auth.commons.STORKAttrQueryResponse; -import eu.stork.peps.auth.commons.STORKAuthnRequest; -import eu.stork.peps.auth.commons.STORKAuthnResponse; -import eu.stork.peps.auth.commons.STORKLogoutRequest; -import eu.stork.peps.auth.commons.STORKLogoutResponse; -import eu.stork.peps.auth.engine.core.AuthenticationAttributes; -import eu.stork.peps.auth.engine.core.CitizenCountryCode; -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; -import eu.stork.peps.auth.engine.core.CustomRequestAbstractType; -import eu.stork.peps.auth.engine.core.EIDCrossBorderShare; -import eu.stork.peps.auth.engine.core.EIDCrossSectorShare; -import eu.stork.peps.auth.engine.core.EIDSectorShare; -import eu.stork.peps.auth.engine.core.QAAAttribute; -import eu.stork.peps.auth.engine.core.RequestedAttribute; -import eu.stork.peps.auth.engine.core.RequestedAttributes; -import eu.stork.peps.auth.engine.core.SAMLCore; -import eu.stork.peps.auth.engine.core.SPApplication; -import eu.stork.peps.auth.engine.core.SPCountry; -import eu.stork.peps.auth.engine.core.SPID; -import eu.stork.peps.auth.engine.core.SPInformation; -import eu.stork.peps.auth.engine.core.SPInstitution; -import eu.stork.peps.auth.engine.core.SPSector; -import eu.stork.peps.auth.engine.core.VIDPAuthenticationAttributes; -import eu.stork.peps.auth.engine.core.impl.AuthenticationAttributesBuilder; -import eu.stork.peps.auth.engine.core.impl.AuthenticationAttributesMarshaller; -import eu.stork.peps.auth.engine.core.impl.AuthenticationAttributesUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.CitizenCountryCodeBuilder; -import eu.stork.peps.auth.engine.core.impl.CitizenCountryCodeMarshaller; -import eu.stork.peps.auth.engine.core.impl.CitizenCountryCodeUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.EIDCrossBorderShareBuilder; -import eu.stork.peps.auth.engine.core.impl.EIDCrossBorderShareMarshaller; -import eu.stork.peps.auth.engine.core.impl.EIDCrossBorderShareUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.EIDCrossSectorShareBuilder; -import eu.stork.peps.auth.engine.core.impl.EIDCrossSectorShareMarshaller; -import eu.stork.peps.auth.engine.core.impl.EIDCrossSectorShareUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.EIDSectorShareBuilder; -import eu.stork.peps.auth.engine.core.impl.EIDSectorShareMarshaller; -import eu.stork.peps.auth.engine.core.impl.EIDSectorShareUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.QAAAttributeBuilder; -import eu.stork.peps.auth.engine.core.impl.QAAAttributeMarshaller; -import eu.stork.peps.auth.engine.core.impl.QAAAttributeUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.RequestedAttributeBuilder; -import eu.stork.peps.auth.engine.core.impl.RequestedAttributeMarshaller; -import eu.stork.peps.auth.engine.core.impl.RequestedAttributeUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.RequestedAttributesBuilder; -import eu.stork.peps.auth.engine.core.impl.RequestedAttributesMarshaller; -import eu.stork.peps.auth.engine.core.impl.RequestedAttributesUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.SPApplicationBuilder; -import eu.stork.peps.auth.engine.core.impl.SPApplicationMarshaller; -import eu.stork.peps.auth.engine.core.impl.SPApplicationUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.SPCountryBuilder; -import eu.stork.peps.auth.engine.core.impl.SPCountryMarshaller; -import eu.stork.peps.auth.engine.core.impl.SPCountryUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.SPIDBuilder; -import eu.stork.peps.auth.engine.core.impl.SPIDMarshaller; -import eu.stork.peps.auth.engine.core.impl.SPIDUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.SPInformationBuilder; -import eu.stork.peps.auth.engine.core.impl.SPInformationMarshaller; -import eu.stork.peps.auth.engine.core.impl.SPInformationUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.SPInstitutionBuilder; -import eu.stork.peps.auth.engine.core.impl.SPInstitutionMarshaller; -import eu.stork.peps.auth.engine.core.impl.SPInstitutionUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.SPSectorBuilder; -import eu.stork.peps.auth.engine.core.impl.SPSectorMarshaller; -import eu.stork.peps.auth.engine.core.impl.SPSectorUnmarshaller; -import eu.stork.peps.auth.engine.core.impl.VIDPAuthenticationAttributesBuilder; -import eu.stork.peps.auth.engine.core.impl.VIDPAuthenticationAttributesMarshaller; -import eu.stork.peps.auth.engine.core.impl.VIDPAuthenticationAttributesUnmarshaller; -import eu.stork.peps.auth.engine.core.validator.CustomAttributeQueryValidator; -import eu.stork.peps.auth.engine.core.validator.ExtensionsSchemaValidator; -import eu.stork.peps.auth.engine.core.validator.MultipleAssertionResponseValidator; -import eu.stork.peps.auth.engine.core.validator.QAAAttributeSchemaValidator; -import eu.stork.peps.exceptions.SAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineRuntimeException; - -/** - * Class that wraps the operations over SAML tokens, both generation and validation of SAML STORK requests and SAML STORK responses. Complaint with - * "OASIS Secure Assertion Markup Language (SAML) 2.0, May 2005", but taking into account STORK specific requirements. - * - * @author fjquevedo - * @author iinigo - */ -public final class STORKSAMLEngine extends SAMLEngine { - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(STORKSAMLEngine.class.getName()); - - private static final String ATTRIBUTE_EMPTY_LITERAL = "Attribute name is null or empty."; - - /** - * Gets the single instance of STORKSAMLEngine. - * - * @param nameInstance - * the name instance - * - * @return single instance of STORKSAMLEngine - */ - public static synchronized STORKSAMLEngine getInstance(final String nameInstance) { - STORKSAMLEngine engine = null; - LOG.info("Get instance: " + nameInstance); - try { - engine = new STORKSAMLEngine(nameInstance.trim()); - } catch (Exception e) { - LOG.error("Error get instance: " + nameInstance); - } - return engine; - } - - /** - * Instantiate a new STORKSAML engine. - * - * @param nameInstance - * the name instance - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private STORKSAMLEngine(final String nameInstance) throws STORKSAMLEngineException { - // Initialization OpenSAML. - super(nameInstance); - LOG.info("Register STORK objects provider."); - Configuration.registerObjectProvider(QAAAttribute.DEF_ELEMENT_NAME, new QAAAttributeBuilder(), new QAAAttributeMarshaller(), new QAAAttributeUnmarshaller()); - - Configuration.registerObjectProvider(EIDSectorShare.DEF_ELEMENT_NAME, new EIDSectorShareBuilder(), new EIDSectorShareMarshaller(), new EIDSectorShareUnmarshaller()); - - Configuration.registerObjectProvider(EIDCrossSectorShare.DEF_ELEMENT_NAME, new EIDCrossSectorShareBuilder(), new EIDCrossSectorShareMarshaller(), new EIDCrossSectorShareUnmarshaller()); - - Configuration.registerObjectProvider(EIDCrossBorderShare.DEF_ELEMENT_NAME, new EIDCrossBorderShareBuilder(), new EIDCrossBorderShareMarshaller(), new EIDCrossBorderShareUnmarshaller()); - - Configuration.registerObjectProvider(SPSector.DEF_ELEMENT_NAME, new SPSectorBuilder(), new SPSectorMarshaller(), new SPSectorUnmarshaller()); - - Configuration.registerObjectProvider(SPInstitution.DEF_ELEMENT_NAME, new SPInstitutionBuilder(), new SPInstitutionMarshaller(), new SPInstitutionUnmarshaller()); - - Configuration.registerObjectProvider(SPApplication.DEF_ELEMENT_NAME, new SPApplicationBuilder(), new SPApplicationMarshaller(), new SPApplicationUnmarshaller()); - - Configuration.registerObjectProvider(SPCountry.DEF_ELEMENT_NAME, new SPCountryBuilder(), new SPCountryMarshaller(), new SPCountryUnmarshaller()); - - Configuration.registerObjectProvider(XSAny.TYPE_NAME, new XSAnyBuilder(), new XSAnyMarshaller(), new XSAnyUnmarshaller()); - - Configuration.registerObjectProvider(RequestedAttribute.DEF_ELEMENT_NAME, new RequestedAttributeBuilder(), new RequestedAttributeMarshaller(), new RequestedAttributeUnmarshaller()); - - Configuration.registerObjectProvider(RequestedAttributes.DEF_ELEMENT_NAME, new RequestedAttributesBuilder(), new RequestedAttributesMarshaller(), new RequestedAttributesUnmarshaller()); - - Configuration.registerObjectProvider(AuthenticationAttributes.DEF_ELEMENT_NAME, new AuthenticationAttributesBuilder(), new AuthenticationAttributesMarshaller(), - new AuthenticationAttributesUnmarshaller()); - - Configuration.registerObjectProvider(VIDPAuthenticationAttributes.DEF_ELEMENT_NAME, new VIDPAuthenticationAttributesBuilder(), new VIDPAuthenticationAttributesMarshaller(), - new VIDPAuthenticationAttributesUnmarshaller()); - - Configuration.registerObjectProvider(CitizenCountryCode.DEF_ELEMENT_NAME, new CitizenCountryCodeBuilder(), new CitizenCountryCodeMarshaller(), new CitizenCountryCodeUnmarshaller()); - - Configuration.registerObjectProvider(SPID.DEF_ELEMENT_NAME, new SPIDBuilder(), new SPIDMarshaller(), new SPIDUnmarshaller()); - - Configuration.registerObjectProvider(SPInformation.DEF_ELEMENT_NAME, new SPInformationBuilder(), new SPInformationMarshaller(), new SPInformationUnmarshaller()); - - LOG.info("Register STORK object validators."); - final ValidatorSuite validatorSuite = new ValidatorSuite(QAAAttribute.DEF_LOCAL_NAME); - - validatorSuite.registerValidator(QAAAttribute.DEF_ELEMENT_NAME, new QAAAttributeSchemaValidator()); - final Extensions extensions = SAMLEngineUtils.generateExtension(); - validatorSuite.registerValidator(extensions.getElementQName(), new ExtensionsSchemaValidator()); - - Configuration.registerValidatorSuite("stork:QualityAuthenticationAssuranceLevel", validatorSuite); - - } - - /** - * Generate authentication response base. - * - * @param status - * the status - * @param assertConsumerURL - * the assert consumer URL. - * @param inResponseTo - * the in response to - * - * @return the response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private Response genAuthnRespBase(final Status status, final String assertConsumerURL, final String inResponseTo) throws STORKSAMLEngineException { - LOG.debug("Generate Authentication Response base."); - final Response response = SAMLEngineUtils.generateResponse(SAMLVersion.VERSION_20, SAMLEngineUtils.generateNCName(), SAMLEngineUtils.getCurrentTime(), status); - - // Set name Spaces - this.setNameSpaces(response); - - // Mandatory STORK - LOG.debug("Generate Issuer"); - final Issuer issuer = SAMLEngineUtils.generateIssuer(); - issuer.setValue(super.getSamlCoreProperties().getResponder()); - - // Format Entity Optional STORK - issuer.setFormat(super.getSamlCoreProperties().getFormatEntity()); - - response.setIssuer(issuer); - - // destination Mandatory Stork - response.setDestination(assertConsumerURL.trim()); - - // inResponseTo Mandatory Stork - response.setInResponseTo(inResponseTo.trim()); - - // Optional STORK - response.setConsent(super.getSamlCoreProperties().getConsentAuthnResponse()); - - return response; - } - - /** - * Generate attribute query response base. - * - * @param status - * the status - * @param destinationURL - * the assert consumer URL. - * @param inResponseTo - * the in response to - * - * @return the response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private Response genAttrQueryRespBase(final Status status, final String destinationURL, final String inResponseTo) throws STORKSAMLEngineException { - LOG.debug("Generate Attribute query Response base."); - final Response response = SAMLEngineUtils.generateResponse(SAMLVersion.VERSION_20, SAMLEngineUtils.generateNCName(), SAMLEngineUtils.getCurrentTime(), status); - - // Set name Spaces - this.setNameSpaces(response); - - // Mandatory STORK - LOG.debug("Generate Issuer"); - final Issuer issuer = SAMLEngineUtils.generateIssuer(); - issuer.setValue(super.getSamlCoreProperties().getResponder()); - - // Format Entity Optional STORK - issuer.setFormat(super.getSamlCoreProperties().getFormatEntity()); - - response.setIssuer(issuer); - - // destination Mandatory Stork - response.setDestination(destinationURL.trim()); - - // inResponseTo Mandatory Stork - response.setInResponseTo(inResponseTo.trim()); - - // Optional STORK - response.setConsent(super.getSamlCoreProperties().getConsentAuthnResponse()); - - return response; - } - - /** - * Generate assertion. - * - * @param ipAddress - * the IP address. - * @param assertConsumerURL - * the assert consumer URL. - * @param inResponseTo - * the in response to - * @param issuer - * the issuer - * @param notOnOrAfter - * the not on or after - * - * @return the assertion - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private Assertion generateAssertion(final String ipAddress, final String assertConsumerURL, final String inResponseTo, final String issuer, final DateTime notOnOrAfter) - throws STORKSAMLEngineException { - LOG.info("Generate Assertion."); - - // Mandatory STORK - LOG.debug("Generate Issuer to Assertion"); - final Issuer issuerAssertion = SAMLEngineUtils.generateIssuer(); - issuerAssertion.setValue(super.getSamlCoreProperties().getResponder()); - - // Format Entity Optional STORK - issuerAssertion.setFormat(super.getSamlCoreProperties().getFormatEntity()); - - final Assertion assertion = SAMLEngineUtils.generateAssertion(SAMLVersion.VERSION_20, SAMLEngineUtils.generateNCName(), SAMLEngineUtils.getCurrentTime(), issuerAssertion); - - final Subject subject = SAMLEngineUtils.generateSubject(); - - final String format = super.getSamlCoreProperties().getFormat(); - - final String nameQualifier = ""; - LOG.debug("Generate NameID"); - final NameID nameId = SAMLEngineUtils.generateNameID(super.getSamlCoreProperties().getResponder(), format, nameQualifier); - nameId.setValue(format); - subject.setNameID(nameId); - - // Mandatory if urn:oasis:names:tc:SAML:2.0:cm:bearer. - // Optional in other case. - LOG.debug("Generate SubjectConfirmationData."); - final SubjectConfirmationData dataBearer = SAMLEngineUtils.generateSubjectConfirmationData(SAMLEngineUtils.getCurrentTime(), assertConsumerURL, inResponseTo); - - // Mandatory if urn:oasis:names:tc:SAML:2.0:cm:bearer. - // Optional in other case. - LOG.debug("Generate SubjectConfirmation"); - final SubjectConfirmation subjectConf = SAMLEngineUtils.generateSubjectConfirmation(SubjectConfirmation.METHOD_BEARER, dataBearer); - - final ArrayList listSubjectConf = new ArrayList(); - listSubjectConf.add(subjectConf); - - for (final Iterator iter = listSubjectConf.iterator(); iter.hasNext();) { - final SubjectConfirmation element = iter.next(); - - if (SubjectConfirmation.METHOD_BEARER.equals(element.getMethod())) { - // ipAddress Mandatory if method is Bearer. - - if (StringUtils.isBlank(ipAddress)) { - throw new STORKSAMLEngineException("ipAddress is null or empty"); - } - element.getSubjectConfirmationData().setAddress(ipAddress.trim()); - } - - element.getSubjectConfirmationData().setRecipient(assertConsumerURL); - element.getSubjectConfirmationData().setNotOnOrAfter(notOnOrAfter); - } - - // The SAML 2.0 specification allows multiple SubjectConfirmations - subject.getSubjectConfirmations().addAll(listSubjectConf); - - // Mandatory Stork - assertion.setSubject(subject); - - // Conditions that MUST be evaluated when assessing the validity of - // and/or when using the assertion. - final Conditions conditions = this.generateConditions(SAMLEngineUtils.getCurrentTime(), notOnOrAfter, issuer); - - assertion.setConditions(conditions); - - LOG.debug("Generate stork Authentication Statement."); - final AuthnStatement storkAuthnStat = this.generateStorkAuthStatement(ipAddress); - assertion.getAuthnStatements().add(storkAuthnStat); - - return assertion; - } - - private String getAttributeName(final PersonalAttribute attribute) throws STORKSAMLEngineException { - if (StringUtils.isBlank(attribute.getName())) { - LOG.error(ATTRIBUTE_EMPTY_LITERAL); - throw new STORKSAMLEngineException(ATTRIBUTE_EMPTY_LITERAL); - } - - final String attributeName = super.getSamlCoreProperties().getProperty(attribute.getName()); - - if (StringUtils.isBlank(attributeName)) { - LOG.error("Attribute name: {} it is not known.", attribute.getName()); - throw new STORKSAMLEngineException("Attribute name: " + attribute.getName() + " it is not known."); - } - return attributeName; - } - - /** - * Generate attribute statement. - * - * @param personalAttrList - * the personal attribute list - * @param isHashing - * the is hashing - * - * @return the attribute statement - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - * @throws IOException - */ - private AttributeStatement generateAttributeStatement(final IPersonalAttributeList personalAttrList, final boolean isHashing) throws STORKSAMLEngineException { - LOG.debug("Generate attribute statement"); - - final AttributeStatement attrStatement = (AttributeStatement) SAMLEngineUtils.createSamlObject(AttributeStatement.DEFAULT_ELEMENT_NAME); - - for (PersonalAttribute attribute : personalAttrList) { - - String attributeName = getAttributeName(attribute); - - // Verification that only one value it's permitted, simple or - // complex, not both. - - final boolean simpleNull = (attribute.getValue() == null); - final boolean simpleEmpty = (simpleNull || (!simpleNull && attribute.getValue().isEmpty())); - - final boolean complexNull = (attribute.getComplexValue() == null); - final boolean complexEmpty = (complexNull || (!complexNull && attribute.getComplexValue().isEmpty())); - - if ((!simpleEmpty && !complexEmpty)) { - throw new STORKSAMLEngineException("Attribute name: " + attribute.getName() + " must be contain one value, simple or complex value."); - } else { - - if (!simpleEmpty) { - attrStatement.getAttributes().add(this.generateAttrSimple(attributeName, attribute.getStatus(), attribute.getValue(), isHashing)); - } else if (!complexEmpty) { - attrStatement.getAttributes().add(SAMLEngineUtils.generateAttrComplex(attributeName, attribute.getStatus(), attribute.getComplexValue(), isHashing)); - } else if (!simpleNull) { - attrStatement.getAttributes().add(this.generateAttrSimple(attributeName, attribute.getStatus(), new ArrayList(), isHashing)); - } else { - // Add attribute complex. - attrStatement.getAttributes().add(SAMLEngineUtils.generateAttrComplex(attributeName, attribute.getStatus(), new HashMap(), isHashing)); - } - } - } - return attrStatement; - } - - private XSAny createAttributeValueForSignedDoc(final String value, final boolean isHashing) throws STORKSAMLEngineException { - DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance(); - domFactory.setNamespaceAware(true); - Document document = null; - DocumentBuilder builder; - - // Parse the signedDoc value into an XML DOM Document - try { - builder = domFactory.newDocumentBuilder(); - InputStream is; - is = new ByteArrayInputStream(value.trim().getBytes("UTF-8")); - document = builder.parse(is); - is.close(); - } catch (SAXException e1) { - LOG.error("SAX Error while parsing signModule attribute", e1); - throw new STORKSAMLEngineRuntimeException(e1); - } catch (ParserConfigurationException e2) { - LOG.error("Parser Configuration Error while parsing signModule attribute", e2); - throw new STORKSAMLEngineRuntimeException(e2); - } catch (UnsupportedEncodingException e3) { - LOG.error("Unsupported encoding Error while parsing signModule attribute", e3); - throw new STORKSAMLEngineRuntimeException(e3); - } catch (IOException e4) { - LOG.error("IO Error while parsing signModule attribute", e4); - throw new STORKSAMLEngineRuntimeException(e4); - } - - // Create the attribute statement - final XSAny xmlValue = (XSAny) SAMLEngineUtils.createSamlObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSAny.TYPE_NAME); - - // Set the signedDoc XML content to this element - xmlValue.setDOM(document.getDocumentElement()); - - // Create the attribute statement - final XSAny attrValue = (XSAny) SAMLEngineUtils.createSamlObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSAny.TYPE_NAME); - - // Add previous signedDocXML to the AttributeValue Element - - // if it's necessary encode the information. - if (!isHashing) { - attrValue.getUnknownXMLObjects().add(xmlValue); - } - return attrValue; - } - - private XSAny createAttributeValueForNonSignedDoc(final String value, final boolean isHashing) throws STORKSAMLEngineException { - // Create the attribute statement - final XSAny attrValue = (XSAny) SAMLEngineUtils.createSamlObject(AttributeValue.DEFAULT_ELEMENT_NAME, XSAny.TYPE_NAME); - // if it's necessary encode the information. - if (isHashing) { - attrValue.setTextContent(SAMLEngineUtils.encode(value, SAMLEngineUtils.SHA_512)); - } else { - attrValue.setTextContent(value); - } - return attrValue; - } - - /** - * Generate attribute from a list of values. - * - * @param name - * the name of the attribute. - * @param values - * the value of the attribute. - * @param isHashing - * the is hashing with "SHA-512" algorithm. - * @param status - * the status of the parameter: "Available", "NotAvailable" or "Withheld". - * - * @return the attribute - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private Attribute generateAttrSimple(final String name, final String status, final List values, final boolean isHashing) throws STORKSAMLEngineException { - LOG.debug("Generate attribute simple: " + name); - final Attribute attribute = (Attribute) SAMLEngineUtils.createSamlObject(Attribute.DEFAULT_ELEMENT_NAME); - - attribute.setName(name); - attribute.setNameFormat(Attribute.URI_REFERENCE); - - attribute.getUnknownAttributes().put(new QName(SAMLCore.STORK10_NS.getValue(), "AttributeStatus", SAMLCore.STORK10_PREFIX.getValue()), status); - - if (values != null) { - LOG.debug("Add attribute values."); - for (int i = 0; i < values.size(); i++) { - final String value = values.get(i); - if (StringUtils.isNotBlank(value)) { - XSAny attrValue = null; - if (!name.equals("http://www.stork.gov.eu/1.0/signedDoc")) { - // Create the attribute statement - attrValue = createAttributeValueForNonSignedDoc(value, isHashing); - - } else { - attrValue = createAttributeValueForSignedDoc(value, isHashing); - attribute.getAttributeValues().add(attrValue); - } - attribute.getAttributeValues().add(attrValue); - } - } - } - return attribute; - } - - /** - * Generate conditions that MUST be evaluated when assessing the validity of and/or when using the assertion. - * - * @param notBefore - * the not before - * @param notOnOrAfter - * the not on or after - * @param audienceURI - * the audience URI. - * - * @return the conditions - */ - private Conditions generateConditions(final DateTime notBefore, final DateTime notOnOrAfter, final String audienceURI) { - LOG.debug("Generate conditions."); - final Conditions conditions = (Conditions) SAMLEngineUtils.createSamlObject(Conditions.DEFAULT_ELEMENT_NAME); - conditions.setNotBefore(notBefore); - conditions.setNotOnOrAfter(notOnOrAfter); - - final AudienceRestriction restrictions = (AudienceRestriction) SAMLEngineUtils.createSamlObject(AudienceRestriction.DEFAULT_ELEMENT_NAME); - - final Audience audience = (Audience) SAMLEngineUtils.createSamlObject(Audience.DEFAULT_ELEMENT_NAME); - audience.setAudienceURI(audienceURI); - - restrictions.getAudiences().add(audience); - conditions.getAudienceRestrictions().add(restrictions); - - if (super.getSamlCoreProperties().isOneTimeUse()) { - final OneTimeUse oneTimeUse = (OneTimeUse) SAMLEngineUtils.createSamlObject(OneTimeUse.DEFAULT_ELEMENT_NAME); - conditions.getConditions().add(oneTimeUse); - } - return conditions; - } - - /** - * Generate personal attribute list. - * - * @param assertion - * the assertion - * - * @return the personal attribute list - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private IPersonalAttributeList generatePersonalAttributeList(final Assertion assertion) throws STORKSAMLEngineException { - LOG.debug("Generate personal attribute list from XMLObject."); - final List listExtensions = assertion.getOrderedChildren(); - - boolean find = false; - AttributeStatement requestedAttr = null; - - // Search the attribute statement. - for (int i = 0; i < listExtensions.size() && !find; i++) { - final XMLObject xml = listExtensions.get(i); - if (xml instanceof AttributeStatement) { - requestedAttr = (AttributeStatement) xml; - find = true; - } - } - - if (!find) { - LOG.error("Error: AttributeStatement it's not present."); - throw new STORKSAMLEngineException("AttributeStatement it's not present."); - } - - final List reqAttrs = requestedAttr.getAttributes(); - - final IPersonalAttributeList personalAttrList = new PersonalAttributeList(); - String attributeName; - - // Process the attributes. - for (int nextAttribute = 0; nextAttribute < reqAttrs.size(); nextAttribute++) { - final Attribute attribute = reqAttrs.get(nextAttribute); - - final PersonalAttribute personalAttribute = new PersonalAttribute(); - - attributeName = attribute.getName(); - personalAttribute.setName(attributeName.substring(attributeName.lastIndexOf('/') + 1)); - - personalAttribute.setStatus(attribute.getUnknownAttributes().get(new QName(SAMLCore.STORK10_NS.getValue(), "AttributeStatus", SAMLCore.STORK10_PREFIX.getValue()))); - - final ArrayList simpleValues = new ArrayList(); - final HashMap multiValues = new HashMap(); - - final List values = attribute.getOrderedChildren(); - - // Process the values. - for (int nextValue = 0; nextValue < values.size(); nextValue++) { - - final XMLObject xmlObject = values.get(nextValue); - - if (xmlObject instanceof XSStringImpl) { - - simpleValues.add(((XSStringImpl) xmlObject).getValue()); - - } else if (xmlObject instanceof XSAnyImpl) { - - if (attributeName.equals("http://www.stork.gov.eu/1.0/signedDoc")) { - - final XSAnyImpl xmlString = (XSAnyImpl) values.get(nextValue); - - TransformerFactory transFactory = TransformerFactory.newInstance(); - Transformer transformer = null; - try { - transformer = transFactory.newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - } catch (TransformerConfigurationException e) { - LOG.error("Error transformer configuration exception", e); - } - StringWriter buffer = new StringWriter(); - try { - if (xmlString != null && xmlString.getUnknownXMLObjects() != null && xmlString.getUnknownXMLObjects().size() > 0) { - transformer.transform(new DOMSource(xmlString.getUnknownXMLObjects().get(0).getDOM()), new StreamResult(buffer)); - } - } catch (TransformerException e) { - LOG.error("Error transformer exception", e); - } - String str = buffer.toString(); - - simpleValues.add(str); - - } else if (isComplex(xmlObject)) { - LOG.info(attributeName + " found"); - // Process complex value. - final XSAnyImpl complexValue = (XSAnyImpl) xmlObject; - - for (int nextComplexValue = 0; nextComplexValue < complexValue.getUnknownXMLObjects().size(); nextComplexValue++) { - - final XSAnyImpl simple = (XSAnyImpl) complexValue.getUnknownXMLObjects().get(nextComplexValue); - - multiValues.put(simple.getElementQName().getLocalPart(), simple.getTextContent()); - } - - } else { - // Process simple value. - simpleValues.add(((XSAnyImpl) xmlObject).getTextContent()); - } - - } else { - LOG.error("Error: attribute value it's unknown."); - throw new STORKSAMLEngineException("Attribute value it's unknown."); - } - } - - personalAttribute.setValue(simpleValues); - personalAttribute.setComplexValue(multiValues); - personalAttrList.add(personalAttribute); - } - - return personalAttrList; - } - - /** - * Generate stork authentication request. - * - * @param request - * the request that contain all parameters for generate an authentication request. - * - * @return the STORK authentication request that has been processed. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAuthnRequest generateSTORKAuthnRequest(final STORKAuthnRequest request) throws STORKSAMLEngineException { - LOG.info("Generate SAMLAuthnRequest."); - - // Validate Parameters mandatories - validateParamAuthnReq(request); - - final AuthnRequest authnRequestAux = SAMLEngineUtils.generateSAMLAuthnRequest(SAMLEngineUtils.generateNCName(), SAMLVersion.VERSION_20, SAMLEngineUtils.getCurrentTime()); - - // Set name spaces. - setNameSpaces(authnRequestAux); - - // Add parameter Mandatory STORK - authnRequestAux.setForceAuthn(Boolean.TRUE); - - // Add parameter Mandatory STORK - authnRequestAux.setIsPassive(Boolean.FALSE); - - authnRequestAux.setAssertionConsumerServiceURL(request.getAssertionConsumerServiceURL()); - - authnRequestAux.setProviderName(request.getProviderName()); - - // Add protocol binding - authnRequestAux.setProtocolBinding(super.getSamlCoreProperties().getProtocolBinding()); - - // Add parameter optional STORK - // Destination is mandatory if the destination is a C-PEPS - // The application must to know if the destination is a C-PEPS. - if (StringUtils.isNotBlank(request.getDestination())) { - authnRequestAux.setDestination(request.getDestination()); - } - - // Consent is optional. Set from SAMLEngine.xml - consent. - authnRequestAux.setConsent(super.getSamlCoreProperties().getConsentAuthnRequest()); - - final Issuer issuer = SAMLEngineUtils.generateIssuer(); - - if (request.getIssuer() != null) { - issuer.setValue(request.getIssuer()); - } else { - issuer.setValue(super.getSamlCoreProperties().getRequester()); - } - - // Optional STORK - final String formatEntity = super.getSamlCoreProperties().getFormatEntity(); - if (StringUtils.isNotBlank(formatEntity)) { - issuer.setFormat(formatEntity); - } - - authnRequestAux.setIssuer(issuer); - - // Generate stork extensions. - final Extensions storkExtensions = this.generateSTORKExtensions(request); - // add the extensions to the SAMLAuthnRequest - authnRequestAux.setExtensions(storkExtensions); - - // the result contains an authentication request token (byte[]), - // identifier of the token, and all parameters from the request. - final STORKAuthnRequest authRequest = processExtensions(authnRequestAux.getExtensions()); - - try { - authRequest.setTokenSaml(super.signAndMarshall(authnRequestAux)); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - - authRequest.setSamlId(authnRequestAux.getID()); - authRequest.setDestination(authnRequestAux.getDestination()); - authRequest.setAssertionConsumerServiceURL(authnRequestAux.getAssertionConsumerServiceURL()); - - authRequest.setProviderName(authnRequestAux.getProviderName()); - authRequest.setIssuer(authnRequestAux.getIssuer().getValue()); - - return authRequest; - } - - /** - * Generate stork authentication response. - * - * @param request - * the request - * @param responseAuthReq - * the response authentication request - * @param ipAddress - * the IP address - * @param isHashing - * the is hashing - * - * @return the sTORK authentication response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAuthnResponse generateSTORKAuthnResponse(final STORKAuthnRequest request, final STORKAuthnResponse responseAuthReq, final String ipAddress, final boolean isHashing) - throws STORKSAMLEngineException { - LOG.info("generateSTORKAuthnResponse"); - - // Validate parameters - validateParamResponse(request, responseAuthReq); - - // Mandatory SAML - LOG.debug("Generate StatusCode"); - final StatusCode statusCode = SAMLEngineUtils.generateStatusCode(StatusCode.SUCCESS_URI); - - LOG.debug("Generate Status"); - final Status status = SAMLEngineUtils.generateStatus(statusCode); - - LOG.debug("Generate StatusMessage"); - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.generateStatusMessage(StatusCode.SUCCESS_URI); - - status.setStatusMessage(statusMessage); - - LOG.debug("Generate Response"); - - // RESPONSE - final Response response = genAuthnRespBase(status, request.getAssertionConsumerServiceURL(), request.getSamlId()); - - DateTime notOnOrAfter = new DateTime(); - - notOnOrAfter = notOnOrAfter.plusSeconds(super.getSamlCoreProperties().getTimeNotOnOrAfter()); - - final Assertion assertion = this.generateAssertion(ipAddress, request.getAssertionConsumerServiceURL(), request.getSamlId(), request.getIssuer(), notOnOrAfter); - - final AttributeStatement attrStatement = this.generateAttributeStatement(responseAuthReq.getPersonalAttributeList(), isHashing); - - assertion.getAttributeStatements().add(attrStatement); - - // Add assertions - response.getAssertions().add(assertion); - - final STORKAuthnResponse authresponse = new STORKAuthnResponse(); - - try { - authresponse.setTokenSaml(super.signAndMarshall(response)); - authresponse.setSamlId(response.getID()); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - return authresponse; - } - - /** - * Generate stork authentication response. - * - * @param request - * the request - * @param responseAuthReq - * the response authentication request - * @param ipAddress - * the IP address - * @param isHashing - * the is hashing - * - * @return the sTORK authentication response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAuthnResponse generateSTORKAuthnResponseAfterQuery(final STORKAuthnRequest request, final STORKAuthnResponse responseAuthReq, final String ipAddress, final boolean isHashing, - List res) throws STORKSAMLEngineException { - LOG.info("generateSTORKAuthnResponse"); - - // Validate parameters - validateParamResponse(request, responseAuthReq); - - // Mandatory SAML - LOG.debug("Generate StatusCode"); - final StatusCode statusCode = SAMLEngineUtils.generateStatusCode(StatusCode.SUCCESS_URI); - - LOG.debug("Generate Status"); - final Status status = SAMLEngineUtils.generateStatus(statusCode); - - LOG.debug("Generate StatusMessage"); - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.generateStatusMessage(StatusCode.SUCCESS_URI); - - status.setStatusMessage(statusMessage); - - LOG.debug("Generate Response"); - - // RESPONSE - final Response response = genAuthnRespBase(status, request.getAssertionConsumerServiceURL(), request.getSamlId()); - - DateTime notOnOrAfter = new DateTime(); - - notOnOrAfter = notOnOrAfter.plusSeconds(super.getSamlCoreProperties().getTimeNotOnOrAfter()); - - final Assertion assertion = this.generateAssertion(ipAddress, request.getAssertionConsumerServiceURL(), request.getSamlId(), request.getIssuer(), notOnOrAfter); - - final AttributeStatement attrStatement = this.generateAttributeStatement(responseAuthReq.getPersonalAttributeList(), isHashing); - - assertion.getAttributeStatements().add(attrStatement); - - // Add assertions - response.getAssertions().add(assertion); - // Check for response queries - if (res != null && res.size() > 0) { - // Iterate through them - for (int i = 0; i < res.size(); i++) { - // If response contains multiple assertions iterate through them as well - if (res.get(i).getAssertions().size() > 1) { - for (int j = 0; j < res.get(i).getAssertions().size(); j++) { - Assertion tempAssertion = res.get(i).getAssertions().get(j); - tempAssertion.setParent(response); - response.getAssertions().add(tempAssertion); - } - } else { - Assertion tempAssertion = res.get(i).getAssertion(); - tempAssertion.setParent(response); - response.getAssertions().add(tempAssertion); - } - } - } - - final STORKAuthnResponse authresponse = new STORKAuthnResponse(); - - try { - authresponse.setTokenSaml(super.signAndMarshall(response)); - authresponse.setSamlId(response.getID()); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - return authresponse; - } - - /** - * Generate stork authentication response fail. - * - * @param request - * the request - * @param response - * the response - * @param ipAddress - * the IP address - * @param isHashing - * the is hashing - * - * @return the sTORK authentication response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAuthnResponse generateSTORKAuthnResponseFail(final STORKAuthnRequest request, final STORKAuthnResponse response, final String ipAddress, final boolean isHashing) - throws STORKSAMLEngineException { - LOG.info("generateSTORKAuthnResponseFail"); - - validateParamResponseFail(request, response); - - // Mandatory - final StatusCode statusCode = SAMLEngineUtils.generateStatusCode(response.getStatusCode()); - - // Mandatory SAML - LOG.debug("Generate StatusCode."); - // Subordinate code it's optional in case not covered into next codes: - // - urn:oasis:names:tc:SAML:2.0:status:AuthnFailed - // - urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue - // - urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy - // - urn:oasis:names:tc:SAML:2.0:status:RequestDenied - // - http://www.stork.gov.eu/saml20/statusCodes/QAANotSupported - - if (StringUtils.isNotBlank(response.getSubStatusCode())) { - final StatusCode newStatusCode = SAMLEngineUtils.generateStatusCode(response.getSubStatusCode()); - statusCode.setStatusCode(newStatusCode); - } - - LOG.debug("Generate Status."); - final Status status = SAMLEngineUtils.generateStatus(statusCode); - - if (StringUtils.isNotBlank(response.getMessage())) { - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.generateStatusMessage(response.getMessage()); - - status.setStatusMessage(statusMessage); - } - - LOG.debug("Generate Response."); - // RESPONSE - final Response responseFail = genAuthnRespBase(status, request.getAssertionConsumerServiceURL(), request.getSamlId()); - - DateTime notOnOrAfter = new DateTime(); - - notOnOrAfter = notOnOrAfter.plusSeconds(super.getSamlCoreProperties().getTimeNotOnOrAfter()); - - final Assertion assertion = this.generateAssertion(ipAddress, request.getAssertionConsumerServiceURL(), request.getSamlId(), request.getIssuer(), notOnOrAfter); - - responseFail.getAssertions().add(assertion); - - LOG.debug("Sign and Marshall ResponseFail."); - - final STORKAuthnResponse storkResponse = new STORKAuthnResponse(); - - try { - storkResponse.setTokenSaml(super.signAndMarshall(responseFail)); - storkResponse.setSamlId(responseFail.getID()); - } catch (SAMLEngineException e) { - LOG.error("SAMLEngineException.", e); - throw new STORKSAMLEngineException(e); - } - return storkResponse; - } - - /** - * Generate stork attribute query request. - * - * @param request - * the request that contain all parameters for generate an attribute query request. - * - * @return the STORK attribute query request that has been processed. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAttrQueryRequest generateSTORKAttrQueryRequest(final STORKAttrQueryRequest request) throws STORKSAMLEngineException { - LOG.info("Generate STORKAttrQueryRequest."); - - // Validate Parameters mandatories - validateParamAttrQueryReq(request); - - final CustomAttributeQuery attrQueryRequestAux = SAMLEngineUtils.generateSAMLAttrQueryRequest(SAMLEngineUtils.generateNCName(), SAMLVersion.VERSION_20, SAMLEngineUtils.getCurrentTime()); - - // Set name spaces. - setNameSpaces(attrQueryRequestAux); - - // Add parameter optional STORK - // Destination is mandatory if the destination is a C-PEPS - // The application must to know if the destination is a C-PEPS. - if (StringUtils.isNotBlank(request.getDestination())) { - attrQueryRequestAux.setDestination(request.getDestination()); - } - - // Add parameter optional STORK - // Consumer URL is needed if using HTTP-Post - if (StringUtils.isNotBlank(request.getAssertionConsumerServiceURL())) { - attrQueryRequestAux.setAssertionConsumerServiceURL(request.getAssertionConsumerServiceURL()); - } - - // Consent is optional. Set from SAMLEngine.xml - consent. - attrQueryRequestAux.setConsent(super.getSamlCoreProperties().getConsentAuthnRequest()); - - final Issuer issuer = SAMLEngineUtils.generateIssuer(); - - // Set the subject - needed for attribute query validation - Subject subject = SAMLEngineUtils.generateSubject(); - SubjectConfirmationBuilder builder = new SubjectConfirmationBuilder(); - SubjectConfirmation subjectConfirmation = builder.buildObject(); - subjectConfirmation.setMethod("urn:oasis:names:tc:SAML:2.0:cm:bearer"); - subject.getSubjectConfirmations().add(subjectConfirmation); - attrQueryRequestAux.setSubject(subject); - - if (request.getIssuer() != null) { - issuer.setValue(request.getIssuer()); - } else { - issuer.setValue(super.getSamlCoreProperties().getRequester()); - } - - // Optional STORK - final String formatEntity = super.getSamlCoreProperties().getFormatEntity(); - if (StringUtils.isNotBlank(formatEntity)) { - issuer.setFormat(formatEntity); - } - - attrQueryRequestAux.setIssuer(issuer); - - // Generate stork extensions. - final Extensions storkExtensions = this.generateSTORKAttrExtensions(request); - // add the extensions to the SAMLAuthnRequest - attrQueryRequestAux.setExtensions(storkExtensions); - - // the result contains an authentication request token (byte[]), - // identifier of the token, and all parameters from the request. - final STORKAttrQueryRequest attrQueryRequest = processAttrExtensions(attrQueryRequestAux.getExtensions()); - - try { - attrQueryRequest.setTokenSaml(super.signAndMarshall(attrQueryRequestAux)); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - - attrQueryRequest.setSamlId(attrQueryRequestAux.getID()); - attrQueryRequest.setDestination(attrQueryRequestAux.getDestination()); - attrQueryRequest.setAssertionConsumerServiceURL(attrQueryRequestAux.getAssertionConsumerServiceURL()); - attrQueryRequest.setIssuer(attrQueryRequestAux.getIssuer().getValue()); - - return attrQueryRequest; - } - - /** - * Generate stork attribute query response. - * - * @param request - * the request - * @param responseAttrQueryRes - * the response authentication request - * @param ipAddress - * the IP address - * @param isHashing - * the hashing of values - * - * @return the sTORK authentication response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAttrQueryResponse generateSTORKAttrQueryResponse(final STORKAttrQueryRequest request, final STORKAttrQueryResponse responseAttrQueryRes, final String ipAddress, - final String destinationUrl, final boolean isHashing) throws STORKSAMLEngineException { - LOG.info("generateSTORKAttrQueryResponse"); - - // Validate parameters - validateParamAttrQueryResponse(request, responseAttrQueryRes); - - // Mandatory SAML - LOG.debug("Generate StatusCode"); - final StatusCode statusCode = SAMLEngineUtils.generateStatusCode(StatusCode.SUCCESS_URI); - - LOG.debug("Generate Status"); - final Status status = SAMLEngineUtils.generateStatus(statusCode); - - LOG.debug("Generate StatusMessage"); - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.generateStatusMessage(StatusCode.SUCCESS_URI); - - status.setStatusMessage(statusMessage); - - LOG.debug("Generate Response"); - - // RESPONSE - final Response response = genAuthnRespBase(status, destinationUrl, request.getSamlId()); - - DateTime notOnOrAfter = new DateTime(); - - notOnOrAfter = notOnOrAfter.plusSeconds(super.getSamlCoreProperties().getTimeNotOnOrAfter()); - - final Assertion assertion = this.generateAssertion(ipAddress, "", request.getSamlId(), request.getIssuer(), notOnOrAfter); - - final AttributeStatement attrStatement = this.generateAttributeStatement(responseAttrQueryRes.getPersonalAttributeList(), isHashing); - - assertion.getAttributeStatements().add(attrStatement); - - // Add assertions - response.getAssertions().add(assertion); - - final STORKAttrQueryResponse attrQueryResponse = new STORKAttrQueryResponse(); - - try { - attrQueryResponse.setTokenSaml(super.signAndMarshall(response)); - attrQueryResponse.setSamlId(response.getID()); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - return attrQueryResponse; - } - - /** - * Generate stork attribute query response from multiple assertions - * - * @param request - * the request - * @param responseAttrQueryRes - * the response to the query request - * @param responses - * the responses to include in the response (aggregation) - * @param ipAddress - * the IP address - * @param isHashing - * the hashing of values - * - * @return the sTORK attribute query response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAttrQueryResponse generateSTORKAttrQueryResponseWithAssertions(final STORKAttrQueryRequest request, final STORKAttrQueryResponse responseAttrQueryRes, - final List responses, final String ipAddress, final String destinationUrl, final boolean isHashing) throws STORKSAMLEngineException { - LOG.info("generateSTORKAttrQueryResponse"); - - // Validate parameters - validateParamAttrQueryResponseFromAssertions(request, responseAttrQueryRes); - - // Mandatory SAML - LOG.debug("Generate StatusCode"); - final StatusCode statusCode = SAMLEngineUtils.generateStatusCode(StatusCode.SUCCESS_URI); - - LOG.debug("Generate Status"); - final Status status = SAMLEngineUtils.generateStatus(statusCode); - - LOG.debug("Generate StatusMessage"); - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.generateStatusMessage(StatusCode.SUCCESS_URI); - - status.setStatusMessage(statusMessage); - - LOG.debug("Generate Response"); - - // RESPONSE - final Response response = genAuthnRespBase(status, destinationUrl, request.getSamlId()); - - DateTime notOnOrAfter = new DateTime(); - - notOnOrAfter = notOnOrAfter.plusSeconds(super.getSamlCoreProperties().getTimeNotOnOrAfter()); - - final Assertion assertion = this.generateAssertion(ipAddress, "", request.getSamlId(), request.getIssuer(), notOnOrAfter); - - final AttributeStatement attrStatement = this.generateAttributeStatement(responseAttrQueryRes.getPersonalAttributeList(), isHashing); - - assertion.getAttributeStatements().add(attrStatement); - - // Add the assertions from the former Query responses - response.getAssertions().add(assertion); - if (responses != null && responses.size() > 0) { - for (int i = 0; i < responses.size(); i++) { - Assertion tempAssertion = responses.get(i).getAssertion(); - tempAssertion.setParent(response); - response.getAssertions().add(tempAssertion); - } - } - - final STORKAttrQueryResponse attrQueryResponse = new STORKAttrQueryResponse(); - - try { - attrQueryResponse.setTokenSaml(super.signAndMarshall(response)); - attrQueryResponse.setSamlId(response.getID()); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - return attrQueryResponse; - } - - /** - * Generate stork attribute query response fail. - * - * @param request - * the request - * @param response - * the response - * @param ipAddress - * the IP address - * @param isHashing - * the is hashing - * - * @return the STORK attribute query response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAttrQueryResponse generateSTORKAttrQueryResponseFail(final STORKAttrQueryRequest request, final STORKAttrQueryResponse response, final String ipAddress, final String destinationUrl, - final boolean isHashing) throws STORKSAMLEngineException { - LOG.info("generateSTORKAttrQueryResponseFail"); - - validateParamAttrQueryResponseFail(request, response); - - // Mandatory - final StatusCode statusCode = SAMLEngineUtils.generateStatusCode(response.getStatusCode()); - - // Mandatory SAML - LOG.debug("Generate StatusCode."); - // Subordinate code it's optional in case not covered into next codes: - // - urn:oasis:names:tc:SAML:2.0:status:AuthnFailed - // - urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue - // - urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy - // - urn:oasis:names:tc:SAML:2.0:status:RequestDenied - // - http://www.stork.gov.eu/saml20/statusCodes/QAANotSupported - - if (StringUtils.isNotBlank(response.getSubStatusCode())) { - final StatusCode newStatusCode = SAMLEngineUtils.generateStatusCode(response.getSubStatusCode()); - statusCode.setStatusCode(newStatusCode); - } - - LOG.debug("Generate Status."); - final Status status = SAMLEngineUtils.generateStatus(statusCode); - - if (StringUtils.isNotBlank(response.getMessage())) { - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.generateStatusMessage(response.getMessage()); - - status.setStatusMessage(statusMessage); - } - - LOG.debug("Generate Response."); - // RESPONSE - final Response responseFail = genAuthnRespBase(status, destinationUrl, request.getSamlId()); - - DateTime notOnOrAfter = new DateTime(); - - notOnOrAfter = notOnOrAfter.plusSeconds(super.getSamlCoreProperties().getTimeNotOnOrAfter()); - - final Assertion assertion = this.generateAssertion(ipAddress, "", request.getSamlId(), request.getIssuer(), notOnOrAfter); - - responseFail.getAssertions().add(assertion); - - LOG.debug("Sign and Marshall ResponseFail."); - - final STORKAttrQueryResponse storkResponse = new STORKAttrQueryResponse(); - - try { - storkResponse.setTokenSaml(super.signAndMarshall(responseFail)); - storkResponse.setSamlId(responseFail.getID()); - } catch (SAMLEngineException e) { - LOG.error("SAMLEngineException.", e); - throw new STORKSAMLEngineException(e); - } - return storkResponse; - } - - /** - * Generate stork logout request. - * - * @param request - * the request that contain all parameters for generate an logout request. - * - * @return the STORK logout request that has been processed. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKLogoutRequest generateSTORKLogoutRequest(final STORKLogoutRequest request) throws STORKSAMLEngineException { - LOG.info("Generate STORKLogoutRequest."); - - // Validate Parameters mandatories - validateParamLogoutReq(request); - - final LogoutRequest logoutRequestAux = SAMLEngineUtils.generateSAMLLogoutRequest(SAMLEngineUtils.generateNCName(), SAMLVersion.VERSION_20, SAMLEngineUtils.getCurrentTime()); - - // Set name spaces. - setNameSpaces(logoutRequestAux); - - // Add parameter optional STORK - // Destination is mandatory if the destination is a C-PEPS - // The application must to know if the destination is a C-PEPS. - if (StringUtils.isNotBlank(request.getDestination())) { - logoutRequestAux.setDestination(request.getDestination()); - } - - // Consent is optional. Set from SAMLEngine.xml - consent. - logoutRequestAux.setConsent(super.getSamlCoreProperties().getConsentAuthnRequest()); - - final Issuer issuer = SAMLEngineUtils.generateIssuer(); - - if (request.getIssuer() != null) { - issuer.setValue(request.getIssuer()); - } else { - issuer.setValue(super.getSamlCoreProperties().getRequester()); - } - - // Optional STORK - final String formatEntity = super.getSamlCoreProperties().getFormatEntity(); - if (StringUtils.isNotBlank(formatEntity)) { - issuer.setFormat(formatEntity); - } - - logoutRequestAux.setIssuer(issuer); - - // Set the name ID - final NameID newNameID = SAMLEngineUtils.generateNameID(); - newNameID.setValue(request.getSpProvidedId()); - logoutRequestAux.setNameID(newNameID); - - // the result contains an authentication request token (byte[]), - // identifier of the token, and all parameters from the request. - final STORKLogoutRequest logoutRequest = new STORKLogoutRequest(); - - try { - logoutRequest.setTokenSaml(super.signAndMarshall(logoutRequestAux)); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - - logoutRequest.setSamlId(logoutRequestAux.getID()); - logoutRequest.setDestination(logoutRequestAux.getDestination()); - logoutRequest.setIssuer(logoutRequestAux.getIssuer().getValue()); - logoutRequest.setSpProvidedId(logoutRequestAux.getNameID().getValue()); - - return logoutRequest; - } - - /** - * Generate stork logout response. - * - * @param request - * the request thats being responded to - * @param response - * the tesponse that contain all parameters for generate an logout request. - * - * @return the STORK logout response that has been processed. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKLogoutResponse generateSTORKLogoutResponse(final STORKLogoutRequest request, final STORKLogoutResponse response) throws STORKSAMLEngineException { - LOG.info("Generate STORKLogoutResponse."); - - // Validate Parameters mandatories - validateParamLogoutRes(request, response); - - // Mandatory SAML - LOG.debug("Generate StatusCode"); - final StatusCode statusCode = SAMLEngineUtils.generateStatusCode(StatusCode.SUCCESS_URI); - - LOG.debug("Generate Status"); - final Status status = SAMLEngineUtils.generateStatus(statusCode); - - LOG.debug("Generate StatusMessage"); - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.generateStatusMessage(StatusCode.SUCCESS_URI); - - status.setStatusMessage(statusMessage); - - final LogoutResponse logoutResponseAux = SAMLEngineUtils.generateSAMLLogoutResponse(SAMLEngineUtils.generateNCName(), SAMLVersion.VERSION_20, SAMLEngineUtils.getCurrentTime(), status, - request.getSamlId()); - - // Set name spaces. - setNameSpaces(logoutResponseAux); - - // Add parameter optional STORK - // Destination is mandatory if the destination is a C-PEPS - // The application must to know if the destination is a C-PEPS. - if (StringUtils.isNotBlank(response.getDestination())) { - logoutResponseAux.setDestination(response.getDestination()); - } - - // Consent is optional. Set from SAMLEngine.xml - consent. - logoutResponseAux.setConsent(super.getSamlCoreProperties().getConsentAuthnRequest()); - - final Issuer issuer = SAMLEngineUtils.generateIssuer(); - - if (response.getIssuer() != null) { - issuer.setValue(response.getIssuer()); - } else { - issuer.setValue(super.getSamlCoreProperties().getRequester()); - } - - // Optional STORK - final String formatEntity = super.getSamlCoreProperties().getFormatEntity(); - if (StringUtils.isNotBlank(formatEntity)) { - issuer.setFormat(formatEntity); - } - - logoutResponseAux.setIssuer(issuer); - - // the result contains an authentication request token (byte[]), - // identifier of the token, and all parameters from the request. - final STORKLogoutResponse logoutResponse = new STORKLogoutResponse(); - - try { - logoutResponse.setTokenSaml(super.signAndMarshall(logoutResponseAux)); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - - logoutResponse.setSamlId(logoutResponseAux.getID()); - logoutResponse.setDestination(logoutResponseAux.getDestination()); - logoutResponse.setIssuer(logoutResponseAux.getIssuer().getValue()); - logoutResponse.setStatusCode(logoutResponseAux.getStatus().getStatusCode().toString()); - logoutResponse.setStatusMessage(logoutResponseAux.getStatus().getStatusMessage().toString()); - - return logoutResponse; - } - - /** - * Generate failed stork logout response. - * - * @param response - * the response that contain all parameters for generate an logout request. - * - * @return the STORK logout response that has been processed. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKLogoutResponse generateSTORKLogoutResponseFail(final STORKLogoutRequest request, final STORKLogoutResponse response) throws STORKSAMLEngineException { - LOG.info("Generate STORKLogoutResponse."); - - // Validate Parameters mandatories - validateParamLogoutResFail(request, response); - - // Mandatory - final StatusCode statusCode = SAMLEngineUtils.generateStatusCode(response.getStatusCode()); - - // Mandatory SAML - LOG.debug("Generate StatusCode."); - // Subordinate code it's optional in case not covered into next codes: - // - urn:oasis:names:tc:SAML:2.0:status:AuthnFailed - // - urn:oasis:names:tc:SAML:2.0:status:InvalidAttrNameOrValue - // - urn:oasis:names:tc:SAML:2.0:status:InvalidNameIDPolicy - // - urn:oasis:names:tc:SAML:2.0:status:RequestDenied - // - http://www.stork.gov.eu/saml20/statusCodes/QAANotSupported - - if (StringUtils.isNotBlank(response.getSubStatusCode())) { - final StatusCode newStatusCode = SAMLEngineUtils.generateStatusCode(response.getSubStatusCode()); - statusCode.setStatusCode(newStatusCode); - } - - LOG.debug("Generate Status."); - final Status status = SAMLEngineUtils.generateStatus(statusCode); - - if (StringUtils.isNotBlank(response.getStatusMessage())) { - final StatusMessage statusMessage = (StatusMessage) SAMLEngineUtils.generateStatusMessage(response.getStatusMessage()); - - status.setStatusMessage(statusMessage); - } - - final LogoutResponse logoutResponseAux = SAMLEngineUtils.generateSAMLLogoutResponse(SAMLEngineUtils.generateNCName(), SAMLVersion.VERSION_20, SAMLEngineUtils.getCurrentTime(), status, - request.getSamlId()); - - // Set name spaces. - setNameSpaces(logoutResponseAux); - - // Add parameter optional STORK - // Destination is mandatory if the destination is a C-PEPS - // The application must to know if the destination is a C-PEPS. - if (StringUtils.isNotBlank(response.getDestination())) { - logoutResponseAux.setDestination(response.getDestination()); - } - - // Consent is optional. Set from SAMLEngine.xml - consent. - logoutResponseAux.setConsent(super.getSamlCoreProperties().getConsentAuthnRequest()); - - final Issuer issuer = SAMLEngineUtils.generateIssuer(); - - if (response.getIssuer() != null) { - issuer.setValue(response.getIssuer()); - } else { - issuer.setValue(super.getSamlCoreProperties().getRequester()); - } - - // Optional STORK - final String formatEntity = super.getSamlCoreProperties().getFormatEntity(); - if (StringUtils.isNotBlank(formatEntity)) { - issuer.setFormat(formatEntity); - } - - logoutResponseAux.setIssuer(issuer); - - // the result contains an authentication request token (byte[]), - // identifier of the token, and all parameters from the request. - final STORKLogoutResponse logoutResponse = new STORKLogoutResponse(); - - try { - logoutResponse.setTokenSaml(super.signAndMarshall(logoutResponseAux)); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - - logoutResponse.setSamlId(logoutResponseAux.getID()); - logoutResponse.setDestination(logoutResponseAux.getDestination()); - logoutResponse.setIssuer(logoutResponseAux.getIssuer().getValue()); - logoutResponse.setStatusCode(logoutResponseAux.getStatus().getStatusCode().toString()); - logoutResponse.setStatusMessage(logoutResponseAux.getStatus().getStatusMessage().toString()); - - return logoutResponse; - } - - /** - * Generate stork authentication statement for the authentication statement. - * - * @param ipAddress - * the IP address - * - * @return the authentication statement - */ - private AuthnStatement generateStorkAuthStatement(final String ipAddress) { - LOG.debug("Generate stork authenticate statement."); - final SubjectLocality subjectLocality = SAMLEngineUtils.generateSubjectLocality(ipAddress); - - final AuthnContext authnContext = (AuthnContext) SAMLEngineUtils.createSamlObject(AuthnContext.DEFAULT_ELEMENT_NAME); - - final AuthnContextDecl authnContextDecl = (AuthnContextDecl) SAMLEngineUtils.createSamlObject(AuthnContextDecl.DEFAULT_ELEMENT_NAME); - - authnContext.setAuthnContextDecl(authnContextDecl); - - final AuthnStatement authnStatement = SAMLEngineUtils.generateAthnStatement(new DateTime(), authnContext); - - // Optional STORK - authnStatement.setSessionIndex(null); - authnStatement.setSubjectLocality(subjectLocality); - - return authnStatement; - } - - /** - * Generate stork extensions. - * - * @param request - * the request - * - * @return the extensions - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private Extensions generateSTORKExtensions(final STORKAuthnRequest request) throws STORKSAMLEngineException { - LOG.debug("Generate STORKExtensions"); - - final Extensions extensions = SAMLEngineUtils.generateExtension(); - - LOG.debug("Generate QAAAttribute"); - final QAAAttribute qaaAttribute = SAMLEngineUtils.generateQAAAttribute(request.getQaa()); - extensions.getUnknownXMLObjects().add(qaaAttribute); - - if (StringUtils.isNotEmpty(request.getSpSector())) { - // Add information about service provider. - LOG.debug("Generate SPSector"); - final SPSector sector = SAMLEngineUtils.generateSPSector(request.getSpSector()); - extensions.getUnknownXMLObjects().add(sector); - } - - // Delete from specification. Kept for compatibility with Provider Name value - LOG.debug("Generate SPInstitution"); - final SPInstitution institution = SAMLEngineUtils.generateSPInstitution(request.getProviderName()); - extensions.getUnknownXMLObjects().add(institution); - - if (StringUtils.isNotEmpty(request.getSpApplication())) { - LOG.debug("Generate SPApplication"); - final SPApplication application = SAMLEngineUtils.generateSPApplication(request.getSpApplication()); - extensions.getUnknownXMLObjects().add(application); - } - - if (StringUtils.isNotEmpty(request.getSpCountry())) { - LOG.debug("Generate SPCountry"); - final SPCountry country = SAMLEngineUtils.generateSPCountry(request.getSpCountry()); - extensions.getUnknownXMLObjects().add(country); - } - - // eIDSectorShare: optional; default value: false. - String valueSectorShare = super.getSamlCoreProperties().iseIDSectorShare(); - - if (StringUtils.isNotEmpty(valueSectorShare)) { - // Add information about the use of the SAML message. - LOG.debug("Generate EIDSectorShare"); - final EIDSectorShare eIdSectorShare = (EIDSectorShare) SAMLEngineUtils.createSamlObject(EIDSectorShare.DEF_ELEMENT_NAME); - - eIdSectorShare.setEIDSectorShare(String.valueOf(Boolean.valueOf(valueSectorShare))); - - extensions.getUnknownXMLObjects().add(eIdSectorShare); - } - - String valueCrossSectorShare = super.getSamlCoreProperties().iseIDCrossSectorShare(); - - if (StringUtils.isNotEmpty(valueCrossSectorShare)) { - LOG.debug("Generate EIDCrossSectorShare"); - final EIDCrossSectorShare eIdCrossSecShare = (EIDCrossSectorShare) SAMLEngineUtils.createSamlObject(EIDCrossSectorShare.DEF_ELEMENT_NAME); - eIdCrossSecShare.setEIDCrossSectorShare(String.valueOf(Boolean.valueOf(valueCrossSectorShare))); - extensions.getUnknownXMLObjects().add(eIdCrossSecShare); - } - - String valueCrossBorderShare = super.getSamlCoreProperties().iseIDCrossBorderShare(); - - if (StringUtils.isNotEmpty(valueCrossBorderShare)) { - LOG.debug("Generate EIDCrossBorderShare"); - final EIDCrossBorderShare eIdCrossBordShare = (EIDCrossBorderShare) SAMLEngineUtils.createSamlObject(EIDCrossBorderShare.DEF_ELEMENT_NAME); - eIdCrossBordShare.setEIDCrossBorderShare(String.valueOf(Boolean.valueOf(valueCrossBorderShare))); - extensions.getUnknownXMLObjects().add(eIdCrossBordShare); - } - - // Add information about requested attributes. - LOG.debug("Generate RequestedAttributes."); - final RequestedAttributes reqAttributes = (RequestedAttributes) SAMLEngineUtils.createSamlObject(RequestedAttributes.DEF_ELEMENT_NAME); - - LOG.debug("SAML Engine configuration properties load."); - final Iterator iterator = request.getPersonalAttributeList().iterator(); - - while (iterator.hasNext()) { - - final PersonalAttribute attribute = iterator.next(); - - if (attribute == null || StringUtils.isBlank(attribute.getName())) { - LOG.error(ATTRIBUTE_EMPTY_LITERAL); - throw new STORKSAMLEngineException(ATTRIBUTE_EMPTY_LITERAL); - } - - // Verified if exits the attribute name. - final String attributeName = super.getSamlCoreProperties().getProperty(attribute.getName()); - - if (StringUtils.isBlank(attributeName)) { - LOG.debug("Attribute name: {} was not found.", attribute.getName()); - throw new STORKSAMLEngineException("Attribute name: " + attribute.getName() + " was not found."); - } - - // Friendly name it's an optional attribute. - String friendlyName = null; - - if (super.getSamlCoreProperties().isFriendlyName()) { - friendlyName = attribute.getName(); - } - - String isRequired = null; - if (super.getSamlCoreProperties().isRequired()) { - isRequired = String.valueOf(attribute.isRequired()); - } - - LOG.debug("Generate requested attribute: " + attributeName); - final RequestedAttribute requestedAttr = SAMLEngineUtils.generateReqAuthnAttributeSimple(attributeName, friendlyName, isRequired, attribute.getValue()); - - // Add requested attribute. - reqAttributes.getAttributes().add(requestedAttr); - } - - // Add requested attributes. - extensions.getUnknownXMLObjects().add(reqAttributes); - - CitizenCountryCode citizenCountryCode = null; - if (request.getCitizenCountryCode() != null && StringUtils.isNotBlank(request.getCitizenCountryCode())) { - LOG.debug("Generate CitizenCountryCode"); - citizenCountryCode = (CitizenCountryCode) SAMLEngineUtils.createSamlObject(CitizenCountryCode.DEF_ELEMENT_NAME); - - citizenCountryCode.setCitizenCountryCode(request.getCitizenCountryCode().toUpperCase()); - } - - SPID spid = null; - if (request.getSPID() != null && StringUtils.isNotBlank(request.getSPID())) { - LOG.debug("Generate SPID"); - spid = (SPID) SAMLEngineUtils.createSamlObject(SPID.DEF_ELEMENT_NAME); - - spid.setSPID(request.getSPID().toUpperCase()); - } - - AuthenticationAttributes authenticationAttr = (AuthenticationAttributes) SAMLEngineUtils.createSamlObject(AuthenticationAttributes.DEF_ELEMENT_NAME); - - final VIDPAuthenticationAttributes vIDPauthenticationAttr = (VIDPAuthenticationAttributes) SAMLEngineUtils.createSamlObject(VIDPAuthenticationAttributes.DEF_ELEMENT_NAME); - - final SPInformation spInformation = (SPInformation) SAMLEngineUtils.createSamlObject(SPInformation.DEF_ELEMENT_NAME); - - if (citizenCountryCode != null) { - vIDPauthenticationAttr.setCitizenCountryCode(citizenCountryCode); - } - - if (spid != null) { - spInformation.setSPID(spid); - } - - vIDPauthenticationAttr.setSPInformation(spInformation); - - authenticationAttr.setVIDPAuthenticationAttributes(vIDPauthenticationAttr); - extensions.getUnknownXMLObjects().add(authenticationAttr); - - return extensions; - - } - - /** - * Generate stork extensions. - * - * @param request - * the attribute query request - * - * @return the extensions - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private Extensions generateSTORKAttrExtensions(final STORKAttrQueryRequest request) throws STORKSAMLEngineException { - LOG.debug("Generate STORKExtensions"); - - final Extensions extensions = SAMLEngineUtils.generateExtension(); - - LOG.debug("Generate QAAAttribute"); - final QAAAttribute qaaAttribute = SAMLEngineUtils.generateQAAAttribute(request.getQaa()); - extensions.getUnknownXMLObjects().add(qaaAttribute); - - if (StringUtils.isNotEmpty(request.getSpSector())) { - // Add information about service provider. - LOG.debug("Generate SPSector"); - final SPSector sector = SAMLEngineUtils.generateSPSector(request.getSpSector()); - extensions.getUnknownXMLObjects().add(sector); - } - - if (StringUtils.isNotEmpty(request.getSpApplication())) { - LOG.debug("Generate SPApplication"); - final SPApplication application = SAMLEngineUtils.generateSPApplication(request.getSpApplication()); - extensions.getUnknownXMLObjects().add(application); - } - - if (StringUtils.isNotEmpty(request.getSpCountry())) { - LOG.debug("Generate SPCountry"); - final SPCountry country = SAMLEngineUtils.generateSPCountry(request.getSpCountry()); - extensions.getUnknownXMLObjects().add(country); - } - - final EIDSectorShare eIdSectorShare = (EIDSectorShare) SAMLEngineUtils.createSamlObject(EIDSectorShare.DEF_ELEMENT_NAME); - - eIdSectorShare.setEIDSectorShare(String.valueOf(request.isEIDSectorShare())); - - extensions.getUnknownXMLObjects().add(eIdSectorShare); - - final EIDCrossSectorShare eIdCrossSecShare = (EIDCrossSectorShare) SAMLEngineUtils.createSamlObject(EIDCrossSectorShare.DEF_ELEMENT_NAME); - eIdCrossSecShare.setEIDCrossSectorShare(String.valueOf(request.isEIDCrossSectorShare())); - extensions.getUnknownXMLObjects().add(eIdCrossSecShare); - - final EIDCrossBorderShare eIdCrossBordShare = (EIDCrossBorderShare) SAMLEngineUtils.createSamlObject(EIDCrossBorderShare.DEF_ELEMENT_NAME); - eIdCrossBordShare.setEIDCrossBorderShare(String.valueOf(request.isEIDCrossBorderShare())); - extensions.getUnknownXMLObjects().add(eIdCrossBordShare); - - // Add information about requested attributes. - LOG.debug("Generate RequestedAttributes."); - final RequestedAttributes reqAttributes = (RequestedAttributes) SAMLEngineUtils.createSamlObject(RequestedAttributes.DEF_ELEMENT_NAME); - - LOG.debug("SAML Engine configuration properties load."); - final Iterator iterator = request.getPersonalAttributeList().iterator(); - - while (iterator.hasNext()) { - - final PersonalAttribute attribute = iterator.next(); - - if (attribute == null || StringUtils.isBlank(attribute.getName())) { - LOG.error(ATTRIBUTE_EMPTY_LITERAL); - throw new STORKSAMLEngineException(ATTRIBUTE_EMPTY_LITERAL); - } - - // Verified if exits the attribute name. - final String attributeName = super.getSamlCoreProperties().getProperty(attribute.getName()); - - if (StringUtils.isBlank(attributeName)) { - LOG.debug("Attribute name: {} was not found.", attribute.getName()); - throw new STORKSAMLEngineException("Attribute name: " + attribute.getName() + " was not found."); - } - - // Friendly name it's an optional attribute. - String friendlyName = null; - - if (super.getSamlCoreProperties().isFriendlyName()) { - friendlyName = attribute.getName(); - } - - String isRequired = null; - if (super.getSamlCoreProperties().isRequired()) { - isRequired = String.valueOf(attribute.isRequired()); - } - - LOG.debug("Generate requested attribute: " + attributeName); - final RequestedAttribute requestedAttr = SAMLEngineUtils.generateReqAuthnAttributeSimple(attributeName, friendlyName, isRequired, attribute.getValue()); - - // Add requested attribute. - reqAttributes.getAttributes().add(requestedAttr); - } - - // Add requested attributes. - extensions.getUnknownXMLObjects().add(reqAttributes); - - CitizenCountryCode citizenCountryCode = null; - if (request.getCitizenCountryCode() != null && StringUtils.isNotBlank(request.getCitizenCountryCode())) { - LOG.debug("Generate CitizenCountryCode"); - citizenCountryCode = (CitizenCountryCode) SAMLEngineUtils.createSamlObject(CitizenCountryCode.DEF_ELEMENT_NAME); - - citizenCountryCode.setCitizenCountryCode(request.getCitizenCountryCode().toUpperCase()); - - extensions.getUnknownXMLObjects().add(citizenCountryCode); - } - - SPID spid = null; - if (request.getSPID() != null && StringUtils.isNotBlank(request.getSPID())) { - LOG.debug("Generate SPID"); - spid = (SPID) SAMLEngineUtils.createSamlObject(SPID.DEF_ELEMENT_NAME); - - spid.setSPID(request.getSPID().toUpperCase()); - - extensions.getUnknownXMLObjects().add(spid); - } - - return extensions; - - } - - /** - * Gets the alias from X.509 Certificate at keystore. - * - * @param keyInfo - * the key info - * @param storkOwnKeyStore - * @param storkOwnKeyStore - * - * @return the alias - */ - private String getAlias(final KeyInfo keyInfo, KeyStore storkOwnKeyStore) { - - LOG.debug("Recover alias information"); - - String alias = null; - try { - final org.opensaml.xml.signature.X509Certificate xmlCert = keyInfo.getX509Datas().get(0).getX509Certificates().get(0); - - // Transform the KeyInfo to X509Certificate. - CertificateFactory certFact; - certFact = CertificateFactory.getInstance("X.509"); - - final ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decode(xmlCert.getValue())); - - final X509Certificate cert = (X509Certificate) certFact.generateCertificate(bis); - - final String tokenSerialNumber = cert.getSerialNumber().toString(16); - final X509Principal tokenIssuerDN = new X509Principal(cert.getIssuerDN().getName()); - - String aliasCert; - X509Certificate certificate; - boolean find = false; - - for (final Enumeration e = storkOwnKeyStore.aliases(); e.hasMoreElements() && !find;) { - aliasCert = e.nextElement(); - certificate = (X509Certificate) storkOwnKeyStore.getCertificate(aliasCert); - - final String serialNum = certificate.getSerialNumber().toString(16); - - X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); - - if (serialNum.equalsIgnoreCase(tokenSerialNumber) && X509PrincipalUtil.equals2(issuerDN, tokenIssuerDN)) { - alias = aliasCert; - find = true; - } - - } - - } catch (KeyStoreException e) { - LOG.error("Procces getAlias from certificate associated into the signing keystore..", e); - } catch (CertificateException e) { - LOG.error("Procces getAlias from certificate associated into the signing keystore..", e); - } catch (RuntimeException e) { - LOG.error("Procces getAlias from certificate associated into the signing keystore..", e); - } - return alias; - } - - /** - * Gets the country from X.509 Certificate. - * - * @param keyInfo - * the key info - * - * @return the country - */ - private String getCountry(final KeyInfo keyInfo) { - LOG.debug("Recover country information."); - - String result = ""; - try { - final org.opensaml.xml.signature.X509Certificate xmlCert = keyInfo.getX509Datas().get(0).getX509Certificates().get(0); - - // Transform the KeyInfo to X509Certificate. - CertificateFactory certFact; - certFact = CertificateFactory.getInstance("X.509"); - - final ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decode(xmlCert.getValue())); - - final X509Certificate cert = (X509Certificate) certFact.generateCertificate(bis); - - String distName = cert.getSubjectDN().toString(); - - distName = StringUtils.deleteWhitespace(StringUtils.upperCase(distName)); - - final String countryCode = "C="; - final int init = distName.indexOf(countryCode); - - if (init > StringUtils.INDEX_NOT_FOUND) { // Exist country code. - int end = distName.indexOf(',', init); - - if (end <= StringUtils.INDEX_NOT_FOUND) { - end = distName.length(); - } - - if (init < end && end > StringUtils.INDEX_NOT_FOUND) { - result = distName.substring(init + countryCode.length(), end); - // It must be a two characters value - if (result.length() > 2) { - result = result.substring(0, 2); - } - } - } - - } catch (CertificateException e) { - LOG.error("Procces getCountry from certificate."); - } - return result.trim(); - } - - /** - * Process all elements XMLObjects from the extensions. - * - * @param extensions - * the extensions from the authentication request. - * - * @return the STORK authentication request - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private STORKAuthnRequest processExtensions(final Extensions extensions) throws STORKSAMLEngineException { - LOG.debug("Procces the extensions."); - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - final QAAAttribute qaa = (QAAAttribute) extensions.getUnknownXMLObjects(QAAAttribute.DEF_ELEMENT_NAME).get(0); - request.setQaa(Integer.parseInt(qaa.getQaaLevel())); - - List optionalElements = extensions.getUnknownXMLObjects(SPSector.DEF_ELEMENT_NAME); - - if (!optionalElements.isEmpty()) { - final SPSector sector = (SPSector) extensions.getUnknownXMLObjects(SPSector.DEF_ELEMENT_NAME).get(0); - request.setSpSector(sector.getSPSector()); - } - - optionalElements = extensions.getUnknownXMLObjects(SPApplication.DEF_ELEMENT_NAME); - - if (!optionalElements.isEmpty()) { - final SPApplication application = (SPApplication) extensions.getUnknownXMLObjects(SPApplication.DEF_ELEMENT_NAME).get(0); - request.setSpApplication(application.getSPApplication()); - } - - optionalElements = extensions.getUnknownXMLObjects(SPCountry.DEF_ELEMENT_NAME); - - if (!optionalElements.isEmpty()) { - final SPCountry application = (SPCountry) extensions.getUnknownXMLObjects(SPCountry.DEF_ELEMENT_NAME).get(0); - request.setSpCountry(application.getSPCountry()); - } - - List listCrossBorderShare = extensions.getUnknownXMLObjects(EIDCrossBorderShare.DEF_ELEMENT_NAME); - - if (!listCrossBorderShare.isEmpty()) { - final EIDCrossBorderShare crossBorderShare = (EIDCrossBorderShare) listCrossBorderShare.get(0); - request.setEIDCrossBorderShare(Boolean.parseBoolean(crossBorderShare.getEIDCrossBorderShare())); - } - - List listCrosSectorShare = extensions.getUnknownXMLObjects(EIDCrossSectorShare.DEF_ELEMENT_NAME); - - if (!listCrosSectorShare.isEmpty()) { - final EIDCrossSectorShare crossSectorShare = (EIDCrossSectorShare) listCrosSectorShare.get(0); - request.setEIDCrossSectorShare(Boolean.parseBoolean(crossSectorShare.getEIDCrossSectorShare())); - } - - List listSectorShareExtension = extensions.getUnknownXMLObjects(EIDSectorShare.DEF_ELEMENT_NAME); - if (!listSectorShareExtension.isEmpty()) { - final EIDSectorShare sectorShare = (EIDSectorShare) listSectorShareExtension.get(0); - request.setEIDSectorShare(Boolean.parseBoolean(sectorShare.getEIDSectorShare())); - } - - List authAttrs = extensions.getUnknownXMLObjects(AuthenticationAttributes.DEF_ELEMENT_NAME); - - if (authAttrs != null && !authAttrs.isEmpty()) { - - final AuthenticationAttributes authnAttr = (AuthenticationAttributes) authAttrs.get(0); - - VIDPAuthenticationAttributes vidpAuthnAttr = null; - if (authnAttr != null && !authAttrs.isEmpty()) { - vidpAuthnAttr = authnAttr.getVIDPAuthenticationAttributes(); - } - - CitizenCountryCode citizenCountryCodeElement = null; - SPInformation spInformation = null; - if (vidpAuthnAttr != null) { - citizenCountryCodeElement = vidpAuthnAttr.getCitizenCountryCode(); - spInformation = vidpAuthnAttr.getSPInformation(); - } - - String citizenCountryCode = null; - if (citizenCountryCodeElement != null) { - citizenCountryCode = citizenCountryCodeElement.getCitizenCountryCode(); - } - - if (citizenCountryCode != null && StringUtils.isNotBlank(citizenCountryCode)) { - request.setCitizenCountryCode(citizenCountryCode); - } - - SPID spidElement = null; - if (spInformation != null) { - spidElement = spInformation.getSPID(); - } - - String spid = null; - if (spidElement != null) { - spid = spidElement.getSPID(); - } - - if (spid != null && StringUtils.isNotBlank(spid)) { - request.setSPID(spid); - } - } - - if (extensions.getUnknownXMLObjects(RequestedAttributes.DEF_ELEMENT_NAME) == null) { - LOG.error("Extensions not contains any requested attribute."); - throw new STORKSAMLEngineException("Extensions not contains any requested attribute."); - } - - final RequestedAttributes requestedAttr = (RequestedAttributes) extensions.getUnknownXMLObjects(RequestedAttributes.DEF_ELEMENT_NAME).get(0); - - final List reqAttrs = requestedAttr.getAttributes(); - - final IPersonalAttributeList personalAttrList = new PersonalAttributeList(); - - String attributeName; - for (int nextAttribute = 0; nextAttribute < reqAttrs.size(); nextAttribute++) { - final RequestedAttribute attribute = reqAttrs.get(nextAttribute); - final PersonalAttribute personalAttribute = new PersonalAttribute(); - personalAttribute.setIsRequired(Boolean.valueOf(attribute.isRequired())); - personalAttribute.setFriendlyName(attribute.getFriendlyName()); - attributeName = attribute.getName(); - - // recover the last name from the string. - personalAttribute.setName(attributeName.substring(attributeName.lastIndexOf('/') + 1)); - - final ArrayList valores = new ArrayList(); - final List values = attribute.getOrderedChildren(); - - for (int nextSimpleValue = 0; nextSimpleValue < values.size(); nextSimpleValue++) { - - // Process attributes simples. An AuthenticationRequest only - // must contains simple values. - - final XMLObject xmlObject = values.get(nextSimpleValue); - - if (xmlObject instanceof XSStringImpl) { - - final XSStringImpl xmlString = (XSStringImpl) values.get(nextSimpleValue); - valores.add(xmlString.getValue()); - - } else { - - if (attributeName.equals("http://www.stork.gov.eu/1.0/signedDoc")) { - - final XSAnyImpl xmlString = (XSAnyImpl) values.get(nextSimpleValue); - - TransformerFactory transFactory = TransformerFactory.newInstance(); - Transformer transformer = null; - try { - transformer = transFactory.newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - } catch (TransformerConfigurationException e) { - LOG.error("Error transformer configuration exception", e); - } - StringWriter buffer = new StringWriter(); - try { - if (xmlString != null && xmlString.getUnknownXMLObjects() != null && xmlString.getUnknownXMLObjects().size() > 0) { - transformer.transform(new DOMSource(xmlString.getUnknownXMLObjects().get(0).getDOM()), new StreamResult(buffer)); - } - } catch (TransformerException e) { - LOG.error("Error transformer exception", e); - } - String str = buffer.toString(); - - valores.add(str); - - } else { - - final XSAnyImpl xmlString = (XSAnyImpl) values.get(nextSimpleValue); - valores.add(xmlString.getTextContent()); - } - - } - } - personalAttribute.setValue(valores); - personalAttrList.add(personalAttribute); - } - - request.setPersonalAttributeList(personalAttrList); - - return request; - } - - /** - * Process all elements XMLObjects from the extensions. - * - * @param extensions - * the extensions from the authentication request. - * - * @return the STORK authentication request - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private STORKAttrQueryRequest processAttrExtensions(final Extensions extensions) throws STORKSAMLEngineException { - LOG.debug("Procces the atribute query extensions."); - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - final QAAAttribute qaa = (QAAAttribute) extensions.getUnknownXMLObjects(QAAAttribute.DEF_ELEMENT_NAME).get(0); - request.setQaa(Integer.parseInt(qaa.getQaaLevel())); - - List optionalElements = extensions.getUnknownXMLObjects(SPSector.DEF_ELEMENT_NAME); - - if (!optionalElements.isEmpty()) { - final SPSector sector = (SPSector) extensions.getUnknownXMLObjects(SPSector.DEF_ELEMENT_NAME).get(0); - request.setSpSector(sector.getSPSector()); - } - - optionalElements = extensions.getUnknownXMLObjects(SPApplication.DEF_ELEMENT_NAME); - - if (!optionalElements.isEmpty()) { - final SPApplication application = (SPApplication) extensions.getUnknownXMLObjects(SPApplication.DEF_ELEMENT_NAME).get(0); - request.setSpApplication(application.getSPApplication()); - } - - optionalElements = extensions.getUnknownXMLObjects(SPCountry.DEF_ELEMENT_NAME); - - if (!optionalElements.isEmpty()) { - final SPCountry application = (SPCountry) extensions.getUnknownXMLObjects(SPCountry.DEF_ELEMENT_NAME).get(0); - request.setSpCountry(application.getSPCountry()); - } - - List listCrossBorderShare = extensions.getUnknownXMLObjects(EIDCrossBorderShare.DEF_ELEMENT_NAME); - - if (!listCrossBorderShare.isEmpty()) { - final EIDCrossBorderShare crossBorderShare = (EIDCrossBorderShare) listCrossBorderShare.get(0); - request.setEIDCrossBorderShare(Boolean.parseBoolean(crossBorderShare.getEIDCrossBorderShare())); - } - - List listCrosSectorShare = extensions.getUnknownXMLObjects(EIDCrossSectorShare.DEF_ELEMENT_NAME); - - if (!listCrosSectorShare.isEmpty()) { - final EIDCrossSectorShare crossSectorShare = (EIDCrossSectorShare) listCrosSectorShare.get(0); - request.setEIDCrossSectorShare(Boolean.parseBoolean(crossSectorShare.getEIDCrossSectorShare())); - } - - List listSectorShareExtension = extensions.getUnknownXMLObjects(EIDSectorShare.DEF_ELEMENT_NAME); - if (!listSectorShareExtension.isEmpty()) { - final EIDSectorShare sectorShare = (EIDSectorShare) listSectorShareExtension.get(0); - request.setEIDSectorShare(Boolean.parseBoolean(sectorShare.getEIDSectorShare())); - } - - List authAttrs = extensions.getUnknownXMLObjects(AuthenticationAttributes.DEF_ELEMENT_NAME); - - if (authAttrs != null && !authAttrs.isEmpty()) { - - final AuthenticationAttributes authnAttr = (AuthenticationAttributes) authAttrs.get(0); - - VIDPAuthenticationAttributes vidpAuthnAttr = null; - if (authnAttr != null && !authAttrs.isEmpty()) { - vidpAuthnAttr = authnAttr.getVIDPAuthenticationAttributes(); - } - - CitizenCountryCode citizenCountryCodeElement = null; - SPInformation spInformation = null; - if (vidpAuthnAttr != null) { - citizenCountryCodeElement = vidpAuthnAttr.getCitizenCountryCode(); - spInformation = vidpAuthnAttr.getSPInformation(); - } - - String citizenCountryCode = null; - if (citizenCountryCodeElement != null) { - citizenCountryCode = citizenCountryCodeElement.getCitizenCountryCode(); - } - - if (citizenCountryCode != null && StringUtils.isNotBlank(citizenCountryCode)) { - request.setCitizenCountryCode(citizenCountryCode); - } - - SPID spidElement = null; - if (spInformation != null) { - spidElement = spInformation.getSPID(); - } - - String spid = null; - if (spidElement != null) { - spid = spidElement.getSPID(); - } - - if (spid != null && StringUtils.isNotBlank(spid)) { - request.setSPID(spid); - } - } - - if (extensions.getUnknownXMLObjects(RequestedAttributes.DEF_ELEMENT_NAME) == null) { - LOG.error("Extensions not contains any requested attribute."); - throw new STORKSAMLEngineException("Extensions not contains any requested attribute."); - } - - final RequestedAttributes requestedAttr = (RequestedAttributes) extensions.getUnknownXMLObjects(RequestedAttributes.DEF_ELEMENT_NAME).get(0); - - final List reqAttrs = requestedAttr.getAttributes(); - - final IPersonalAttributeList personalAttrList = new PersonalAttributeList(); - - String attributeName; - for (int nextAttribute = 0; nextAttribute < reqAttrs.size(); nextAttribute++) { - final RequestedAttribute attribute = reqAttrs.get(nextAttribute); - final PersonalAttribute personalAttribute = new PersonalAttribute(); - personalAttribute.setIsRequired(Boolean.valueOf(attribute.isRequired())); - personalAttribute.setFriendlyName(attribute.getFriendlyName()); - attributeName = attribute.getName(); - - // recover the last name from the string. - personalAttribute.setName(attributeName.substring(attributeName.lastIndexOf('/') + 1)); - - final ArrayList valores = new ArrayList(); - final List values = attribute.getOrderedChildren(); - - for (int nextSimpleValue = 0; nextSimpleValue < values.size(); nextSimpleValue++) { - - // Process attributes simples. An AuthenticationRequest only - // must contains simple values. - - final XMLObject xmlObject = values.get(nextSimpleValue); - - if (xmlObject instanceof XSStringImpl) { - - final XSStringImpl xmlString = (XSStringImpl) values.get(nextSimpleValue); - valores.add(xmlString.getValue()); - - } else { - - if (attributeName.equals("http://www.stork.gov.eu/1.0/signedDoc")) { - - final XSAnyImpl xmlString = (XSAnyImpl) values.get(nextSimpleValue); - - TransformerFactory transFactory = TransformerFactory.newInstance(); - Transformer transformer = null; - try { - transformer = transFactory.newTransformer(); - transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - } catch (TransformerConfigurationException e) { - LOG.error("Error transformer configuration exception", e); - } - StringWriter buffer = new StringWriter(); - try { - if (xmlString != null && xmlString.getUnknownXMLObjects() != null && xmlString.getUnknownXMLObjects().size() > 0) { - transformer.transform(new DOMSource(xmlString.getUnknownXMLObjects().get(0).getDOM()), new StreamResult(buffer)); - } - } catch (TransformerException e) { - LOG.error("Error transformer exception", e); - } - String str = buffer.toString(); - - valores.add(str); - - } else { - - final XSAnyImpl xmlString = (XSAnyImpl) values.get(nextSimpleValue); - valores.add(xmlString.getTextContent()); - } - - } - } - personalAttribute.setValue(valores); - personalAttrList.add(personalAttribute); - } - - request.setPersonalAttributeList(personalAttrList); - - return request; - } - - /** - * Sets the name spaces. - * - * @param tokenSaml - * the new name spaces - */ - private void setNameSpaces(final XMLObject tokenSaml) { - LOG.debug("Set namespaces."); - - final Namespace saml2 = new Namespace(SAMLConstants.SAML20_NS, SAMLConstants.SAML20_PREFIX); - tokenSaml.addNamespace(saml2); - - final Namespace digSig = new Namespace("http://www.w3.org/2000/09/xmldsig#", "ds"); - tokenSaml.addNamespace(digSig); - - final Namespace storkp = new Namespace(SAMLCore.STORK10P_NS.getValue(), SAMLCore.STORK10P_PREFIX.getValue()); - tokenSaml.addNamespace(storkp); - - final Namespace stork = new Namespace(SAMLCore.STORK10_NS.getValue(), SAMLCore.STORK10_PREFIX.getValue()); - - tokenSaml.addNamespace(stork); - } - - /** - * Validate parameters from authentication request. - * - * @param request - * the request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamAuthnReq(final STORKAuthnRequest request) throws STORKSAMLEngineException { - LOG.info("Validate parameters from authentication request."); - - // URL to which Authentication Response must be sent. - if (StringUtils.isBlank(request.getAssertionConsumerServiceURL())) { - throw new STORKSAMLEngineException("StorkSamlEngine: Assertion Consumer Service URL it's mandatory."); - } - - // the name of the original service provider requesting the - // authentication. - if (StringUtils.isBlank(request.getProviderName())) { - throw new STORKSAMLEngineException("StorkSamlEngine: Service Provider it's mandatory."); - } - - // object that contain all attributes requesting. - if (request.getPersonalAttributeList() == null || request.getPersonalAttributeList().isEmpty()) { - throw new STORKSAMLEngineException("attributeQueries is null or empty."); - } - - // Quality authentication assurance level. - if ((request.getQaa() < QAAAttribute.MIN_VALUE) || (request.getQaa() > QAAAttribute.MAX_VALUE)) { - throw new STORKSAMLEngineException("Qaal: " + request.getQaa() + ", is invalid."); - } - - } - - /** - * Validate parameters from attribute query request. - * - * @param request - * the request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamAttrQueryReq(final STORKAttrQueryRequest request) throws STORKSAMLEngineException { - LOG.info("Validate parameters from attribute query request."); - - // URL to which AP Response must be sent. - if (StringUtils.isBlank(request.getAssertionConsumerServiceURL())) { - throw new STORKSAMLEngineException("StorkSamlEngine: Assertion Consumer Service URL it's mandatory."); - } - - // SP country is empty - if (StringUtils.isBlank(request.getSpCountry())) { - throw new STORKSAMLEngineException("StorkSamlEngine: SP country is mandatory."); - } - - // object that contain all attributes requesting. - if (request.getPersonalAttributeList() == null || request.getPersonalAttributeList().isEmpty()) { - throw new STORKSAMLEngineException("attributeQueries is null or empty."); - } - - // Quality authentication assurance level. - if ((request.getQaa() < QAAAttribute.MIN_VALUE) || (request.getQaa() > QAAAttribute.MAX_VALUE)) { - throw new STORKSAMLEngineException("Qaal: " + request.getQaa() + ", is invalid."); - } - } - - /** - * Validate parameters from logout request. - * - * @param request - * the request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamLogoutReq(final STORKLogoutRequest request) throws STORKSAMLEngineException { - LOG.info("Validate parameters from logout request."); - // URL to which AP Response must be sent. - // Destination of the request - if (StringUtils.isBlank(request.getDestination())) { - throw new STORKSAMLEngineException("StorkSamlEngine: Destination is mandatory."); - } - - // SP Provided Id - if (StringUtils.isBlank(request.getSpProvidedId())) { - throw new STORKSAMLEngineException("StorkSamlEngine: SP provided Id is mandatory."); - } - } - - /** - * Validate parameters from logout response. - * - * @param response - * the response. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamLogoutRes(final STORKLogoutRequest request, final STORKLogoutResponse response) throws STORKSAMLEngineException { - LOG.info("Validate parameters from logout request."); - - // Issuer is mandatory - if (StringUtils.isBlank(request.getIssuer())) { - throw new STORKSAMLEngineException("Issuer must be not empty or null."); - } - - // Destination of the request - if (StringUtils.isBlank(response.getDestination())) { - throw new STORKSAMLEngineException("StorkSamlEngine: Destination is mandatory."); - } - - // SP Provided Id - if (StringUtils.isBlank(request.getSpProvidedId())) { - throw new STORKSAMLEngineException("StorkSamlEngine: SP provided Id is mandatory."); - } - - if (StringUtils.isBlank(request.getSamlId())) { - throw new STORKSAMLEngineException("request ID is null or empty."); - } - } - - /** - * Validate parameters from response. - * - * @param request - * the request - * @param responseAuthReq - * the response authentication request - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamResponse(final STORKAuthnRequest request, final STORKAuthnResponse responseAuthReq) throws STORKSAMLEngineException { - LOG.info("Validate parameters response."); - if (StringUtils.isBlank(request.getIssuer())) { - throw new STORKSAMLEngineException("Issuer must be not empty or null."); - } - - if (responseAuthReq.getPersonalAttributeList() == null) { - LOG.error("PersonalAttributeList is null."); - throw new STORKSAMLEngineException("PersonalAttributeList is null."); - } - - if (StringUtils.isBlank(request.getAssertionConsumerServiceURL())) { - throw new STORKSAMLEngineException("assertionConsumerServiceURL is null or empty."); - } - - if (StringUtils.isBlank(request.getSamlId())) { - throw new STORKSAMLEngineException("request ID is null or empty."); - } - } - - /** - * Validate parameters from response. - * - * @param request - * the request - * @param responseAttrQueryReq - * the response authentication request - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamAttrQueryResponse(final STORKAttrQueryRequest request, final STORKAttrQueryResponse responseAttrQueryReq) throws STORKSAMLEngineException { - LOG.info("Validate attribute querey parameters response."); - if (StringUtils.isBlank(request.getIssuer())) { - throw new STORKSAMLEngineException("Issuer must be not empty or null."); - } - - if (responseAttrQueryReq.getPersonalAttributeList() == null || responseAttrQueryReq.getPersonalAttributeList().isEmpty()) { - LOG.error("PersonalAttributeList is null or empty."); - throw new STORKSAMLEngineException("PersonalAttributeList is null or empty."); - } - - if (StringUtils.isBlank(request.getSamlId())) { - throw new STORKSAMLEngineException("request ID is null or empty."); - } - } - - /** - * Validate parameters from response. - * - * @param request - * the request - * @param responseAttrQueryReq - * the response authentication request - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamAttrQueryResponseFromAssertions(final STORKAttrQueryRequest request, final STORKAttrQueryResponse responseAttrQueryReq) throws STORKSAMLEngineException { - LOG.info("Validate attribute querey parameters response."); - if (StringUtils.isBlank(request.getIssuer())) { - throw new STORKSAMLEngineException("Issuer must be not empty or null."); - } - - /* - * if (responseAttrQueryReq.getPersonalAttributeList() == null || responseAttrQueryReq.getPersonalAttributeList().isEmpty()) { LOG.error("PersonalAttributeList is null or empty."); throw new - * STORKSAMLEngineException( "PersonalAttributeList is null or empty."); } - */ - - /* - * if (StringUtils.isBlank(request.getAssertionConsumerServiceURL())) { throw new STORKSAMLEngineException( "assertionConsumerServiceURL is null or empty."); } - */ - - if (StringUtils.isBlank(request.getSamlId())) { - throw new STORKSAMLEngineException("request ID is null or empty."); - } - } - - /** - * Validate parameter from response fail. - * - * @param request - * the request - * @param response - * the response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamResponseFail(final STORKAuthnRequest request, final STORKAuthnResponse response) throws STORKSAMLEngineException { - LOG.info("Validate parameters response fail."); - if (StringUtils.isBlank(response.getStatusCode())) { - throw new STORKSAMLEngineException("Code error it's null or empty."); - } - - if (StringUtils.isBlank(request.getAssertionConsumerServiceURL())) { - throw new STORKSAMLEngineException("assertionConsumerServiceURL is null or empty."); - } - - if (StringUtils.isBlank(request.getSamlId())) { - throw new STORKSAMLEngineException("request ID is null or empty."); - } - } - - /** - * Validate parameter from response fail. - * - * @param request - * the request - * @param response - * the response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamAttrQueryResponseFail(final STORKAttrQueryRequest request, final STORKAttrQueryResponse response) throws STORKSAMLEngineException { - LOG.info("Validate parameters response fail."); - if (StringUtils.isBlank(response.getStatusCode())) { - throw new STORKSAMLEngineException("Code error it's null or empty."); - } - - if (StringUtils.isBlank(request.getSamlId())) { - throw new STORKSAMLEngineException("request ID is null or empty."); - } - } - - /** - * Validate parameter from response fail. - * - * @param request - * the request - * @param response - * the response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private void validateParamLogoutResFail(final STORKLogoutRequest request, final STORKLogoutResponse response) throws STORKSAMLEngineException { - LOG.info("Validate parameters response fail."); - - if (StringUtils.isBlank(request.getIssuer())) { - throw new STORKSAMLEngineException("Issuer must be not empty or null."); - } - - if (StringUtils.isBlank(response.getStatusCode())) { - throw new STORKSAMLEngineException("Code error it's null or empty."); - } - - if (StringUtils.isBlank(request.getSamlId())) { - throw new STORKSAMLEngineException("request ID is null or empty."); - } - } - - /** - * Validate stork authentication request. - * - * @param tokenSaml - * the token SAML - * - * @return the sTORK authentication request - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAuthnRequest validateSTORKAuthnRequest(final byte[] tokenSaml) throws STORKSAMLEngineException { - LOG.info("validateSTORKAuthnRequest"); - - final AuthnRequest samlRequest = (AuthnRequest) validateStorkSaml(tokenSaml); - - LOG.debug("Validate Extensions."); - final Validator validatorExt = new ExtensionsSchemaValidator(); - try { - validatorExt.validate(samlRequest.getExtensions()); - } catch (ValidationException e) { - LOG.error("ValidationException: validate Extensions.", e); - throw new STORKSAMLEngineException(e); - } - - LOG.debug("Generate STORKAuthnRequest."); - final STORKAuthnRequest authnRequest = processExtensions(samlRequest.getExtensions()); - - authnRequest.setCountry(this.getCountry(samlRequest.getSignature().getKeyInfo())); - - authnRequest.setAlias(this.getAlias(samlRequest.getSignature().getKeyInfo(), super.getSigner().getTrustStore())); - - authnRequest.setSamlId(samlRequest.getID()); - authnRequest.setDestination(samlRequest.getDestination()); - authnRequest.setAssertionConsumerServiceURL(samlRequest.getAssertionConsumerServiceURL()); - - authnRequest.setProviderName(samlRequest.getProviderName()); - authnRequest.setIssuer(samlRequest.getIssuer().getValue()); - - // Delete unknown elements from requested ones - final Iterator iterator = authnRequest.getPersonalAttributeList().iterator(); - IPersonalAttributeList cleanPerAttrList = (PersonalAttributeList) authnRequest.getPersonalAttributeList(); - while (iterator.hasNext()) { - - final PersonalAttribute attribute = iterator.next(); - - // Verify if the attribute name exits. - final String attributeName = super.getSamlCoreProperties().getProperty(attribute.getName()); - - if (StringUtils.isBlank(attributeName)) { - LOG.info("Attribute name: {} was not found. It will be removed from the request object", attribute.getName()); - cleanPerAttrList.remove(attribute.getName()); - } - - } - authnRequest.setPersonalAttributeList(cleanPerAttrList); - - return authnRequest; - - } - - /** - * Validate stork attribute query request. - * - * @param tokenSaml - * the token SAML - * - * @return the STORK attribute query request - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAttrQueryRequest validateSTORKAttrQueryRequest(final byte[] tokenSaml) throws STORKSAMLEngineException { - LOG.info("validateSTORKAttrQueryRequest"); - - // final AttributeQuery samlRequest = (AttributeQuery) validateStorkSaml(tokenSaml); - final CustomRequestAbstractType samlRequest = (CustomRequestAbstractType) validateStorkSaml(tokenSaml); - - LOG.debug("Validate Extensions."); - final Validator validatorExt = new ExtensionsSchemaValidator(); - try { - validatorExt.validate(samlRequest.getExtensions()); - } catch (ValidationException e) { - LOG.error("ValidationException: validate Extensions.", e); - throw new STORKSAMLEngineException(e); - } - - LOG.debug("Generate STORKAttrQueryRequest."); - final STORKAttrQueryRequest attrRequest = processAttrExtensions(samlRequest.getExtensions()); - - attrRequest.setCountry(this.getCountry(samlRequest.getSignature().getKeyInfo())); - - attrRequest.setAlias(this.getAlias(samlRequest.getSignature().getKeyInfo(), super.getSigner().getTrustStore())); - - attrRequest.setSamlId(samlRequest.getID()); - attrRequest.setDestination(samlRequest.getDestination()); - attrRequest.setAssertionConsumerServiceURL(samlRequest.getAssertionConsumerServiceURL()); - - attrRequest.setIssuer(samlRequest.getIssuer().getValue()); - - // Delete unknown elements from requested ones - final Iterator iterator = attrRequest.getPersonalAttributeList().iterator(); - IPersonalAttributeList cleanPerAttrList = (PersonalAttributeList) attrRequest.getPersonalAttributeList(); - while (iterator.hasNext()) { - - final PersonalAttribute attribute = iterator.next(); - - // Verify if the attribute name exits. - final String attributeName = super.getSamlCoreProperties().getProperty(attribute.getName()); - - if (StringUtils.isBlank(attributeName)) { - LOG.info("Attribute name: {} was not found. It will be removed from the request object", attribute.getName()); - cleanPerAttrList.remove(attribute.getName()); - } - - } - attrRequest.setPersonalAttributeList(cleanPerAttrList); - - return attrRequest; - - } - - /** - * Validate stork logout request. - * - * @param tokenSaml - * the token SAML - * - * @return the STORK logout request - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKLogoutRequest validateSTORKLogoutRequest(final byte[] tokenSaml) throws STORKSAMLEngineException { - LOG.info("validateSTORKLogoutRequest"); - - final LogoutRequest samlRequest = (LogoutRequest) validateStorkSaml(tokenSaml); - - if (samlRequest.getExtensions() != null) { - LOG.debug("Validate Extensions."); - final Validator validatorExt = new ExtensionsSchemaValidator(); - try { - validatorExt.validate(samlRequest.getExtensions()); - } catch (ValidationException e) { - LOG.error("ValidationException: validate Extensions.", e); - throw new STORKSAMLEngineException(e); - } - } - - LOG.debug("Generate STORKLogoutRequest."); - final STORKLogoutRequest logoutRequest = new STORKLogoutRequest(); - - logoutRequest.setCountry(this.getCountry(samlRequest.getSignature().getKeyInfo())); - - logoutRequest.setAlias(this.getAlias(samlRequest.getSignature().getKeyInfo(), super.getSigner().getTrustStore())); - - logoutRequest.setSamlId(samlRequest.getID()); - logoutRequest.setDestination(samlRequest.getDestination()); - - logoutRequest.setIssuer(samlRequest.getIssuer().getValue()); - - logoutRequest.setSpProvidedId(samlRequest.getNameID().getValue()); - - return logoutRequest; - - } - - /** - * Validate stork logout response. - * - * @param tokenSaml - * The SAML token - * - * @return the STORK logout response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKLogoutResponse validateSTORKLogoutResponse(final byte[] tokenSaml) throws STORKSAMLEngineException { - - LOG.info("validate STORK Logout Response"); - - final LogoutResponse samlRes = (LogoutResponse) validateStorkSaml(tokenSaml); - - LOG.debug("Generate STORKLogoutResponse."); - final STORKLogoutResponse logoutRes = new STORKLogoutResponse(); - - try { - logoutRes.setTokenSaml(super.signAndMarshall(samlRes)); - } catch (SAMLEngineException e) { - LOG.error("Sign and Marshall.", e); - throw new STORKSAMLEngineException(e); - } - - logoutRes.setAlias(this.getAlias(samlRes.getSignature().getKeyInfo(), super.getSigner().getTrustStore())); - logoutRes.setSamlId(samlRes.getID()); - logoutRes.setDestination(samlRes.getDestination()); - logoutRes.setIssuer(samlRes.getIssuer().getValue()); - logoutRes.setStatusCode(samlRes.getStatus().getStatusCode().getValue().toString()); - logoutRes.setStatusMessage(samlRes.getStatus().getStatusMessage().getMessage().toString()); - logoutRes.setInResponseTo(samlRes.getInResponseTo()); - return logoutRes; - } - - /** - * Validate stork authentication response. - * - * @param tokenSaml - * the token SAML - * @param userIP - * the user IP - * - * @return the Stork authentication response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAuthnResponse validateSTORKAuthnResponse(final byte[] tokenSaml, final String userIP) throws STORKSAMLEngineException { - - LOG.info("validateSTORKAuthnResponse"); - final Response samlResponse = (Response) validateStorkSaml(tokenSaml); - - LOG.debug("Create StorkAuthResponse."); - final STORKAuthnResponse authnResponse = new STORKAuthnResponse(); - - authnResponse.setCountry(this.getCountry(samlResponse.getSignature().getKeyInfo())); - - LOG.debug("Set ID."); - authnResponse.setSamlId(samlResponse.getID()); - LOG.debug("Set InResponseTo."); - authnResponse.setInResponseTo(samlResponse.getInResponseTo()); - LOG.debug("Set statusCode."); - authnResponse.setStatusCode(samlResponse.getStatus().getStatusCode().getValue()); - - // Subordinate code. - if (samlResponse.getStatus().getStatusCode().getStatusCode() != null) { - authnResponse.setSubStatusCode(samlResponse.getStatus().getStatusCode().getStatusCode().getValue()); - } - - if (samlResponse.getStatus().getStatusMessage() != null) { - LOG.debug("Set statusMessage."); - authnResponse.setMessage(samlResponse.getStatus().getStatusMessage().getMessage()); - } - - LOG.debug("validateStorkResponse"); - final Assertion assertion = (Assertion) validateStorkResponse(samlResponse, userIP); - - if (assertion != null) { - final DateTime serverDate = new DateTime(); - - if (assertion.getConditions().getNotOnOrAfter().isBefore(serverDate)) { - LOG.error("Token date expired (getNotOnOrAfter = " + assertion.getConditions().getNotOnOrAfter() + ", server_date: " + serverDate + ")"); - throw new STORKSAMLEngineException("Token date expired (getNotOnOrAfter = " + assertion.getConditions().getNotOnOrAfter() + " ), server_date: " + serverDate); - } - - LOG.debug("Set notOnOrAfter."); - authnResponse.setNotOnOrAfter(assertion.getConditions().getNotOnOrAfter()); - - LOG.debug("Set notBefore."); - authnResponse.setNotBefore(assertion.getConditions().getNotBefore()); - - authnResponse.setNotBefore(assertion.getConditions().getNotBefore()); - - authnResponse.setAudienceRestriction(((AudienceRestriction) assertion.getConditions().getAudienceRestrictions().get(0)).getAudiences().get(0).getAudienceURI()); - authnResponse.setAssertions(samlResponse.getAssertions()); - } - - // Case no error. - if (assertion != null && StatusCode.SUCCESS_URI.equalsIgnoreCase(authnResponse.getStatusCode())) { - LOG.debug("Status Success. Set PersonalAttributeList."); - authnResponse.setPersonalAttributeList(generatePersonalAttributeList(assertion)); - authnResponse.setFail(false); - } else { - LOG.debug("Status Fail."); - authnResponse.setFail(true); - } - LOG.debug("Return result."); - return authnResponse; - - } - - /** - * Validate stork authentication response. - * - * @param tokenSaml - * the token SAML - * @param userIP - * the user IP - * - * @return the Stork authentication response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAuthnResponse validateSTORKAuthnResponseWithQuery(final byte[] tokenSaml, final String userIP) throws STORKSAMLEngineException { - - LOG.info("validateSTORKAuthnResponse"); - final Response samlResponse = (Response) validateStorkSaml(tokenSaml); - - LOG.debug("Create StorkAuthResponse."); - final STORKAuthnResponse authnResponse = new STORKAuthnResponse(); - - authnResponse.setCountry(this.getCountry(samlResponse.getSignature().getKeyInfo())); - - LOG.debug("Set ID."); - authnResponse.setSamlId(samlResponse.getID()); - LOG.debug("Set InResponseTo."); - authnResponse.setInResponseTo(samlResponse.getInResponseTo()); - LOG.debug("Set statusCode."); - authnResponse.setStatusCode(samlResponse.getStatus().getStatusCode().getValue()); - - // Subordinate code. - if (samlResponse.getStatus().getStatusCode().getStatusCode() != null) { - authnResponse.setSubStatusCode(samlResponse.getStatus().getStatusCode().getStatusCode().getValue()); - } - - if (samlResponse.getStatus().getStatusMessage() != null) { - LOG.debug("Set statusMessage."); - authnResponse.setMessage(samlResponse.getStatus().getStatusMessage().getMessage()); - } - - LOG.debug("validateStorkResponse"); - final Assertion assertion = (Assertion) validateStorkResponse(samlResponse, userIP); - - if (assertion != null) { - final DateTime serverDate = new DateTime(); - - if (assertion.getConditions().getNotOnOrAfter().isBefore(serverDate)) { - LOG.error("Token date expired (getNotOnOrAfter = " + assertion.getConditions().getNotOnOrAfter() + ", server_date: " + serverDate + ")"); - throw new STORKSAMLEngineException("Token date expired (getNotOnOrAfter = " + assertion.getConditions().getNotOnOrAfter() + " ), server_date: " + serverDate); - } - - LOG.debug("Set notOnOrAfter."); - authnResponse.setNotOnOrAfter(assertion.getConditions().getNotOnOrAfter()); - - LOG.debug("Set notBefore."); - authnResponse.setNotBefore(assertion.getConditions().getNotBefore()); - - authnResponse.setNotBefore(assertion.getConditions().getNotBefore()); - - authnResponse.setAudienceRestriction(((AudienceRestriction) assertion.getConditions().getAudienceRestrictions().get(0)).getAudiences().get(0).getAudienceURI()); - } - - // Case no error. - if (assertion != null && StatusCode.SUCCESS_URI.equalsIgnoreCase(authnResponse.getStatusCode())) { - LOG.debug("Status Success. Set PersonalAttributeList."); - authnResponse.setPersonalAttributeList(generatePersonalAttributeList(assertion)); - authnResponse.setFail(false); - } else { - LOG.debug("Status Fail."); - authnResponse.setFail(true); - } - - authnResponse.setAssertions(samlResponse.getAssertions()); - if (samlResponse.getAssertions().size() > 1) { - PersonalAttributeList total = new PersonalAttributeList(); - List attrList = new ArrayList(); - for (int i = 0; i < samlResponse.getAssertions().size(); i++) { - Assertion tempAssertion = (Assertion) samlResponse.getAssertions().get(i); - IPersonalAttributeList temp = generatePersonalAttributeList(tempAssertion); - if (temp != null) { - attrList.add(temp); - for (PersonalAttribute attribute : (IPersonalAttributeList) temp.clone()) { - attribute.setName(attribute.getName() + tempAssertion.getID()); - total.add(attribute); - } - } - } - authnResponse.setPersonalAttributeLists(attrList); - authnResponse.setTotalPersonalAttributeList(total); - } - - LOG.debug("Return result."); - return authnResponse; - - } - - /** - * Validate stork attribute query response. - * - * @param tokenSaml - * the token SAML - * @param userIP - * the user IP - * - * @return the Stork attribute query response - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public STORKAttrQueryResponse validateSTORKAttrQueryResponse(final byte[] tokenSaml, final String userIP) throws STORKSAMLEngineException { - - LOG.info("validateSTORKAttrQueryResponse"); - final Response samlResponse = (Response) validateStorkSaml(tokenSaml); - - LOG.debug("Create StorkAttrQueryResponse."); - final STORKAttrQueryResponse attrQueryResponse = new STORKAttrQueryResponse(); - - attrQueryResponse.setCountry(this.getCountry(samlResponse.getSignature().getKeyInfo())); - - LOG.debug("Set ID."); - attrQueryResponse.setSamlId(samlResponse.getID()); - LOG.debug("Set InResponseTo."); - attrQueryResponse.setInResponseTo(samlResponse.getInResponseTo()); - LOG.debug("Set statusCode."); - attrQueryResponse.setStatusCode(samlResponse.getStatus().getStatusCode().getValue()); - - // Subordinate code. - if (samlResponse.getStatus().getStatusCode().getStatusCode() != null) { - attrQueryResponse.setSubStatusCode(samlResponse.getStatus().getStatusCode().getStatusCode().getValue()); - } - - if (samlResponse.getStatus().getStatusMessage() != null) { - LOG.debug("Set statusMessage."); - attrQueryResponse.setMessage(samlResponse.getStatus().getStatusMessage().getMessage()); - } - - LOG.debug("validateStorkResponse"); - final Assertion assertion = (Assertion) validateStorkResponse(samlResponse, userIP); - - if (assertion != null) { - final DateTime serverDate = new DateTime(); - - attrQueryResponse.setAssertion(assertion); - - if (assertion.getConditions().getNotOnOrAfter().isBefore(serverDate)) { - LOG.error("Token date expired (getNotOnOrAfter = " + assertion.getConditions().getNotOnOrAfter() + ", server_date: " + serverDate + ")"); - throw new STORKSAMLEngineException("Token date expired (getNotOnOrAfter = " + assertion.getConditions().getNotOnOrAfter() + " ), server_date: " + serverDate); - } - - LOG.debug("Set notOnOrAfter."); - attrQueryResponse.setNotOnOrAfter(assertion.getConditions().getNotOnOrAfter()); - - LOG.debug("Set notBefore."); - attrQueryResponse.setNotBefore(assertion.getConditions().getNotBefore()); - - attrQueryResponse.setNotBefore(assertion.getConditions().getNotBefore()); - - attrQueryResponse.setAudienceRestriction(((AudienceRestriction) assertion.getConditions().getAudienceRestrictions().get(0)).getAudiences().get(0).getAudienceURI()); - } - - // Case no error. - if (assertion != null && StatusCode.SUCCESS_URI.equalsIgnoreCase(attrQueryResponse.getStatusCode())) { - LOG.debug("Status Success. Set PersonalAttributeList."); - attrQueryResponse.setPersonalAttributeList(generatePersonalAttributeList(assertion)); - attrQueryResponse.setFail(false); - } else { - LOG.debug("Status Fail."); - attrQueryResponse.setFail(true); - } - - attrQueryResponse.setAssertions(samlResponse.getAssertions()); - if (samlResponse.getAssertions().size() > 1) { - PersonalAttributeList total = new PersonalAttributeList(); - List attrList = new ArrayList(); - for (int i = 0; i < samlResponse.getAssertions().size(); i++) { - Assertion tempAssertion = (Assertion) samlResponse.getAssertions().get(i); - IPersonalAttributeList temp = generatePersonalAttributeList(tempAssertion); - if (temp != null) { - attrList.add(temp); - for (PersonalAttribute attribute : temp) { - PersonalAttribute attr = (PersonalAttribute) attribute.clone(); - attr.setName(attr.getName() + tempAssertion.getID()); - total.add(attr); - } - } - } - attrQueryResponse.setPersonalAttributeLists(attrList); - attrQueryResponse.setTotalPersonalAttributeList(total); - } - - LOG.debug("Return result."); - return attrQueryResponse; - - } - - /** - * Validate stork response. - * - * @param samlResponse - * the SAML response - * @param userIP - * the user IP - * - * @return the assertion - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private Assertion validateStorkResponse(final Response samlResponse, final String userIP) throws STORKSAMLEngineException { - // Exist only one Assertion - - if (samlResponse.getAssertions() == null || samlResponse.getAssertions().isEmpty()) { - LOG.info("Assertion is null or empty."); // in replace of throw new STORKSAMLEngineException("Assertion is null or empty.") - return null; - } - - final Assertion assertion = (Assertion) samlResponse.getAssertions().get(0); - - LOG.debug("Verified method Bearer"); - for (final Iterator iter = assertion.getSubject().getSubjectConfirmations().iterator(); iter.hasNext();) { - final SubjectConfirmation element = iter.next(); - final boolean isBearer = SubjectConfirmation.METHOD_BEARER.equals(element.getMethod()); - - final boolean ipValidate = super.getSamlCoreProperties().isIpValidation(); - - if (ipValidate) { - if (isBearer) { - if (StringUtils.isBlank(userIP)) { - LOG.error("browser_ip is null or empty."); - throw new STORKSAMLEngineException("browser_ip is null or empty."); - } else if (StringUtils.isBlank(element.getSubjectConfirmationData().getAddress())) { - LOG.error("token_ip attribute is null or empty."); - throw new STORKSAMLEngineException("token_ip attribute is null or empty."); - } - } - - final boolean ipEqual = element.getSubjectConfirmationData().getAddress().equals(userIP); - - // Validation ipUser - if (!ipEqual && ipValidate) { - LOG.error("SubjectConfirmation BEARER: "); - throw new STORKSAMLEngineException("IPs doesn't match : token_ip (" + element.getSubjectConfirmationData().getAddress() + ") browser_ip (" + userIP + ")"); - } - } - - } - return assertion; - } - - /** - * Validate stork SAML. - * - * @param tokenSaml - * the token SAML - * - * @return the signable SAML object - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - private SignableSAMLObject validateStorkSaml(final byte[] tokenSaml) throws STORKSAMLEngineException { - - LOG.info("Validate StorkSaml message."); - - if (tokenSaml == null) { - LOG.error("Saml authentication request is null."); - throw new STORKSAMLEngineException("Saml authentication request is null."); - } - - LOG.debug("Generate AuthnRequest from request."); - SignableSAMLObject samlObject; - - try { - samlObject = (SignableSAMLObject) super.unmarshall(tokenSaml); - } catch (SAMLEngineException e) { - LOG.error("SAMLEngineException unmarshall.", e); - throw new STORKSAMLEngineException(e); - } - - boolean validateSign = true; - - if (StringUtils.isNotBlank(super.getSamlCoreProperties().getProperty("validateSignature"))) { - validateSign = Boolean.valueOf(super.getSamlCoreProperties().getProperty("validateSignature")); - } - - if (validateSign) { - LOG.debug("Validate Signature."); - try { - super.validateSignature(samlObject); - } catch (SAMLEngineException e) { - LOG.error("SAMLEngineException validateSignature.", e); - throw new STORKSAMLEngineException(e); - } - } - - LOG.debug("Validate Schema."); - final ValidatorSuite validatorSuite = Configuration.getValidatorSuite("saml2-core-schema-validator"); - try { - if (samlObject.getElementQName().toString().endsWith(CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME)) { - CustomAttributeQueryValidator val = new CustomAttributeQueryValidator(); - val.validate((CustomAttributeQuery) samlObject); - } else if (samlObject instanceof Response && ((Response) samlObject).getAssertions().size() > 1) { - MultipleAssertionResponseValidator val = new MultipleAssertionResponseValidator(); - val.validate((Response) samlObject); - } else - validatorSuite.validate(samlObject); - } catch (ValidationException e) { - LOG.error("ValidationException.", e); - throw new STORKSAMLEngineException(e); - } - - return samlObject; - } - - private boolean isComplex(XMLObject xmlObject) { - boolean isComplex = false; - - final XSAnyImpl complexValue = (XSAnyImpl) xmlObject; - - for (int nextComplexValue = 0; nextComplexValue < complexValue.getUnknownXMLObjects().size(); nextComplexValue++) { - - final XSAnyImpl simple = (XSAnyImpl) complexValue.getUnknownXMLObjects().get(nextComplexValue); - - if (simple.getElementQName().getLocalPart() != null) { - isComplex = true; - break; - } - } - - return isComplex; - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/X509PrincipalUtil.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/X509PrincipalUtil.java deleted file mode 100644 index 73d7e4f62..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/X509PrincipalUtil.java +++ /dev/null @@ -1,63 +0,0 @@ -package eu.stork.peps.auth.engine; - -import org.bouncycastle.asn1.DERObjectIdentifier; -import org.bouncycastle.jce.X509Principal; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Utility class used to decrease complexity of comparison of 2 X509principal - * - * @author vanegdi - * @version $Revision: 1.00 $, $Date: 2013-05-24 20:53:51 $ - */ -public final class X509PrincipalUtil { - - private static final DERObjectIdentifier[] DER_OBJECT_IDENTIFIERS_ARRAY = { X509Principal.CN, X509Principal.OU, X509Principal.O, X509Principal.L, X509Principal.ST, X509Principal.C, - X509Principal.E }; - - private static final Logger LOG = LoggerFactory.getLogger(eu.stork.peps.auth.engine.X509PrincipalUtil.class); - - /** - * Compares 2 X509Principals to detect if they equals - * - * @param principal1 - * @param principal2 - * @return true if arguments are not null and equals - */ - public static boolean X509equals(X509Principal principal1, X509Principal principal2) { - boolean continueProcess = true; - if (principal1 == null || principal2 == null) { - return false; - } - - int cpt = 0; - while (continueProcess && cpt < DER_OBJECT_IDENTIFIERS_ARRAY.length) { - continueProcess = continueProcess && x509ValuesByIdentifierEquals(principal1, principal2, DER_OBJECT_IDENTIFIERS_ARRAY[cpt]); - cpt++; - } - return continueProcess; - } - - public static boolean equals2(X509Principal principal1, X509Principal principal2) { - - if (principal1 == null || principal2 == null) { - return false; - } - - if (principal1.getName().equals(principal2.getName())) - return true; - else - return false; - - } - - private static boolean x509ValuesByIdentifierEquals(X509Principal principal1, X509Principal principal2, DERObjectIdentifier identifier) { - return principal1.getValues(identifier).equals(principal2.getValues(identifier)); - } - - private X509PrincipalUtil() { - // default contructor - LOG.error("Fake X509PrincipalUtil : never be called"); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/AuthenticationAttributes.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/AuthenticationAttributes.java deleted file mode 100644 index 3821f3c06..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/AuthenticationAttributes.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface AuthenticationAttributes. - * - * @author fjquevedo - */ -public interface AuthenticationAttributes extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "AuthenticationAttributes"; - - /** Default element name. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** Local name of the XSI type. */ - String TYPE_LOCAL_NAME = "AuthenticationAttributesType"; - - /** QName of the XSI type. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the citizen country code. - * - * @return the citizen country code - */ - VIDPAuthenticationAttributes getVIDPAuthenticationAttributes(); - - /** - * Sets the vIDP authentication attributes. - * - * @param newVIDPAuthenticationAttr - * the new vIDP authentication attributes - */ - void setVIDPAuthenticationAttributes(VIDPAuthenticationAttributes newVIDPAuthenticationAttr); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CitizenCountryCode.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CitizenCountryCode.java deleted file mode 100644 index 95994695d..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CitizenCountryCode.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface EIDCrossBorderShare. - * - * @author fjquevedo - */ -public interface CitizenCountryCode extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "CitizenCountryCode"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "CitizenCountryCodeType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the SP country. - * - * @return the sP country - */ - String getCitizenCountryCode(); - - /** - * Sets the citizen country code. - * - * @param citizenCountryCode - * the new citizen country code - */ - void setCitizenCountryCode(String citizenCountryCode); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CustomAttributeQuery.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CustomAttributeQuery.java deleted file mode 100644 index d603c2293..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CustomAttributeQuery.java +++ /dev/null @@ -1,49 +0,0 @@ -package eu.stork.peps.auth.engine.core; - -import java.util.List; -import javax.xml.namespace.QName; - -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.Subject; -import org.opensaml.saml2.core.SubjectQuery; - -public interface CustomAttributeQuery extends CustomRequestAbstractType { - /** Element local name. */ - public static final String DEFAULT_ELEMENT_LOCAL_NAME = "AttributeQuery"; - - /** Default element name. */ - public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20P_NS, DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - - /** Local name of the XSI type. */ - public static final String TYPE_LOCAL_NAME = "CustomAttributeQueryType"; - - /** QName of the XSI type. */ - public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20P_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - - /** AssertionConsumerServiceURL attribute name. */ - public static final String ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME = "AssertionConsumerServiceURL"; - - /** - * Gets the Attributes of this query. - * - * @return the list of Attributes of this query - */ - public List getAttributes(); - - /** - * Gets the Subject of this request. - * - * @return the Subject of this request - */ - public Subject getSubject(); - - /** - * Sets the Subject of this request. - * - * @param newSubject - * the Subject of this request - */ - public void setSubject(Subject newSubject); - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CustomRequestAbstractType.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CustomRequestAbstractType.java deleted file mode 100644 index 2dd36a4d9..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/CustomRequestAbstractType.java +++ /dev/null @@ -1,181 +0,0 @@ -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.joda.time.DateTime; -import org.opensaml.common.SAMLVersion; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.common.Extensions; -import org.opensaml.saml2.core.Issuer; - -public interface CustomRequestAbstractType extends SignableSAMLObject { - - /** Local name of the XSI type. */ - public static final String TYPE_LOCAL_NAME = "RequestAbstractType"; - - /** QName of the XSI type. */ - public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20P_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - - /** ID attribute name. */ - public static final String ID_ATTRIB_NAME = "ID"; - - /** Version attribute name. */ - public static final String VERSION_ATTRIB_NAME = "Version"; - - /** IssueInstant attribute name. */ - public static final String ISSUE_INSTANT_ATTRIB_NAME = "IssueInstant"; - - /** Destination attribute name. */ - public static final String DESTINATION_ATTRIB_NAME = "Destination"; - - /** Destination attribute name. */ - public static final String ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME = "AssertionConsumerServiceURL"; - - /** Consent attribute name. */ - public static final String CONSENT_ATTRIB_NAME = "Consent"; - - /** Unspecified consent URI. */ - public static final String UNSPECIFIED_CONSENT = "urn:oasis:names:tc:SAML:2.0:consent:unspecified"; - - /** Obtained consent URI. */ - public static final String OBTAINED_CONSENT = "urn:oasis:names:tc:SAML:2.0:consent:obtained"; - - /** Prior consent URI. */ - public static final String PRIOR_CONSENT = "urn:oasis:names:tc:SAML:2.0:consent:prior"; - - /** Implicit consent URI. */ - public static final String IMPLICIT_CONSENT = "urn:oasis:names:tc:SAML:2.0:consent:current-implicit"; - - /** Explicit consent URI. */ - public static final String EXPLICIT_CONSENT = "urn:oasis:names:tc:SAML:2.0:consent:current-explicit"; - - /** Unavailable consent URI. */ - public static final String UNAVAILABLE_CONSENT = "urn:oasis:names:tc:SAML:2.0:consent:unavailable"; - - /** Inapplicable consent URI. */ - public static final String INAPPLICABLE_CONSENT = "urn:oasis:names:tc:SAML:2.0:consent:inapplicable"; - - /** - * Gets the SAML Version of this request. - * - * @return the SAML Version of this request. - */ - public SAMLVersion getVersion(); - - /** - * Sets the SAML Version of this request. - * - * @param newVersion - * the SAML Version of this request - */ - public void setVersion(SAMLVersion newVersion); - - /** - * Gets the unique identifier of the request. - * - * @return the unique identifier of the request - */ - public String getID(); - - /** - * Sets the unique identifier of the request. - * - * @param newID - * the unique identifier of the request - */ - - public void setID(String newID); - - /** - * Gets the date/time the request was issued. - * - * @return the date/time the request was issued - */ - - public DateTime getIssueInstant(); - - /** - * Sets the date/time the request was issued. - * - * @param newIssueInstant - * the date/time the request was issued - */ - public void setIssueInstant(DateTime newIssueInstant); - - /** - * Gets the URI of the destination of the request. - * - * @return the URI of the destination of the request - */ - public String getDestination(); - - /** - * Sets the URI of the destination of the request. - * - * @param newDestination - * the URI of the destination of the request - */ - public void setDestination(String newDestination); - - /** - * Sets the index of the particular Assertion Consumer Service to which the response to this request should be delivered. - * - * @param newAssertionConsumerServiceIndex - * the new value of the AssertionConsumerServiceIndex attribute - */ - public void setAssertionConsumerServiceURL(String newServiceUrl); - - /** - * Gets the URL of the particular Assertion Consumer Service to which the response to this request should be delivered. - * - * @return the value of the AssertionConsumerServiceURL attribute - */ - public String getAssertionConsumerServiceURL(); - - /** - * Gets the consent obtained from the principal for sending this request. - * - * @return the consent obtained from the principal for sending this request - */ - public String getConsent(); - - /** - * Sets the consent obtained from the principal for sending this request. - * - * @param newConsent - * the new consent obtained from the principal for sending this request - */ - public void setConsent(String newConsent); - - /** - * Gets the issuer of this request. - * - * @return the issuer of this request - */ - public Issuer getIssuer(); - - /** - * Sets the issuer of this request. - * - * @param newIssuer - * the issuer of this request - */ - public void setIssuer(Issuer newIssuer); - - /** - * Gets the Extensions of this request. - * - * @return the Status of this request - */ - public Extensions getExtensions(); - - /** - * Sets the Extensions of this request. - * - * @param newExtensions - * the Extensions of this request - */ - public void setExtensions(Extensions newExtensions); - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDCrossBorderShare.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDCrossBorderShare.java deleted file mode 100644 index 423f0f342..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDCrossBorderShare.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface EIDCrossBorderShare. - * - * @author fjquevedo - */ -public interface EIDCrossBorderShare extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "eIDCrossBorderShare"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "eIDCrossBorderShareType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the eID cross border share. - * - * @return the eID cross border share - */ - String getEIDCrossBorderShare(); - - /** - * Sets the eID cross border share. - * - * @param eIDCrossBorderShare - * the new eID cross border share - */ - void setEIDCrossBorderShare(String eIDCrossBorderShare); - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDCrossSectorShare.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDCrossSectorShare.java deleted file mode 100644 index 260f91046..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDCrossSectorShare.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface EIDCrossSectorShare. - * - * @author fjquevedo - */ -public interface EIDCrossSectorShare extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String ELEM_LOCAL_NAME = "eIDCrossSectorShare"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), ELEM_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "eIDCrossSectorShareType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the eID cross sector share. - * - * @return the eID cross sector share - */ - String getEIDCrossSectorShare(); - - /** - * Sets the eID cross sector share. - * - * @param eIDCrossSectorShare - * the new eID cross sector share - */ - void setEIDCrossSectorShare(String eIDCrossSectorShare); - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDSectorShare.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDSectorShare.java deleted file mode 100644 index a5748d5f1..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/EIDSectorShare.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface EIDSectorShare. - * - * @author fjquevedo - */ -public interface EIDSectorShare extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "eIDSectorShare"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "eIDSectorShare"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the eID sector share. - * - * @return the eID sector share - */ - String getEIDSectorShare(); - - /** - * Sets the eID sector share. - * - * @param eIDSectorShare - * the new eID sector share - */ - void setEIDSectorShare(String eIDSectorShare); - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/QAAAttribute.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/QAAAttribute.java deleted file mode 100644 index 22d472be9..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/QAAAttribute.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * STORK Quality Authentication Assurance Level Attribute Interface. - * - * @author fjquevedo - */ -public interface QAAAttribute extends SAMLObject { - - /** Element local name. */ - String DEF_LOCAL_NAME = "QualityAuthenticationAssuranceLevel"; - - /** Default element name. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** Local name of the XSI type. */ - String TYPE_LOCAL_NAME = "QualityAuthenticationAssuranceLevelAbstractType"; - - /** QName of the XSI type. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** The minimum value allowed. */ - int MIN_VALUE = 1; - - /** The Max value allowed. */ - int MAX_VALUE = 4; - - /** - * Gets the qAA level. - * - * @return the qAA level - */ - String getQaaLevel(); - - /** - * Sets the qAA level. - * - * @param qaaLevel - * the new qAA level - * - */ - void setQaaLevel(String qaaLevel); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/RequestedAttribute.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/RequestedAttribute.java deleted file mode 100644 index 955f6bef9..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/RequestedAttribute.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import java.util.List; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; -import org.opensaml.xml.AttributeExtensibleXMLObject; -import org.opensaml.xml.schema.XSBooleanValue; -import org.opensaml.xml.XMLObject; - -/** - * The Interface RequestedAttribute. - * - * @author fjquevedo - */ -public interface RequestedAttribute extends SAMLObject, AttributeExtensibleXMLObject { - - /** Element local name. */ - String DEF_LOCAL_NAME = "RequestedAttribute"; - - /** Default element name. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** Local name of the XSI type. */ - String TYPE_LOCAL_NAME = "RequestedAttributeAbstractType"; - - /** QName of the XSI type. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** NAME_ATTRIB_NAME attribute name. */ - String NAME_ATTRIB_NAME = "Name"; - - /** NAME_FORMAT_ATTRIB_NAME attribute name. */ - String NAME_FORMAT_ATTR = "NameFormat"; - - /** IS_REQUIRED_ATTRIB_NAME attribute name. */ - String IS_REQUIRED_ATTR = "isRequired"; - - /** FRIENDLY_NAME_ATTRIB_NAME attribute name. */ - String FRIENDLY_NAME_ATT = "FriendlyName"; - - /** Unspecified attribute format ID. */ - String UNSPECIFIED = "urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"; - - /** URI reference attribute format ID. */ - String URI_REFERENCE = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri"; - - /** Basic attribute format ID. */ - String BASIC = "urn:oasis:names:tc:SAML:2.0:attrname-format:basic"; - - /** - * Gets the name. - * - * @return the name - */ - String getName(); - - /** - * Sets the name. - * - * @param name - * the new name - */ - void setName(String name); - - /** - * Gets the name format. - * - * @return the name format - */ - String getNameFormat(); - - /** - * Sets the name format. - * - * @param nameFormat - * the new name format - */ - void setNameFormat(String nameFormat); - - /** - * Gets the friendly name. - * - * @return the friendly name - */ - String getFriendlyName(); - - /** - * Sets the friendly name. - * - * @param friendlyName - * the new friendly name - */ - void setFriendlyName(String friendlyName); - - /** - * Gets the checks if is required. - * - * @return the checks if is required - */ - String isRequired(); - - /** - * Gets the checks if is required xs boolean. - * - * @return the checks if is required xs boolean - */ - String getIsRequiredXSBoolean(); - - /** - * Sets the checks if is required. - * - * @param newIsRequired - * the new checks if is required - */ - void setIsRequired(String newIsRequired); - - /** - * Gets the attribute values. - * - * @return the attribute values - */ - List getAttributeValues(); - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/RequestedAttributes.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/RequestedAttributes.java deleted file mode 100644 index 4527bfdb6..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/RequestedAttributes.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import java.util.List; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface RequestedAttributes. - * - * @author fjquevedo - */ -public interface RequestedAttributes extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "RequestedAttributes"; - - /** Default element name. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** Local name of the XSI type. */ - String TYPE_LOCAL_NAME = "RequestedAttributesType"; - - /** QName of the XSI type. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the attributes. - * - * @return the attributes - */ - List getAttributes(); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLCore.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLCore.java deleted file mode 100644 index 16b9afd18..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLCore.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -/** - * The Enumeration SAMLCore. - * - * @author fjquevedo - */ - -public enum SAMLCore { - - /** The consent authentication request. */ - CONSENT_AUTHN_REQ("consentAuthnRequest"), - - /** The consent authentication response. */ - CONSENT_AUTHN_RES("consentAuthnResponse"), - - /** The FORC e_ auth n_ tag. */ - FORCE_AUTHN_TAG("forceAuthN"), - - /** The I s_ passiv e_ tag. */ - IS_PASSIVE_TAG("isPassive"), - - /** The FORMA t_ entity. */ - FORMAT_ENTITY("formatEntity"), - - /** The FRIENDLY name. */ - FRIENDLY_NAME("friendlyName"), - - /** The IS_REQUIRED AN ATTRIBUTE */ - IS_REQUIRED("isRequired"), - - /** The PRO t_ bindin g_ tag. */ - PROT_BINDING_TAG("protocolBinding"), - - /** The ASSER t_ con s_ tag. */ - ASSERT_CONS_TAG("assertionConsumerServiceURL"), - - /** The REQUESTE r_ tag. */ - REQUESTER_TAG("requester"), - - /** The RESPONDE r_ tag. */ - RESPONDER_TAG("responder"), - - /** The format r_tag. */ - FORMAT_TAG("format"), - - /** The STOR k10_ ns. */ - STORK10_NS("urn:eu:stork:names:tc:STORK:1.0:assertion"), - - /** The STOR k10 p_ ns. */ - STORK10P_NS("urn:eu:stork:names:tc:STORK:1.0:protocol"), - - /** The STOR k10_ prefix. */ - STORK10_PREFIX("stork"), - - /** The STOR k10 p_ prefix. */ - STORK10P_PREFIX("storkp"), - - /** The STOR k10_ bas e_ uri. */ - STORK10_BASE_URI("http://www.stork.gov.eu/1.0/"), - - /** The ON e_ tim e_ use. */ - ONE_TIME_USE("oneTimeUse"); - - /** The value. */ - private String value; - - /** - * Instantiates a new sAML core. - * - * @param fullName - * the full name - */ - private SAMLCore(final String fullName) { - this.value = fullName; - } - - /** - * Gets the value. - * - * @return the value - */ - public String getValue() { - return value; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLEngineSignI.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLEngineSignI.java deleted file mode 100644 index 8474eeedc..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SAMLEngineSignI.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import java.security.KeyStore; -import java.security.cert.X509Certificate; - -import org.opensaml.common.SAMLObject; -import org.opensaml.common.SignableSAMLObject; - -import eu.stork.peps.exceptions.SAMLEngineException; - -/** - * The Interface SAMLEngineSignI. - * - * @author fjquevedo - */ -public interface SAMLEngineSignI { - - /** - * Sign. - * - * @param tokenSaml - * the token SAML - * - * @return the sAML object - * - * @throws SAMLEngineException - * the SAML engine exception - */ - SAMLObject sign(SignableSAMLObject tokenSaml) throws SAMLEngineException; - - /** - * Gets the certificate. - * - * @return the certificate - */ - X509Certificate getCertificate(); - - /** - * Gets the trustStore used when validating SAMLTokens - * - * @return the trustStore - * - */ - KeyStore getTrustStore(); - - /** - * Validate signature. - * - * @param tokenSaml - * the token SAML - * - * @return the sAML object - * - * @throws SAMLEngineException - * the SAML engine exception - */ - SAMLObject validateSignature(SignableSAMLObject tokenSaml) throws SAMLEngineException; - - /** - * Initialize the signature module. - * - * @param fileConf - * the configuration file. - * - * @throws SAMLEngineException - * the STORKSAML engine runtime exception - */ - void init(String fileConf) throws SAMLEngineException; - - /** - * Load cryptographic service provider. - * - * @throws SAMLEngineException - * the SAML engine exception - */ - void loadCryptServiceProvider() throws SAMLEngineException; - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPApplication.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPApplication.java deleted file mode 100644 index 82753b61f..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPApplication.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface SPApplication. - * - * @author fjquevedo - */ -public interface SPApplication extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "spApplication"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "spApplicationType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** - * Gets the service provider application. - * - * @return the service provider application - */ - String getSPApplication(); - - /** - * Sets the service provider application. - * - * @param spApplication - * the new service provider application - */ - void setSPApplication(String spApplication); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPCountry.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPCountry.java deleted file mode 100644 index e04d817ca..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPCountry.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface SPCountry. - * - * @author fjquevedo - */ -public interface SPCountry extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "spCountry"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "spCountryType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** - * Gets the service provider country. - * - * @return the service provider country - */ - String getSPCountry(); - - /** - * Sets the service provider country. - * - * @param spCountry - * the new service provider country - */ - void setSPCountry(String spCountry); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPID.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPID.java deleted file mode 100644 index 8dad4d968..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPID.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface EIDCrossBorderShare. - * - * @author iinigo - */ -public interface SPID extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "SPID"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "SPIDType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the SP ID. - * - * @return the SP ID - */ - String getSPID(); - - /** - * Sets the SP ID. - * - * @param SPID - * the new SP ID - */ - void setSPID(String newSPID); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPInformation.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPInformation.java deleted file mode 100644 index 8ad5b6eef..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPInformation.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface EIDCrossBorderShare. - * - * @author iinigo - */ -public interface SPInformation extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "SPInformation"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "SPInformationType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the SP Id. - * - * @return the SP Id - */ - SPID getSPID(); - - /** - * Sets the SP Id. - * - * @param newSPId - * the new SP Id - */ - void setSPID(SPID newSPID); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPInstitution.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPInstitution.java deleted file mode 100644 index 8a34a94ff..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPInstitution.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface EIDCrossBorderShare. - * - * @author fjquevedo - */ -public interface SPInstitution extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "spInstitution"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "spInstitutionType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** - * Gets the service provider institution. - * - * @return the service provider institution - */ - String getSPInstitution(); - - /** - * Sets the service provider institution. - * - * @param spInstitution - * the new service provider institution - */ - void setSPInstitution(String spInstitution); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPSector.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPSector.java deleted file mode 100644 index 4b8af10cf..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/SPSector.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface SPSector. - * - * @author fjquevedo - */ -public interface SPSector extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "spSector"; - - /** The Constant DEFAULT_ELEMENT_NAME. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** The Constant TYPE_LOCAL_NAME. */ - String TYPE_LOCAL_NAME = "spSectorType"; - - /** The Constant TYPE_NAME. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10_PREFIX.getValue()); - - /** - * Gets the service provider sector. - * - * @return the service provider sector - */ - String getSPSector(); - - /** - * Sets the service provider sector. - * - * @param spSector - * the new service provider sector - */ - void setSPSector(String spSector); -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/STORKSAMLCore.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/STORKSAMLCore.java deleted file mode 100644 index 2a548ca6f..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/STORKSAMLCore.java +++ /dev/null @@ -1,528 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import java.util.Properties; - -import org.apache.commons.lang.StringUtils; -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.NameIDType; -import org.opensaml.saml2.core.RequestAbstractType; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.exceptions.SAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineRuntimeException; - -/** - * The Class SAMLCore. - * - * @author fjquevedo - */ -public final class STORKSAMLCore { - - /** The Constant LOGGER. */ - private static final Logger LOGGER = LoggerFactory.getLogger(STORKSAMLCore.class.getName()); - - /** The consent authentication request. */ - private String consentAuthnReq = null; - - /** The consent authentication response. */ - private String consentAuthnResp = null; - - /** The id cross border share. */ - private String eIDCrossBordShare = null; - - /** The e id cross sect share. */ - private String eIDCrossSectShare = null; - - /** The e id sector share. */ - private String eIDSectorShare = null; - - /** The format entity. */ - private String formatEntity = null; - - /** The friendly name. */ - private boolean friendlyName = false; - - /** The IP validation. */ - private boolean ipValidation = false; - - /** The one time use. */ - private boolean oneTimeUse = true; - - /** The protocol binding. */ - private String protocolBinding = null; - - /** The requester. */ - private String requester = null; - - /** The responder. */ - private String responder = null; - - private String format = null; - - /** - * The SAML core properties. - */ - private Properties samlCoreProp = null; - - /** The time not on or after. */ - private Integer timeNotOnOrAfter = null; - - /** The is required parameter. */ - private boolean isRequired = true; - - private static final String SAML_ENGINE_LITERAL = "SamlEngine.xml: "; - - /** - * Gets the isRequired. - * - * @return the isRequired - */ - public boolean isRequired() { - return isRequired; - } - - /** - * Sets the isRequired. - * - * @param isRequired - * the required. - */ - public void setRequired(boolean isRequired) { - this.isRequired = isRequired; - } - - /** - * Instantiates a new sAML core. - * - * @param instance - * the instance - */ - public STORKSAMLCore(final Properties instance) { - loadConfiguration(instance); - } - - /** - * Gets the consent. - * - * @return the consent - */ - public String getConsentAuthnRequest() { - return consentAuthnReq; - } - - /** - * Gets the consent authentication response. - * - * @return the consent authentication response. - */ - public String getConsentAuthnResp() { - return consentAuthnResp; - } - - /** - * Gets the consent authentication response. - * - * @return the consent authentication response - */ - public String getConsentAuthnResponse() { - return consentAuthnResp; - } - - /** - * Gets the format entity. - * - * @return the format entity - */ - public String getFormatEntity() { - return formatEntity; - } - - /** - * Gets the property. - * - * @param key - * the key - * - * @return the property - */ - public String getProperty(final String key) { - return samlCoreProp.getProperty(key); - } - - /** - * Gets the protocol binding. - * - * @return the protocol binding - */ - public String getProtocolBinding() { - return protocolBinding; - } - - /** - * Gets the requester. - * - * @return the requester - */ - public String getRequester() { - return requester; - } - - /** - * Gets the responder. - * - * @return the responder - */ - public String getResponder() { - return responder; - } - - /** - * return the format string. - * - * @return - */ - public String getFormat() { - return this.format; - } - - /** - * Gets the time not on or after. - * - * @return the time not on or after - */ - public Integer getTimeNotOnOrAfter() { - return timeNotOnOrAfter; - } - - /** - * Checks if is e id cross border share. - * - * @return true, if is e id cross border share - */ - public String iseIDCrossBorderShare() { - return eIDCrossBordShare; - } - - /** - * Checks if is e id cross border share. - * - * @return true, if is e id cross border share - */ - public String iseIDCrossBordShare() { - return eIDCrossBordShare; - } - - /** - * Checks if is e id cross sector share. - * - * @return true, if is e id cross sector share - */ - public String iseIDCrossSectorShare() { - return eIDCrossSectShare; - } - - /** - * Checks if is e id cross sect share. - * - * @return true, if is e id cross sect share - */ - public String iseIDCrossSectShare() { - return eIDCrossSectShare; - } - - /** - * Checks if is e id sector share. - * - * @return true, if is e id sector share - */ - public String iseIDSectorShare() { - return eIDSectorShare; - } - - /** - * Checks if is friendly name. - * - * @return true, if checks if is friendly name - */ - public boolean isFriendlyName() { - return friendlyName; - } - - /** - * Checks if is IP validation. - * - * @return true, if is IP validation - */ - public boolean isIpValidation() { - return ipValidation; - } - - /** - * Checks if is one time use. - * - * @return true, if is one time use - */ - public boolean isOneTimeUse() { - return oneTimeUse; - } - - /** - * Method that loads the configuration file for the SAML Engine. - * - * @param instance - * the instance of the Engine properties. - */ - private void loadConfiguration(final Properties instance) { - - try { - LOGGER.info("SAMLCore: Loading SAMLEngine properties."); - - samlCoreProp = instance; - - final String parameter = samlCoreProp.getProperty(SAMLCore.FORMAT_ENTITY.getValue()); - - if ("entity".equalsIgnoreCase(parameter)) { - formatEntity = NameIDType.ENTITY; - } - - friendlyName = Boolean.valueOf(samlCoreProp.getProperty(SAMLCore.FRIENDLY_NAME.getValue())); - - String isRequiredValue = samlCoreProp.getProperty(SAMLCore.IS_REQUIRED.getValue()); - if (isRequiredValue != null) { - isRequired = Boolean.valueOf(isRequiredValue); - } - - eIDSectorShare = samlCoreProp.getProperty("eIDSectorShare"); - eIDCrossSectShare = samlCoreProp.getProperty("eIDCrossSectorShare"); - eIDCrossBordShare = samlCoreProp.getProperty("eIDCrossBorderShare"); - - ipValidation = Boolean.valueOf(samlCoreProp.getProperty("ipAddrValidation")); - - final String oneTimeUseProp = samlCoreProp.getProperty(SAMLCore.ONE_TIME_USE.getValue()); - - if (StringUtils.isNotBlank(oneTimeUseProp)) { - oneTimeUse = Boolean.valueOf(oneTimeUseProp); - } - - // Protocol Binding - loadProtocolBiding(); - - // Consent Authentication Request - consentAuthnReq = samlCoreProp.getProperty(SAMLCore.CONSENT_AUTHN_REQ.getValue()); - - if ("unspecified".equalsIgnoreCase(consentAuthnReq)) { - consentAuthnReq = RequestAbstractType.UNSPECIFIED_CONSENT; - } - - loadConsentAuthResp(); - - timeNotOnOrAfter = Integer.valueOf(samlCoreProp.getProperty("timeNotOnOrAfter")); - - if (timeNotOnOrAfter.intValue() < 0) { - LOGGER.error(SAML_ENGINE_LITERAL + "timeNotOnOrAfter" + " is negative number."); - - throw new SAMLEngineException(SAML_ENGINE_LITERAL + "timeNotOnOrAfter" + " is negative number."); - } - - requester = samlCoreProp.getProperty(SAMLCore.REQUESTER_TAG.getValue()); - responder = samlCoreProp.getProperty(SAMLCore.RESPONDER_TAG.getValue()); - - format = samlCoreProp.getProperty(SAMLCore.FORMAT_TAG.getValue(), "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"); - - } catch (SAMLEngineException e) { - LOGGER.error("SAMLCore: error loadConfiguration. ", e); - throw new STORKSAMLEngineRuntimeException(e); - } catch (RuntimeException e) { - LOGGER.error("SAMLCore: error loadConfiguration. ", e); - throw new STORKSAMLEngineRuntimeException(e); - } - } - - /** - * Load consent authentication response. - */ - private void loadConsentAuthResp() { - // Consent Authentication Response - consentAuthnResp = samlCoreProp.getProperty(SAMLCore.CONSENT_AUTHN_RES.getValue()); - - if ("obtained".equalsIgnoreCase(consentAuthnResp)) { - consentAuthnResp = RequestAbstractType.OBTAINED_CONSENT; - } else if ("prior".equalsIgnoreCase(consentAuthnResp)) { - consentAuthnResp = RequestAbstractType.PRIOR_CONSENT; - } else if ("curent-implicit".equalsIgnoreCase(consentAuthnResp)) { - consentAuthnResp = "urn:oasis:names:tc:SAML:2.0:consent:current-implicit"; - } else if ("curent-explicit".equalsIgnoreCase(consentAuthnResp)) { - consentAuthnResp = "urn:oasis:names:tc:SAML:2.0:consent:current-explicit"; - } else if ("unspecified".equalsIgnoreCase(consentAuthnResp)) { - consentAuthnResp = RequestAbstractType.UNSPECIFIED_CONSENT; - } - } - - /** - * Load protocol biding. - * - * @throws SAMLEngineException - * the SAML engine exception - */ - private void loadProtocolBiding() throws SAMLEngineException { - // Protocol Binding - protocolBinding = samlCoreProp.getProperty(SAMLCore.PROT_BINDING_TAG.getValue()); - - if (StringUtils.isBlank(protocolBinding)) { - LOGGER.error(SAML_ENGINE_LITERAL + SAMLCore.PROT_BINDING_TAG + " it's mandatory."); - throw new SAMLEngineException(SAML_ENGINE_LITERAL + SAMLCore.PROT_BINDING_TAG + " it's mandatory."); - } else if (protocolBinding.equalsIgnoreCase("HTTP-POST")) { - protocolBinding = SAMLConstants.SAML2_POST_BINDING_URI; - } else { - LOGGER.error(SAML_ENGINE_LITERAL + SAMLCore.PROT_BINDING_TAG + " it's not supporting."); - - throw new SAMLEngineException(SAML_ENGINE_LITERAL + SAMLCore.PROT_BINDING_TAG + " it's not supporting."); - } - } - - /** - * Sets the consent authentication response. - * - * @param newConsAuthnResp - * the new consent authentication response - */ - public void setConsentAuthnResp(final String newConsAuthnResp) { - this.consentAuthnResp = newConsAuthnResp; - } - - /** - * Sets an eID that can be shared outside of the Service Provider’s member state. - * - * @param newEIDCrossBord - * the new eid cross border share - */ - public void setEIDCrossBordShare(final String newEIDCrossBord) { - this.eIDCrossBordShare = newEIDCrossBord; - } - - /** - * Sets an eID that can be shared outside of the Service Provider’s sector. - * - * @param newEIDCrossSect - * the new eid cross sect share - */ - public void setEIDCrossSectShare(final String newEIDCrossSect) { - this.eIDCrossSectShare = newEIDCrossSect; - } - - /** - * Sets an eID that can be shared within the Service Provider’s sector. - * - * @param newEIDSectorShare - * the new eid sector share - */ - public void seteIDSectorShare(final String newEIDSectorShare) { - this.eIDSectorShare = newEIDSectorShare; - } - - /** - * Sets the format entity. - * - * @param newFormatEntity - * the new format entity - */ - public void setFormatEntity(final String newFormatEntity) { - this.formatEntity = newFormatEntity; - } - - /** - * Sets the friendly name. - * - * @param newFriendlyName - * the new friendly name - */ - public void setFriendlyName(final boolean newFriendlyName) { - this.friendlyName = newFriendlyName; - } - - /** - * Sets the IP validation. - * - * @param newIpValidation - * the new IP validation - */ - public void setIpValidation(final boolean newIpValidation) { - this.ipValidation = newIpValidation; - } - - /** - * Sets the one time use. - * - * @param newOneTimeUse - * the new one time use - */ - public void setOneTimeUse(final boolean newOneTimeUse) { - this.oneTimeUse = newOneTimeUse; - } - - /** - * Sets the protocol binding. - * - * @param newProtBinding - * the new protocol binding - */ - public void setProtocolBinding(final String newProtBinding) { - this.protocolBinding = newProtBinding; - } - - /** - * Sets the requester. - * - * @param newRequester - * the new requester - */ - public void setRequester(final String newRequester) { - this.requester = newRequester; - } - - /** - * Sets the responder. - * - * @param newResponder - * the new responder - */ - public void setResponder(final String newResponder) { - this.responder = newResponder; - } - - /** - * Sets the format string - * - * @param newFormat - */ - public void setFormat(final String newFormat) { - this.format = newFormat; - } - - /** - * Sets the time not on or after. - * - * @param newTimeNotOnOrAft - * the new time not on or after - */ - public void setTimeNotOnOrAfter(final Integer newTimeNotOnOrAft) { - this.timeNotOnOrAfter = newTimeNotOnOrAft; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/VIDPAuthenticationAttributes.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/VIDPAuthenticationAttributes.java deleted file mode 100644 index c4c1ec845..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/VIDPAuthenticationAttributes.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core; - -import javax.xml.namespace.QName; - -import org.opensaml.common.SAMLObject; - -/** - * The Interface VIDPAuthenticationAttributes. - * - * @author fjquevedo - */ -public interface VIDPAuthenticationAttributes extends SAMLObject { - - /** The Constant DEFAULT_ELEMENT_LOCAL_NAME. */ - String DEF_LOCAL_NAME = "VIDPAuthenticationAttributes"; - - /** Default element name. */ - QName DEF_ELEMENT_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** Local name of the XSI type. */ - String TYPE_LOCAL_NAME = "VIDPAuthenticationAttributesType"; - - /** QName of the XSI type. */ - QName TYPE_NAME = new QName(SAMLCore.STORK10P_NS.getValue(), TYPE_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - - /** - * Gets the citizen country code. - * - * @return the citizen country code - */ - CitizenCountryCode getCitizenCountryCode(); - - /** - * Sets the citizen country code. - * - * @param newCitizenCountryCode - * the new citizen country code - */ - void setCitizenCountryCode(CitizenCountryCode newCitizenCountryCode); - - /** - * Gets the SP information - * - * @return the SP information - */ - SPInformation getSPInformation(); - - /** - * Sets the SP information - * - * @param newSPInformation - * the new SPInformation - */ - void setSPInformation(SPInformation newSPInformation); - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesBuilder.java deleted file mode 100644 index f34adfcb4..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesBuilder.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.AuthenticationAttributes; - -/** - * The Class AuthenticationAttributesBuilder. - * - * @author fjquevedo - */ -public class AuthenticationAttributesBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the authentication attributes - */ - public final AuthenticationAttributes buildObject() { - return buildObject(AuthenticationAttributes.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace URI - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * - * @return the authentication attributes - */ - public final AuthenticationAttributes buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new AuthenticationAttributesImpl(namespaceURI, localName, namespacePrefix); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesImpl.java deleted file mode 100644 index 9f602aba1..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesImpl.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.common.impl.AbstractSignableSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.AuthenticationAttributes; -import eu.stork.peps.auth.engine.core.VIDPAuthenticationAttributes; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class AuthenticationAttributesImpl. - * - * @author fjquevedo - */ -public final class AuthenticationAttributesImpl extends AbstractSignableSAMLObject implements AuthenticationAttributes { - - private static final Logger LOGGER = LoggerFactory.getLogger(AuthenticationAttributesImpl.class.getName()); - - /** The indexed children. */ - private VIDPAuthenticationAttributes vIDPAuthenAttr; - - /** - * Instantiates a new authentication attributes implementation. - * - * @param namespaceURI - * the namespace uri - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected AuthenticationAttributesImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - * - */ - public List getOrderedChildren() { - final ArrayList children = new ArrayList(); - - children.add(vIDPAuthenAttr); - - if (getSignature() != null) { - children.add(getSignature()); - } - - return Collections.unmodifiableList(children); - } - - /** - * Gets the signature reference id. - * - * @return the signature reference id - * - */ - public String getSignatureReferenceID() { - return null; - } - - /** - * Gets the vidp authentication attributes. - * - * @return the VIDP authentication attributes - * - */ - public VIDPAuthenticationAttributes getVIDPAuthenticationAttributes() { - return vIDPAuthenAttr; - } - - /** - * Sets the vidp authentication attributes. - * - * @param newVIDPAuthenAttr - * the new vidp authen attr - * - */ - public void setVIDPAuthenticationAttributes(final VIDPAuthenticationAttributes newVIDPAuthenAttr) { - vIDPAuthenAttr = prepareForAssignment(this.vIDPAuthenAttr, newVIDPAuthenAttr); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesMarshaller.java deleted file mode 100644 index d31c052fe..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesMarshaller.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; - -/** - * The Class AuthenticationAttributesMarshaller. - * - * @author fjquevedo - */ -public class AuthenticationAttributesMarshaller extends AbstractSAMLObjectMarshaller { - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesUnmarshaller.java deleted file mode 100644 index 7e1b6bbe2..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/AuthenticationAttributesUnmarshaller.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.peps.auth.engine.core.VIDPAuthenticationAttributes; - -import eu.stork.peps.auth.engine.core.AuthenticationAttributes; - -/** - * The Class AuthenticationAttributesUnmarshaller. - * - * @author fjquevedo - */ -public class AuthenticationAttributesUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process child element. - * - * @param parentObject - * the parent object - * @param childObject - * the child object - * - * @throws UnmarshallingException - * the unmarshalling exception - * - */ - protected final void processChildElement(final XMLObject parentObject, final XMLObject childObject) throws UnmarshallingException { - final AuthenticationAttributes attrStatement = (AuthenticationAttributes) parentObject; - - if (childObject instanceof VIDPAuthenticationAttributes) { - attrStatement.setVIDPAuthenticationAttributes((VIDPAuthenticationAttributes) childObject); - } else { - super.processChildElement(parentObject, childObject); - } - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeBuilder.java deleted file mode 100644 index 49ed66d88..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.CitizenCountryCode; - -/** - * The Class CitizenCountryCodeBuilder. - * - * @author fjquevedo - */ -public class CitizenCountryCodeBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the citizen country code - */ - public final CitizenCountryCode buildObject() { - return buildObject(CitizenCountryCode.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the citizen country code - */ - public final CitizenCountryCode buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new CitizenCountryCodeImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeImpl.java deleted file mode 100644 index aa4c725f1..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.CitizenCountryCode; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class CitizenCountryCodeImpl. - * - * @author fjquevedo - */ -public class CitizenCountryCodeImpl extends AbstractSAMLObject implements CitizenCountryCode { - - private static final Logger LOGGER = LoggerFactory.getLogger(CitizenCountryCodeImpl.class.getName()); - /** The citizen country code. */ - private String citizenCountryCode; - - /** - * Instantiates a new sP country impl. - * - * @param namespaceURI - * the namespace uri - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected CitizenCountryCodeImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the citizen country code. - * - * @return the citizen country code - */ - public final String getCitizenCountryCode() { - return citizenCountryCode; - } - - /** - * Sets the citizen country code. - * - * @param newCitizenCountryCode - * the new citizen country code - */ - public final void setCitizenCountryCode(final String newCitizenCountryCode) { - this.citizenCountryCode = prepareForAssignment(this.citizenCountryCode, newCitizenCountryCode); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeMarshaller.java deleted file mode 100644 index e04323f06..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.CitizenCountryCode; - -/** - * The Class SPCountryMarshaller. - * - * @author fjquevedo - */ -public class CitizenCountryCodeMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final CitizenCountryCode citizenCountryCode = (CitizenCountryCode) samlObject; - XMLHelper.appendTextContent(domElement, citizenCountryCode.getCitizenCountryCode()); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeUnmarshaller.java deleted file mode 100644 index eca6d69b9..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CitizenCountryCodeUnmarshaller.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.CitizenCountryCode; - -/** - * The Class CitizenCountryCodeUnmarshaller. - * - * @author fjquevedo - */ -public class CitizenCountryCodeUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param elementContent - * the element content - */ - protected final void processElementContent(final XMLObject samlObject, final String elementContent) { - final CitizenCountryCode citizenCountryCode = (CitizenCountryCode) samlObject; - citizenCountryCode.setCitizenCountryCode(elementContent); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryBuilder.java deleted file mode 100644 index f2d2fe7fb..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryBuilder.java +++ /dev/null @@ -1,25 +0,0 @@ -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; -import org.opensaml.common.xml.SAMLConstants; -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; - -public class CustomAttributeQueryBuilder extends AbstractSAMLObjectBuilder { - /** - * Constructor. - */ - public CustomAttributeQueryBuilder() { - - } - - /** {@inheritDoc} */ - public CustomAttributeQuery buildObject() { - return buildObject(SAMLConstants.SAML20P_NS, CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - } - - /** {@inheritDoc} */ - public CustomAttributeQuery buildObject(String namespaceURI, String localName, String namespacePrefix) { - return new CustomAttributeQueryImpl(namespaceURI, localName, namespacePrefix); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryImpl.java deleted file mode 100644 index d88ede1a3..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -package eu.stork.peps.auth.engine.core.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.impl.SubjectQueryImpl; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.util.XMLObjectChildrenList; - -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; - -public class CustomAttributeQueryImpl extends SubjectQueryImpl implements CustomAttributeQuery { - /** Attribute child elements. */ - private final XMLObjectChildrenList attributes; - private String serviceURL; - - /** - * Constructor. - * - * @param namespaceURI - * the namespace the element is in - * @param elementLocalName - * the local name of the XML element this Object represents - * @param namespacePrefix - * the prefix for the given namespace - */ - protected CustomAttributeQueryImpl(String namespaceURI, String elementLocalName, String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - attributes = new XMLObjectChildrenList(this); - } - - /** {@inheritDoc} */ - public List getAttributes() { - return attributes; - } - - /** {@inheritDoc} */ - public List getOrderedChildren() { - ArrayList children = new ArrayList(); - - if (super.getOrderedChildren() != null) { - children.addAll(super.getOrderedChildren()); - } - children.addAll(attributes); - - if (children.size() == 0) { - return null; - } - - return Collections.unmodifiableList(children); - } - - @Override - public String getAssertionConsumerServiceURL() { - // TODO Auto-generated method stub - return this.serviceURL; - } - - @Override - public void setAssertionConsumerServiceURL(String newServiceUrl) { - // TODO Auto-generated method stub - this.serviceURL = newServiceUrl; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java deleted file mode 100644 index 5e0cf55b3..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryMarshaller.java +++ /dev/null @@ -1,49 +0,0 @@ -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.Configuration; -import org.opensaml.saml2.core.RequestAbstractType; -import org.opensaml.saml2.core.impl.SubjectQueryMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.CustomRequestAbstractType; - -public class CustomAttributeQueryMarshaller extends SubjectQueryMarshaller { - - /** {@inheritDoc} */ - protected void marshallAttributes(XMLObject samlObject, Element domElement) throws MarshallingException { - CustomRequestAbstractType req = (CustomRequestAbstractType) samlObject; - - if (req.getVersion() != null) { - domElement.setAttributeNS(null, RequestAbstractType.VERSION_ATTRIB_NAME, req.getVersion().toString()); - } - - if (req.getID() != null) { - domElement.setAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, req.getID()); - domElement.setIdAttributeNS(null, RequestAbstractType.ID_ATTRIB_NAME, true); - } - - if (req.getVersion() != null) { - domElement.setAttributeNS(null, RequestAbstractType.VERSION_ATTRIB_NAME, req.getVersion().toString()); - } - - if (req.getIssueInstant() != null) { - String iiStr = Configuration.getSAMLDateFormatter().print(req.getIssueInstant()); - domElement.setAttributeNS(null, RequestAbstractType.ISSUE_INSTANT_ATTRIB_NAME, iiStr); - } - - if (req.getDestination() != null) { - domElement.setAttributeNS(null, RequestAbstractType.DESTINATION_ATTRIB_NAME, req.getDestination()); - } - - if (req.getAssertionConsumerServiceURL() != null) { - domElement.setAttributeNS(null, CustomRequestAbstractType.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME, req.getAssertionConsumerServiceURL()); - } - - if (req.getConsent() != null) { - domElement.setAttributeNS(null, RequestAbstractType.CONSENT_ATTRIB_NAME, req.getConsent()); - } - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryUnmarshaller.java deleted file mode 100644 index 485d6656b..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/CustomAttributeQueryUnmarshaller.java +++ /dev/null @@ -1,111 +0,0 @@ -package eu.stork.peps.auth.engine.core.impl; - -import org.joda.time.DateTime; -import org.joda.time.chrono.ISOChronology; -import org.opensaml.common.SAMLVersion; -import org.opensaml.common.xml.SAMLConstants; -import org.opensaml.saml2.core.Attribute; -import org.opensaml.saml2.core.RequestAbstractType; -import org.opensaml.saml2.core.impl.SubjectQueryUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.AbstractXMLObjectUnmarshaller; -import org.opensaml.xml.io.UnmarshallingException; -import org.opensaml.xml.util.DatatypeHelper; -import org.opensaml.xml.util.XMLHelper; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Attr; -import org.w3c.dom.Element; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.Text; - -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; -import eu.stork.peps.auth.engine.core.CustomRequestAbstractType; - -public class CustomAttributeQueryUnmarshaller extends SubjectQueryUnmarshaller { - - private final Logger log = LoggerFactory.getLogger(AbstractXMLObjectUnmarshaller.class); - - /** {@inheritDoc} */ - protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { - CustomAttributeQuery query = (CustomAttributeQuery) parentSAMLObject; - - if (childSAMLObject instanceof Attribute) { - query.getAttributes().add((Attribute) childSAMLObject); - } else { - super.processChildElement(parentSAMLObject, childSAMLObject); - } - } - - /** {@inheritDoc} */ - public XMLObject unmarshall(Element domElement) throws UnmarshallingException { - if (log.isTraceEnabled()) { - log.trace("Starting to unmarshall DOM element {}", XMLHelper.getNodeQName(domElement)); - } - - checkElementIsTarget(domElement); - - // String namespaceURI, String elementLocalName, String namespacePrefix - XMLObject xmlObject = new CustomAttributeQueryImpl(SAMLConstants.SAML20P_NS, CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20P_PREFIX); - - if (log.isTraceEnabled()) { - log.trace("Unmarshalling attributes of DOM Element {}", XMLHelper.getNodeQName(domElement)); - } - - NamedNodeMap attributes = domElement.getAttributes(); - Node attribute; - for (int i = 0; i < attributes.getLength(); i++) { - attribute = attributes.item(i); - - // These should allows be attribute nodes, but just in case... - if (attribute.getNodeType() == Node.ATTRIBUTE_NODE) { - unmarshallAttribute(xmlObject, (Attr) attribute); - } - } - - if (log.isTraceEnabled()) { - log.trace("Unmarshalling other child nodes of DOM Element {}", XMLHelper.getNodeQName(domElement)); - } - - Node childNode = domElement.getFirstChild(); - while (childNode != null) { - - if (childNode.getNodeType() == Node.ATTRIBUTE_NODE) { - unmarshallAttribute(xmlObject, (Attr) childNode); - } else if (childNode.getNodeType() == Node.ELEMENT_NODE) { - unmarshallChildElement(xmlObject, (Element) childNode); - } else if (childNode.getNodeType() == Node.TEXT_NODE || childNode.getNodeType() == Node.CDATA_SECTION_NODE) { - unmarshallTextContent(xmlObject, (Text) childNode); - } - - childNode = childNode.getNextSibling(); - } - - xmlObject.setDOM(domElement); - return xmlObject; - } - - /** {@inheritDoc} */ - protected void processAttribute(XMLObject samlObject, Attr attribute) throws UnmarshallingException { - CustomRequestAbstractType req = (CustomRequestAbstractType) samlObject; - - if (attribute.getLocalName().equals(RequestAbstractType.VERSION_ATTRIB_NAME)) { - req.setVersion(SAMLVersion.valueOf(attribute.getValue())); - } else if (attribute.getLocalName().equals(RequestAbstractType.ID_ATTRIB_NAME)) { - req.setID(attribute.getValue()); - attribute.getOwnerElement().setIdAttributeNode(attribute, true); - } else if (attribute.getLocalName().equals(RequestAbstractType.ISSUE_INSTANT_ATTRIB_NAME) && !DatatypeHelper.isEmpty(attribute.getValue())) { - req.setIssueInstant(new DateTime(attribute.getValue(), ISOChronology.getInstanceUTC())); - } else if (attribute.getLocalName().equals(RequestAbstractType.DESTINATION_ATTRIB_NAME)) { - req.setDestination(attribute.getValue()); - } else if (attribute.getLocalName().equals(RequestAbstractType.CONSENT_ATTRIB_NAME)) { - req.setConsent(attribute.getValue()); - } else if (attribute.getLocalName().equals(CustomRequestAbstractType.ASSERTION_CONSUMER_SERVICE_URL_ATTRIB_NAME)) { - req.setAssertionConsumerServiceURL(attribute.getValue()); - } else { - super.processAttribute(samlObject, attribute); - } - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareBuilder.java deleted file mode 100644 index 7c7a88b89..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.EIDCrossBorderShare; - -/** - * The Class EIDCrossBorderShareBuilder. - * - * @author fjquevedo - */ -public class EIDCrossBorderShareBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the identifier cross border share - */ - public final EIDCrossBorderShare buildObject() { - return buildObject(EIDCrossBorderShare.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the eID cross border share - */ - public final EIDCrossBorderShare buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new EIDCrossBorderShareImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareImpl.java deleted file mode 100644 index 13cc3d287..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.EIDCrossBorderShare; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class EIDCrossBorderShareImpl. - * - * @author fjquevedo - */ -public class EIDCrossBorderShareImpl extends AbstractSAMLObject implements EIDCrossBorderShare { - - private static final Logger LOGGER = LoggerFactory.getLogger(EIDCrossBorderShareImpl.class.getName()); - /** The citizen country code. */ - private String eIDCrossBorderShare; - - /** - * Instantiates a new eID cross border share implementation. - * - * @param namespaceURI - * the namespace URI - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected EIDCrossBorderShareImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the eID cross border share. - * - * @return the eID cross border share - */ - public final String getEIDCrossBorderShare() { - return eIDCrossBorderShare; - } - - /** - * Sets the eID cross border share. - * - * @param newEIDCrossBorderShare - * the new eID cross border share - */ - public final void setEIDCrossBorderShare(String newEIDCrossBorderShare) { - this.eIDCrossBorderShare = prepareForAssignment(this.eIDCrossBorderShare, newEIDCrossBorderShare); - } - - /** - * Gets the ordered children. - * - * @return the ordered children {@inheritDoc} - */ - public final List getOrderedChildren() { - return null; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareMarshaller.java deleted file mode 100644 index 2e8868ac1..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.EIDCrossBorderShare; - -/** - * The Class EIDCrossBorderShareMarshaller. - * - * @author fjquevedo - */ -public class EIDCrossBorderShareMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final EIDCrossBorderShare crossBorderShare = (EIDCrossBorderShare) samlObject; - XMLHelper.appendTextContent(domElement, crossBorderShare.getEIDCrossBorderShare()); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareUnmarshaller.java deleted file mode 100644 index 013b5b78b..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossBorderShareUnmarshaller.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.EIDCrossBorderShare; - -/** - * The Class EIDCrossBorderShareUnmarshaller. - * - * @author fjquevedo - */ -public class EIDCrossBorderShareUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param elementContent - * the element content - */ - protected final void processElementContent(final XMLObject samlObject, final String elementContent) { - final EIDCrossBorderShare crossBorderShare = (EIDCrossBorderShare) samlObject; - crossBorderShare.setEIDCrossBorderShare(elementContent); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareBuilder.java deleted file mode 100644 index 398815719..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.EIDCrossSectorShare; - -/** - * The Class EIDCrossSectorShareBuilder. - * - * @author fjquevedo - */ -public class EIDCrossSectorShareBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the eID cross sector share - */ - public final EIDCrossSectorShare buildObject() { - return buildObject(EIDCrossSectorShare.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the eID cross sector share implementation - */ - public final EIDCrossSectorShareImpl buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new EIDCrossSectorShareImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareImpl.java deleted file mode 100644 index 2e3f6ab7e..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; - -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.EIDCrossSectorShare; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class EIDCrossSectorShareImpl. - * - * @author fjquevedo - */ -public class EIDCrossSectorShareImpl extends AbstractSAMLObject implements EIDCrossSectorShare { - - private static final Logger LOGGER = LoggerFactory.getLogger(EIDCrossSectorShareImpl.class.getName()); - /** The citizen country code. */ - private String eIDCrossSectorShare; - - /** - * Instantiates a new eID cross sector share implementation. - * - * @param namespaceURI - * the namespace URI - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected EIDCrossSectorShareImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the eID cross sector share. - * - * @return the eID cross sector share - */ - public final String getEIDCrossSectorShare() { - return eIDCrossSectorShare; - } - - /** - * Sets the eID cross sector share. - * - * @param newEIDCrossSectorShare - * the new eID cross sector share - */ - public final void setEIDCrossSectorShare(String newEIDCrossSectorShare) { - this.eIDCrossSectorShare = prepareForAssignment(this.eIDCrossSectorShare, newEIDCrossSectorShare); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareMarshaller.java deleted file mode 100644 index caa2df56a..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.EIDCrossSectorShare; - -/** - * The Class EIDCrossSectorShareMarshaller. - * - * @author fjquevedo - */ -public class EIDCrossSectorShareMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final EIDCrossSectorShare crossSectorShare = (EIDCrossSectorShare) samlObject; - XMLHelper.appendTextContent(domElement, crossSectorShare.getEIDCrossSectorShare()); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareUnmarshaller.java deleted file mode 100644 index ebf80e700..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDCrossSectorShareUnmarshaller.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.EIDCrossSectorShare; - -/** - * The Class EIDCrossSectorShareUnmarshaller. - * - * @author fjquevedo - */ -public class EIDCrossSectorShareUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void processElementContent(final XMLObject samlObject, final String domElement) { - - final EIDCrossSectorShare crossSectorShare = (EIDCrossSectorShare) samlObject; - crossSectorShare.setEIDCrossSectorShare(domElement); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareBuilder.java deleted file mode 100644 index 670b6f33a..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.EIDSectorShare; - -/** - * The Class EIDSectorShareBuilder. - * - * @author fjquevedo - */ -public class EIDSectorShareBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the eID sector share - */ - public final EIDSectorShare buildObject() { - return buildObject(EIDSectorShare.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the eID sector share - */ - public final EIDSectorShare buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new EIDSectorShareImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareImpl.java deleted file mode 100644 index f7c514722..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.EIDSectorShare; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -// TODO: Auto-generated Javadoc -/** - * The Class EIDSectorShareImpl. - * - * @author fjquevedo - */ -public class EIDSectorShareImpl extends AbstractSAMLObject implements EIDSectorShare { - - private static final Logger LOGGER = LoggerFactory.getLogger(EIDSectorShareImpl.class.getName()); - - /** The e id sector share. */ - private String eIDSectorShare; - - /** - * Instantiates a new eID sector share implementation. - * - * @param namespaceURI - * the namespace URI - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected EIDSectorShareImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the eID sector share. - * - * @return the eID sector share - */ - public final String getEIDSectorShare() { - return eIDSectorShare; - } - - /** - * Sets the eID sector share. - * - * @param newEIDSectorShare - * the new eID sector share - */ - public final void setEIDSectorShare(String newEIDSectorShare) { - this.eIDSectorShare = prepareForAssignment(this.eIDSectorShare, newEIDSectorShare); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - - @Override - public int hashCode() { - LOGGER.warn("Hashcode has been called, passed to super. Nothing foreseen here"); - return super.hashCode(); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareMarshaller.java deleted file mode 100644 index 509503af0..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareMarshaller.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.saml2.core.impl.AbstractNameIDTypeMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.EIDSectorShare; - -/** - * The Class EIDSectorShareMarshaller. - * - * @author fjquevedo - */ -public class EIDSectorShareMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final EIDSectorShare sectorShare = (EIDSectorShare) samlObject; - XMLHelper.appendTextContent(domElement, sectorShare.getEIDSectorShare()); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareUnmarshaller.java deleted file mode 100644 index 8e2f327c6..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/EIDSectorShareUnmarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.EIDSectorShare; - -/** - * The Class EIDSectorShareUnmarshaller. - * - * @author fjquevedo - */ -public class EIDSectorShareUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void processElementContent(final XMLObject samlObject, final String domElement) { - final EIDSectorShare sectorShare = (EIDSectorShare) samlObject; - sectorShare.setEIDSectorShare(domElement); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeBuilder.java deleted file mode 100644 index deeb2ae56..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.QAAAttribute; - -/** - * The Class QAAAttributeBuilder. - * - * @author fjquevedo - */ -public class QAAAttributeBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the quality authentication assurance object - */ - public final QAAAttribute buildObject() { - return buildObject(QAAAttribute.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the quality authentication assurance object - */ - public final QAAAttribute buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new QAAAttributeImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeImpl.java deleted file mode 100644 index e74ce1fec..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.QAAAttribute; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class QAAAttributeImpl. - * - * @author fjquevedo - */ -public class QAAAttributeImpl extends AbstractSAMLObject implements QAAAttribute { - - private static final Logger LOGGER = LoggerFactory.getLogger(QAAAttributeImpl.class.getName()); - /** The quality authentication assurance level. */ - private String qaaLevel; - - /** - * Constructor. - * - * @param namespaceURI - * the namespace the element is in - * @param elementLocalName - * the local name of the XML element this Object represents - * @param namespacePrefix - * the prefix for the given namespace - */ - protected QAAAttributeImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the quality authentication assurance level. - * - * @return the quality authentication assurance level - */ - public final String getQaaLevel() { - return qaaLevel; - } - - /** - * Sets the quality authentication assurance level. - * - * @param newQaaLevel - * the new quality authentication assurance level - */ - public final void setQaaLevel(final String newQaaLevel) { - this.qaaLevel = prepareForAssignment(this.qaaLevel, newQaaLevel); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeMarshaller.java deleted file mode 100644 index 03a7a758a..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.QAAAttribute; - -/** - * The Class QAAAttributeMarshaller. - * - * @author fjquevedo - */ -public class QAAAttributeMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final QAAAttribute qaaAttribute = (QAAAttribute) samlObject; - XMLHelper.appendTextContent(domElement, qaaAttribute.getQaaLevel()); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeUnmarshaller.java deleted file mode 100644 index 1b9e813f0..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/QAAAttributeUnmarshaller.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.QAAAttribute; - -/** - * The Class QAAAttributeUnmarshaller. - * - * @author fjquevedo - */ -public class QAAAttributeUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param elementContent - * the element content - */ - protected final void processElementContent(final XMLObject samlObject, final String elementContent) { - final QAAAttribute qaaLevel = (QAAAttribute) samlObject; - qaaLevel.setQaaLevel(elementContent); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeBuilder.java deleted file mode 100644 index 4367c4ecf..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.RequestedAttribute; - -/** - * The Class RequestedAttributeBuilder. - * - * @author fjquevedo - */ -public class RequestedAttributeBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the requested attribute - */ - public final RequestedAttribute buildObject() { - return buildObject(RequestedAttribute.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the requested attribute - */ - public final RequestedAttribute buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new RequestedAttributeImpl(namespaceURI, localName, namespacePrefix); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeImpl.java deleted file mode 100644 index 2537d3794..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeImpl.java +++ /dev/null @@ -1,216 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.schema.XSBooleanValue; -import org.opensaml.xml.util.AttributeMap; -import org.opensaml.xml.util.XMLObjectChildrenList; - -import eu.stork.peps.auth.engine.core.RequestedAttribute; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -// TODO: Auto-generated Javadoc -/** - * The Class RequestedAttributeImpl. - * - * @author fjquevedo - */ -public class RequestedAttributeImpl extends AbstractSAMLObject implements RequestedAttribute { - - private static final Logger LOGGER = LoggerFactory.getLogger(RequestedAttributeImpl.class.getName()); - /** - * The attribute values. - */ - private final XMLObjectChildrenList attributeValues; - - /** - * The friendly name. - * - */ - private String friendlyName; - - /** - * The is required. - */ - private String isRequired; - - /** - * The name. - * - */ - private String name; - - /** - * The name format. - * - */ - private String nameFormat; - - /** - * The unknown attributes. - * - */ - private AttributeMap unknownAttributes; - - /** - * Instantiates a new requested attribute impl. - * - * @param namespaceURI - * the namespace uri - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected RequestedAttributeImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - unknownAttributes = new AttributeMap(this); - attributeValues = new XMLObjectChildrenList(this); - } - - /** - * Gets the attribute values. - * - * @return the attribute values - */ - public final List getAttributeValues() { - return attributeValues; - } - - /** - * Gets the friendly name. - * - * @return the friendly name. - */ - public final String getFriendlyName() { - return friendlyName; - } - - /** - * Gets the checks if is required. - * - * @return the boolean if it's required. - */ - public final String isRequired() { - return isRequired; - } - - /** - * Gets the is required xs boolean. - * - * @return the XSBoolean if it's required. - */ - public final String getIsRequiredXSBoolean() { - return isRequired; - } - - /** - * Gets the name. - * - * @return the name - */ - public final String getName() { - return name; - } - - /** - * Gets the name format. - * - * @return the name format. - */ - public final String getNameFormat() { - return nameFormat; - } - - /** - * Gets the ordered children. - * - * @return the list of XMLObject. - */ - public final List getOrderedChildren() { - final ArrayList children = new ArrayList(); - children.addAll(attributeValues); - return Collections.unmodifiableList(children); - } - - /** - * Gets the unknown attributes. - * - * @return the attribute map - */ - public final AttributeMap getUnknownAttributes() { - return unknownAttributes; - } - - /** - * Sets the friendly name. - * - * @param newFriendlyName - * the new friendly name format - */ - public final void setFriendlyName(final String newFriendlyName) { - this.friendlyName = prepareForAssignment(this.friendlyName, newFriendlyName); - } - - /** - * Set new boolean value isRequired. - * - * @param newIsRequired - * then new value - */ - public final void setIsRequired(final String newIsRequired) { - isRequired = prepareForAssignment(this.isRequired, newIsRequired); - - } - - /** - * Sets the name. - * - * @param newName - * the new name - */ - public final void setName(final String newName) { - this.name = prepareForAssignment(this.name, newName); - } - - /** - * Sets the name format. - * - * @param newNameFormat - * the new name format - */ - public final void setNameFormat(final String newNameFormat) { - this.nameFormat = prepareForAssignment(this.nameFormat, newNameFormat); - } - - /** - * Sets the unknown attributes. - * - * @param newUnknownAttr - * the new unknown attributes - */ - public final void setUnknownAttributes(final AttributeMap newUnknownAttr) { - this.unknownAttributes = newUnknownAttr; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeMarshaller.java deleted file mode 100644 index 4a9ec94b1..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeMarshaller.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.Map.Entry; - -import javax.xml.namespace.QName; - -import org.opensaml.Configuration; -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Attr; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.RequestedAttribute; - -/** - * The Class RequestedAttributeMarshaller. - * - * @author fjquevedo - */ -public class RequestedAttributeMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall attributes. - * - * @param samlElement - * the SAML element - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallAttributes(final XMLObject samlElement, final Element domElement) throws MarshallingException { - final RequestedAttribute requestedAttr = (RequestedAttribute) samlElement; - - if (requestedAttr.getName() != null) { - domElement.setAttributeNS(null, RequestedAttribute.NAME_ATTRIB_NAME, requestedAttr.getName()); - } - - if (requestedAttr.getNameFormat() != null) { - domElement.setAttributeNS(null, RequestedAttribute.NAME_FORMAT_ATTR, requestedAttr.getNameFormat()); - } - - if (requestedAttr.getFriendlyName() != null) { - domElement.setAttributeNS(null, RequestedAttribute.FRIENDLY_NAME_ATT, requestedAttr.getFriendlyName()); - } - - if (requestedAttr.getIsRequiredXSBoolean() != null) { - domElement.setAttributeNS(null, RequestedAttribute.IS_REQUIRED_ATTR, requestedAttr.getIsRequiredXSBoolean().toString()); - } - - Attr attr; - for (Entry entry : requestedAttr.getUnknownAttributes().entrySet()) { - attr = XMLHelper.constructAttribute(domElement.getOwnerDocument(), entry.getKey()); - attr.setValue(entry.getValue()); - domElement.setAttributeNodeNS(attr); - if (Configuration.isIDAttribute(entry.getKey()) || requestedAttr.getUnknownAttributes().isIDAttribute(entry.getKey())) { - attr.getOwnerElement().setIdAttributeNode(attr, true); - } - } - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeUnmarshaller.java deleted file mode 100644 index 098ece427..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributeUnmarshaller.java +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import javax.xml.namespace.QName; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; - -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; -import org.opensaml.xml.schema.XSBooleanValue; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Attr; - -import eu.stork.peps.auth.engine.core.RequestedAttribute; -import eu.stork.peps.auth.engine.core.SAMLCore; - -/** - * The Class RequestedAttributeUnmarshaller. - * - * @author fjquevedo - */ -public class RequestedAttributeUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process child element. - * - * @param parentSAMLObject - * parent SAMLObject - * @param childSAMLObject - * child SAMLObject - * - * @throws UnmarshallingException - * error at unmarshall XML object - */ - protected final void processChildElement(final XMLObject parentSAMLObject, final XMLObject childSAMLObject) throws UnmarshallingException { - - final RequestedAttribute requestedAttr = (RequestedAttribute) parentSAMLObject; - - final QName childQName = childSAMLObject.getElementQName(); - if (childQName.getLocalPart().equals("AttributeValue") && childQName.getNamespaceURI().equals(SAMLCore.STORK10_NS.getValue())) { - requestedAttr.getAttributeValues().add(childSAMLObject); - } else { - super.processChildElement(parentSAMLObject, childSAMLObject); - } - } - - /** - * Process attribute. - * - * @param samlObject - * the SAML object - * @param attribute - * the attribute - * @throws UnmarshallingException - * the unmarshalling exception - */ - protected final void processAttribute(final XMLObject samlObject, final Attr attribute) throws UnmarshallingException { - - final RequestedAttribute requestedAttr = (RequestedAttribute) samlObject; - - if (attribute.getLocalName().equals(RequestedAttribute.NAME_ATTRIB_NAME)) { - requestedAttr.setName(attribute.getValue()); - } else if (attribute.getLocalName().equals(RequestedAttribute.NAME_FORMAT_ATTR)) { - requestedAttr.setNameFormat(attribute.getValue()); - } else if (attribute.getLocalName().equals(RequestedAttribute.FRIENDLY_NAME_ATT)) { - requestedAttr.setFriendlyName(attribute.getValue()); - } else if (attribute.getLocalName().equals(RequestedAttribute.IS_REQUIRED_ATTR)) { - requestedAttr.setIsRequired(attribute.getValue()); - - } else { - final QName attribQName = XMLHelper.getNodeQName(attribute); - if (attribute.isId()) { - requestedAttr.getUnknownAttributes().registerID(attribQName); - } - requestedAttr.getUnknownAttributes().put(attribQName, attribute.getValue()); - } - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesBuilder.java deleted file mode 100644 index c9643d7ae..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.RequestedAttributes; - -/** - * The Class RequestedAttributesBuilder. - * - * @author fjquevedo - */ -public class RequestedAttributesBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the requested attributes - */ - public final RequestedAttributes buildObject() { - return buildObject(RequestedAttributes.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the requested attributes - */ - public final RequestedAttributes buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new RequestedAttributesImpl(namespaceURI, localName, namespacePrefix); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesImpl.java deleted file mode 100644 index ad81e4846..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesImpl.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.util.IndexedXMLObjectChildrenList; - -import eu.stork.peps.auth.engine.core.RequestedAttribute; -import eu.stork.peps.auth.engine.core.RequestedAttributes; - -/** - * The Class RequestedAttributesImpl. - * - * @author fjquevedo - */ -public class RequestedAttributesImpl extends AbstractSAMLObject implements RequestedAttributes { - - /** - * Instantiates a new requested attributes implement. - * - * @param namespaceURI - * the namespace URI - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected RequestedAttributesImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - indexedChildren = new IndexedXMLObjectChildrenList(this); - } - - /** The indexed children. */ - private final IndexedXMLObjectChildrenList indexedChildren; - - /** - * Gets the indexed children. - * - * @return the indexed children - */ - public final IndexedXMLObjectChildrenList getIndexedChildren() { - return indexedChildren; - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - - final ArrayList children = new ArrayList(); - - children.addAll(indexedChildren); - - return Collections.unmodifiableList(children); - - } - - /** - * Gets the attributes. - * - * @return the attributes - * - * @see eu.stork.peps.auth.engine.core.RequestedAttributes#getAttributes() - */ - @SuppressWarnings("unchecked") - public final List getAttributes() { - return (List) indexedChildren.subList(RequestedAttribute.DEF_ELEMENT_NAME); - } - - @Override - public int hashCode() { - throw new UnsupportedOperationException("hashCode method not implemented"); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesMarshaller.java deleted file mode 100644 index e1b15015e..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesMarshaller.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; - -/** - * The Class RequestedAttributesMarshaller. - * - * @author fjquevedo - */ -public class RequestedAttributesMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Instantiates a new requested attributes marshaller. - */ - public RequestedAttributesMarshaller() { - super(); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesUnmarshaller.java deleted file mode 100644 index 69990ebe5..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/RequestedAttributesUnmarshaller.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.peps.auth.engine.core.RequestedAttribute; -import eu.stork.peps.auth.engine.core.RequestedAttributes; - -/** - * The Class RequestedAttributesUnmarshaller. - * - * @author fjquevedo - */ -public class RequestedAttributesUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process child element. - * - * @param parentObject - * the parent object - * @param childObject - * the child object - * - * @throws UnmarshallingException - * error in unmarshall - */ - protected final void processChildElement(final XMLObject parentObject, final XMLObject childObject) throws UnmarshallingException { - final RequestedAttributes attrStatement = (RequestedAttributes) parentObject; - - if (childObject instanceof RequestedAttribute) { - attrStatement.getAttributes().add((RequestedAttribute) childObject); - } else { - super.processChildElement(parentObject, childObject); - } - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationBuilder.java deleted file mode 100644 index 6d9f9bf1e..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.SPApplication; - -/** - * The Class SPApplicationBuilder. - * - * @author fjquevedo - */ -public class SPApplicationBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the service provider application - */ - public final SPApplication buildObject() { - return buildObject(SPApplication.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the service provider application - */ - public final SPApplication buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new SPApplicationImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationImpl.java deleted file mode 100644 index 7f09d611f..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPApplication; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class SPApplicationImpl. - * - * @author fjquevedo - */ -public class SPApplicationImpl extends AbstractSAMLObject implements SPApplication { - - private static final Logger LOGGER = LoggerFactory.getLogger(SPApplicationImpl.class.getName()); - /** The service provider application. */ - private String spApplication; - - /** - * Instantiates a new service provider application. - * - * @param namespaceURI - * the namespace uri - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected SPApplicationImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the service provider application. - * - * @return the service provider application - */ - public final String getSPApplication() { - return spApplication; - } - - /** - * Sets the service provider application. - * - * @param newSpApplication - * the new service provider application - */ - public final void setSPApplication(final String newSpApplication) { - this.spApplication = prepareForAssignment(this.spApplication, newSpApplication); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationMarshaller.java deleted file mode 100644 index d9268c550..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.SPApplication; - -/** - * The Class SPApplicationMarshaller. - * - * @author fjquevedo - */ -public class SPApplicationMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final SPApplication spApplication = (SPApplication) samlObject; - XMLHelper.appendTextContent(domElement, spApplication.getSPApplication()); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationUnmarshaller.java deleted file mode 100644 index 9fb514cf0..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPApplicationUnmarshaller.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPApplication; - -/** - * The Class SPApplicationUnmarshaller. - * - * @author fjquevedo - */ -public class SPApplicationUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param elementContent - * the element content - */ - protected final void processElementContent(final XMLObject samlObject, final String elementContent) { - final SPApplication spApplication = (SPApplication) samlObject; - spApplication.setSPApplication(elementContent); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryBuilder.java deleted file mode 100644 index 2c6c124e3..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.SPCountry; - -/** - * The Class SPCountryBuilder. - * - * @author fjquevedo - */ -public class SPCountryBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object SPCountry. - * - * @return the service provider country - */ - public final SPCountry buildObject() { - return buildObject(SPCountry.DEF_ELEMENT_NAME); - } - - /** - * Builds the object SPCountry. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the service provider country - */ - public final SPCountry buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new SPCountryImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryImpl.java deleted file mode 100644 index ea9085867..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPCountry; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class SPCountryImpl. - * - * @author fjquevedo - */ -public class SPCountryImpl extends AbstractSAMLObject implements SPCountry { - - private static final Logger LOGGER = LoggerFactory.getLogger(SPCountryImpl.class.getName()); - /** The service provider country. */ - private String spCountry; - - /** - * Instantiates a new service provider country. - * - * @param namespaceURI - * the namespace uri - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected SPCountryImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the service provider country. - * - * @return the service provider country - */ - public final String getSPCountry() { - return spCountry; - } - - /** - * Sets the service provider country. - * - * @param newSpCountry - * the new service provider country - */ - public final void setSPCountry(final String newSpCountry) { - this.spCountry = prepareForAssignment(this.spCountry, newSpCountry); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryMarshaller.java deleted file mode 100644 index 1bd7121f0..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.SPCountry; - -/** - * The Class SPCountryMarshaller. - * - * @author fjquevedo - */ -public class SPCountryMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final SPCountry spCountry = (SPCountry) samlObject; - XMLHelper.appendTextContent(domElement, spCountry.getSPCountry()); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryUnmarshaller.java deleted file mode 100644 index c9ac243f1..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPCountryUnmarshaller.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPCountry; - -/** - * The Class SPCountryUnmarshaller. - * - * @author fjquevedo - */ -public class SPCountryUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param elementContent - * the element content - */ - protected final void processElementContent(final XMLObject samlObject, final String elementContent) { - final SPCountry spCountry = (SPCountry) samlObject; - spCountry.setSPCountry(elementContent); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDBuilder.java deleted file mode 100644 index 2cee08268..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.SPID; - -/** - * The Class SPIDBuilder. - * - * @author iinigo - */ -public class SPIDBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the SP ID - */ - public final SPID buildObject() { - return buildObject(SPID.DEF_ELEMENT_NAME); - } - - /** - * Builds the object. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the citizen country code - */ - public final SPID buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new SPIDImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDImpl.java deleted file mode 100644 index 03dea20ed..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPID; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class SPIDImpl. - * - * @author iinigo - */ -public class SPIDImpl extends AbstractSAMLObject implements SPID { - - private static final Logger LOGGER = LoggerFactory.getLogger(SPIDImpl.class.getName()); - /** The citizen country code. */ - private String spId; - - /** - * Instantiates a new sP country impl. - * - * @param namespaceURI - * the namespace uri - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected SPIDImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the SP ID. - * - * @return the SP ID - */ - public final String getSPID() { - return spId; - } - - /** - * Sets the SP ID. - * - * @param newSPID - * the new SP ID - */ - public final void setSPID(final String newSPID) { - this.spId = prepareForAssignment(this.spId, newSPID); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDMarshaller.java deleted file mode 100644 index d8cac34fc..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.SPID; - -/** - * The Class SPIDMarshaller. - * - * @author iinigo - */ -public class SPIDMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final SPID spid = (SPID) samlObject; - XMLHelper.appendTextContent(domElement, spid.getSPID()); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDUnmarshaller.java deleted file mode 100644 index ab3aef878..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPIDUnmarshaller.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPID; - -/** - * The Class SPIDUnmarshaller. - * - * @author iinigo - */ -public class SPIDUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param elementContent - * the element content - */ - protected final void processElementContent(final XMLObject samlObject, final String elementContent) { - final SPID spid = (SPID) samlObject; - spid.setSPID(elementContent); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationBuilder.java deleted file mode 100644 index af7c97d19..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.SAMLCore; -import eu.stork.peps.auth.engine.core.SPInformation; - -/** - * The Class SPInformation. - * - * @author iinigo - */ -public final class SPInformationBuilder extends AbstractSAMLObjectBuilder { - - /** {@inheritDoc} */ - public SPInformation buildObject() { - return buildObject(SAMLCore.STORK10P_NS.getValue(), SPInformation.DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - } - - /** {@inheritDoc} */ - public SPInformation buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new SPInformationImpl(namespaceURI, localName, namespacePrefix); - } - -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationImpl.java deleted file mode 100644 index 41b3d8998..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.common.impl.AbstractSignableSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPID; -import eu.stork.peps.auth.engine.core.SPInformation; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class SPInformationImpl. - * - * @author iinigo - */ -public final class SPInformationImpl extends AbstractSignableSAMLObject implements SPInformation { - - private static final Logger LOGGER = LoggerFactory.getLogger(SPInformationImpl.class.getName()); - /** The citizen country code. */ - private SPID spId; - - /** - * Instantiates a new requested attributes implement. - * - * @param namespaceURI - * the namespace URI - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected SPInformationImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * getSPId. - * - * @return the SP ID - */ - public SPID getSPID() { - return spId; - } - - /** - * Gets the ordered children. - * - * @return the ordered children - * - */ - public List getOrderedChildren() { - final ArrayList children = new ArrayList(); - - children.add(spId); - - if (getSignature() != null) { - children.add(getSignature()); - } - - return Collections.unmodifiableList(children); - - } - - /** - * Gets the signature reference id. - * - * @return the signature reference id - * - */ - public String getSignatureReferenceID() { - return null; - } - - /** - * Sets the SP Id. - * - * @param newSPId - * the new SP Id - * - */ - public void setSPID(SPID newSPId) { - this.spId = prepareForAssignment(this.spId, newSPId); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationMarshaller.java deleted file mode 100644 index 027e49e9d..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationMarshaller.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; - -/** - * The Class SPInformationMarshaller. - * - * @author iinigo - */ -public class SPInformationMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Instantiates a new SP Information marshaller. - */ - public SPInformationMarshaller() { - super(); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationUnmarshaller.java deleted file mode 100644 index ecf69e2c7..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInformationUnmarshaller.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.peps.auth.engine.core.SPID; -import eu.stork.peps.auth.engine.core.SPInformation; - -/** - * The Class SPInformationUnmarshaller. - * - * @author iinigo - */ -public class SPInformationUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process child element. - * - * @param parentObject - * the parent object - * @param childObject - * the child object - * - * @throws UnmarshallingException - * the unmarshalling exception - * - */ - protected final void processChildElement(final XMLObject parentObject, final XMLObject childObject) throws UnmarshallingException { - final SPInformation spInformation = (SPInformation) parentObject; - - if (childObject instanceof SPID) { - spInformation.setSPID((SPID) childObject); - } else { - super.processChildElement(parentObject, childObject); - } - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionBuilder.java deleted file mode 100644 index d26b15a1e..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.SPInstitution; - -/** - * The Class SPInstitutionBuilder. - * - * @author fjquevedo - */ -public class SPInstitutionBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object. - * - * @return the service provider institution - */ - public final SPInstitution buildObject() { - return buildObject(SPInstitution.DEF_ELEMENT_NAME); - } - - /** - * Builds the object SPInstitution. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the service provider institution - */ - public final SPInstitution buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new SPInstitutionImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionImpl.java deleted file mode 100644 index ed0a75f35..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionImpl.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPInstitution; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class SPInstitutionImpl. - * - * @author fjquevedo - */ -public class SPInstitutionImpl extends AbstractSAMLObject implements SPInstitution { - - private static final Logger LOGGER = LoggerFactory.getLogger(SPInstitutionImpl.class.getName()); - /** The service provider institution. */ - private String spInstitution; - - /** - * Instantiates a new service provider institution. - * - * @param namespaceURI - * the namespace uri - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected SPInstitutionImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the service provider institution. - * - * @return the service provider institution - */ - public final String getSPInstitution() { - return spInstitution; - } - - /** - * Sets the service provider institution. - * - * @param newSpInstitution - * the new service provider institution - */ - public final void setSPInstitution(final String newSpInstitution) { - this.spInstitution = prepareForAssignment(this.spInstitution, newSpInstitution); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionMarshaller.java deleted file mode 100644 index 48bb3fec5..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.SPInstitution; - -/** - * The Class SPInstitutionMarshaller. - * - * @author fjquevedo - */ -public class SPInstitutionMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final SPInstitution spInstitution = (SPInstitution) samlObject; - XMLHelper.appendTextContent(domElement, spInstitution.getSPInstitution()); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionUnmarshaller.java deleted file mode 100644 index f7b1f440e..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPInstitutionUnmarshaller.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPInstitution; - -/** - * The Class SPInstitutionUnmarshaller. - * - * @author fjquevedo - */ -public class SPInstitutionUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param elementContent - * the element content - */ - protected final void processElementContent(final XMLObject samlObject, final String elementContent) { - final SPInstitution spInstitution = (SPInstitution) samlObject; - spInstitution.setSPInstitution(elementContent); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorBuilder.java deleted file mode 100644 index b97e91b36..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.SPSector; - -/** - * The Class SPSectorBuilder. - * - * @author fjquevedo - */ -public class SPSectorBuilder extends AbstractSAMLObjectBuilder { - - /** - * Builds the object SPSector. - * - * @return the service provider sector. - */ - public final SPSector buildObject() { - return buildObject(SPSector.DEF_ELEMENT_NAME); - } - - /** - * Builds the object SPSector. - * - * @param namespaceURI - * the namespace uri - * @param localName - * the local name - * @param namespacePrefix - * the namespace prefix - * @return the service provider sector - */ - public final SPSector buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new SPSectorImpl(namespaceURI, localName, namespacePrefix); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorImpl.java deleted file mode 100644 index 670198e67..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorImpl.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.List; - -import org.opensaml.common.impl.AbstractSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPSector; - -/** - * The Class SPSectorImpl. - * - * @author fjquevedo - */ -public class SPSectorImpl extends AbstractSAMLObject implements SPSector { - - /** The service provider sector. */ - private String spSector; - - /** - * Instantiates a new Service provider sector implementation. - * - * @param namespaceURI - * the namespace URI - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected SPSectorImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * Gets the service provider sector. - * - * @return the SP sector - * - * @see eu.stork.peps.auth.engine.core.SPSector#getSPSector() - */ - public final String getSPSector() { - return spSector; - } - - /** - * Sets the service provider sector. - * - * @param newSpSector - * the new service provider sector - */ - public final void setSPSector(final String newSpSector) { - this.spSector = prepareForAssignment(this.spSector, newSpSector); - } - - /** - * Gets the ordered children. - * - * @return the ordered children - */ - public final List getOrderedChildren() { - return null; - } - - @Override - public int hashCode() { - throw new UnsupportedOperationException("hashCode method not implemented"); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorMarshaller.java deleted file mode 100644 index 59e349f9f..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorMarshaller.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.util.XMLHelper; -import org.w3c.dom.Element; - -import eu.stork.peps.auth.engine.core.SPSector; - -/** - * The Class SPSectorMarshaller. - * - * @author fjquevedo - */ -public class SPSectorMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Marshall element content. - * - * @param samlObject - * the SAML object - * @param domElement - * the DOM element - * @throws MarshallingException - * the marshalling exception - */ - protected final void marshallElementContent(final XMLObject samlObject, final Element domElement) throws MarshallingException { - final SPSector spSector = (SPSector) samlObject; - XMLHelper.appendTextContent(domElement, spSector.getSPSector()); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorUnmarshaller.java deleted file mode 100644 index e671cee03..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SPSectorUnmarshaller.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.SPSector; - -/** - * The Class SPSectorUnmarshaller. - * - * @author fjquevedo - */ -public class SPSectorUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process element content. - * - * @param samlObject - * the SAML object - * @param elementContent - * the element content - */ - protected final void processElementContent(final XMLObject samlObject, final String elementContent) { - final SPSector spSector = (SPSector) samlObject; - spSector.setSPSector(elementContent); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignHW.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignHW.java deleted file mode 100644 index 1cd5fb761..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignHW.java +++ /dev/null @@ -1,395 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.io.IOException; -import java.io.InputStream; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.Provider; -import java.security.Security; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.InvalidPropertiesFormatException; -import java.util.List; -import java.util.Properties; - -import eu.stork.peps.auth.engine.X509PrincipalUtil; -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.NotImplementedException; -import org.bouncycastle.jce.X509Principal; -import org.opensaml.Configuration; -import org.opensaml.common.SAMLObject; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.LogoutResponse; -import org.opensaml.saml2.core.Response; -import org.opensaml.security.SAMLSignatureProfileValidator; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.security.SecurityConfiguration; -import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.security.keyinfo.KeyInfoGenerator; -import org.opensaml.xml.security.keyinfo.KeyInfoGeneratorFactory; -import org.opensaml.xml.security.keyinfo.KeyInfoGeneratorManager; -import org.opensaml.xml.security.keyinfo.KeyInfoHelper; -import org.opensaml.xml.security.keyinfo.NamedKeyInfoGeneratorManager; -import org.opensaml.xml.security.x509.BasicX509Credential; -import org.opensaml.xml.security.trust.ExplicitKeyTrustEvaluator; -import org.opensaml.xml.signature.KeyInfo; -import org.opensaml.xml.signature.Signature; -import org.opensaml.xml.signature.SignatureConstants; -import org.opensaml.xml.signature.SignatureException; -import org.opensaml.xml.signature.SignatureValidator; -import org.opensaml.xml.signature.Signer; -import org.opensaml.xml.validation.ValidationException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; -import eu.stork.peps.auth.engine.core.SAMLEngineSignI; -import eu.stork.peps.exceptions.SAMLEngineException; - -/** - * The Class HWSign. Module of sign. - * - * @author fjquevedo - * @author advania - */ -public final class SignHW implements SAMLEngineSignI { - - /** The Constant CONFIGURATION_FILE. */ - private static final String CONF_FILE = "configurationFile"; - - /** - * The Constant KEYSTORE_TYPE. - */ - private static final String KEYSTORE_TYPE = "keystoreType"; - - /** The logger. */ - private static final Logger LOG = LoggerFactory.getLogger(SignHW.class.getName()); - - /** The stork own key store. */ - private KeyStore storkOwnKeyStore = null; - /** - * The soft trust key store. - */ - private SignSW swTrustStore = null; - - /** - * Gets the stork own key store. - * - * @return the stork own key store - */ - public KeyStore getStorkOwnKeyStore() { - return storkOwnKeyStore; - } - - /** - * Gets the stork trustStore. - * - * @return the stork own key store - */ - public KeyStore getTrustStore() { - return storkOwnKeyStore; - } - - /** - * Sets the stork own key store. - * - * @param newkOwnKeyStore - * the new stork own key store - */ - public void setStorkOwnKeyStore(final KeyStore newkOwnKeyStore) { - this.storkOwnKeyStore = newkOwnKeyStore; - } - - /** - * Gets the properties. - * - * @return the properties - */ - public Properties getProperties() { - return properties; - } - - /** - * Sets the properties. - * - * @param newProperties - * the new properties - */ - public void setProperties(final Properties newProperties) { - this.properties = newProperties; - } - - /** The HW sign prop. */ - private Properties properties = null; - - /** - * @see eu.stork.peps.auth.engine.core.SAMLEngineSignI#init(java.lang.String) - * @param fileConf - * file of configuration - * @throws SAMLEngineException - * error in read file - */ - public void init(final String fileConf) throws SAMLEngineException { - InputStream inputStr = null; - try { - inputStr = SignHW.class.getResourceAsStream("/" + fileConf); - properties = new Properties(); - - properties.loadFromXML(inputStr); - } catch (final InvalidPropertiesFormatException e) { - LOG.info("Exception: invalid properties format."); - throw new SAMLEngineException(e); - } catch (IOException e) { - LOG.info("Exception: invalid file: " + fileConf); - throw new SAMLEngineException(e); - } finally { - IOUtils.closeQuietly(inputStr); - /** - * Init the soft keystore to validate with. trustStoreConfig is read from the SignModule config file and should refer to the keystore containing trusted certificates. - */ - swTrustStore = new SignSW(); - swTrustStore.init(properties.getProperty("trustStoreConfig")); - swTrustStore.loadCryptServiceProvider(); - } - } - - /** - * @see eu.stork.peps.auth.engine.core.SAMLEngineSignI#getCertificate() - * @return the X509Certificate. - */ - public X509Certificate getCertificate() { - throw new NotImplementedException(); - } - - /** - * @see eu.stork.peps.auth.engine.core.SAMLEngineSignI#sign(SignableSAMLObject tokenSaml) - * @param tokenSaml - * signable SAML Object - * @return the SAMLObject signed. - * @throws SAMLEngineException - * error in sign token saml - */ - public SAMLObject sign(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - - try { - LOG.info("Star procces of sign"); - final char[] pin = properties.getProperty("keyPassword").toCharArray(); - - storkOwnKeyStore.load(null, pin); - - final String serialNumber = properties.getProperty("serialNumber"); - final String issuer = properties.getProperty("issuer"); - - String alias = null; - String aliasCert; - X509Certificate certificate; - - boolean find = false; - for (final Enumeration e = storkOwnKeyStore.aliases(); e.hasMoreElements() && !find;) { - aliasCert = e.nextElement(); - certificate = (X509Certificate) storkOwnKeyStore.getCertificate(aliasCert); - // Verified serial number, issuer - - final String serialNum = certificate.getSerialNumber().toString(16); - X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); - X509Principal issuerDNConf = new X509Principal(issuer); - - if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.X509equals(issuerDN, issuerDNConf)) { - alias = aliasCert; - find = true; - } - - } - - if (!find) { - throw new SAMLEngineException("Certificate cannot be found in keystore "); - } - certificate = (X509Certificate) storkOwnKeyStore.getCertificate(alias); - final PrivateKey privateKey = (PrivateKey) storkOwnKeyStore.getKey(alias, pin); - - LOG.info("Recover BasicX509Credential."); - final BasicX509Credential credential = new BasicX509Credential(); - - LOG.debug("Load certificate"); - credential.setEntityCertificate(certificate); - - LOG.debug("Load privateKey"); - credential.setPrivateKey(privateKey); - - LOG.info("Star procces of sign"); - final Signature signature = (Signature) org.opensaml.xml.Configuration.getBuilderFactory().getBuilder(Signature.DEFAULT_ELEMENT_NAME).buildObject(Signature.DEFAULT_ELEMENT_NAME); - - LOG.debug("Begin signature with openSaml"); - signature.setSigningCredential(credential); - - /* - * signature.setSignatureAlgorithm( SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1); - */ - signature.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256); - - final SecurityConfiguration securityConf = org.opensaml.xml.Configuration.getGlobalSecurityConfiguration(); - final NamedKeyInfoGeneratorManager keyInfoManager = securityConf.getKeyInfoGeneratorManager(); - final KeyInfoGeneratorManager keyInfoGenManager = keyInfoManager.getDefaultManager(); - final KeyInfoGeneratorFactory keyInfoGenFac = keyInfoGenManager.getFactory(credential); - final KeyInfoGenerator keyInfoGenerator = keyInfoGenFac.newInstance(); - - final KeyInfo keyInfo = keyInfoGenerator.generate(credential); - - signature.setKeyInfo(keyInfo); - - LOG.debug("Set Canonicalization Algorithm"); - signature.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); - - // Create a second signature which will be used when signing assertion and response - final Signature signature2 = (Signature) Configuration.getBuilderFactory().getBuilder(Signature.DEFAULT_ELEMENT_NAME).buildObject(Signature.DEFAULT_ELEMENT_NAME); - final SecurityConfiguration secConfiguration2 = Configuration.getGlobalSecurityConfiguration(); - final NamedKeyInfoGeneratorManager keyInfoManager2 = secConfiguration2.getKeyInfoGeneratorManager(); - final KeyInfoGeneratorManager keyInfoGenManager2 = keyInfoManager2.getDefaultManager(); - final KeyInfoGeneratorFactory keyInfoGenFac2 = keyInfoGenManager2.getFactory(credential); - final KeyInfoGenerator keyInfoGenerator2 = keyInfoGenFac2.newInstance(); - - KeyInfo keyInfo2 = keyInfoGenerator2.generate(credential); - signature2.setSigningCredential(credential); - signature2.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256); - signature2.setKeyInfo(keyInfo2); - signature2.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); - - LOG.info("Marshall samlToken."); - String qn = tokenSaml.getElementQName().toString(); - - if (qn.endsWith(CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME)) { - tokenSaml.setSignature(signature); - CustomAttributeQueryMarshaller mars = new CustomAttributeQueryMarshaller(); - mars.marshall(tokenSaml); - Signer.signObject(signature); - } else if (qn.endsWith(Response.DEFAULT_ELEMENT_LOCAL_NAME) && !qn.contains(LogoutResponse.DEFAULT_ELEMENT_LOCAL_NAME)) { - Response res = (Response) tokenSaml; - List asserts = res.getAssertions(); - // If multiple assertions we just sign the response and not the assertion - if (asserts.size() > 1) { - tokenSaml.setSignature(signature); - Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - } - // If single assertion we sign the assertion and response - else { - Assertion assertion = (Assertion) asserts.get(0); - assertion.setSignature(signature); - tokenSaml.setSignature(signature2); - Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - Signer.signObject(signature2); - } - } - // Normally we just sign the total saml response - else { - tokenSaml.setSignature(signature); - Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - } - - } catch (final MarshallingException e) { - LOG.error("MarshallingException"); - throw new SAMLEngineException(e); - } catch (final NoSuchAlgorithmException e) { - LOG.error("A 'xmldsig#rsa-sha1' cryptographic algorithm is requested but is not available in the environment."); - throw new SAMLEngineException(e); - } catch (final KeyStoreException e) { - LOG.error("Generic KeyStore exception."); - throw new SAMLEngineException(e); - } catch (final SignatureException e) { - LOG.error("Signature exception."); - throw new SAMLEngineException(e); - } catch (final SecurityException e) { - LOG.error("Security exception."); - throw new SAMLEngineException(e); - } catch (final CertificateException e) { - LOG.error("Certificate exception."); - throw new SAMLEngineException(e); - } catch (final IOException e) { - LOG.error("IO exception."); - throw new SAMLEngineException(e); - } catch (final UnrecoverableKeyException e) { - LOG.error("UnrecoverableKeyException exception."); - throw new SAMLEngineException(e); - } - - return tokenSaml; - } - - /** - * @see eu.stork.peps.auth.engine.core.SAMLEngineSignI#validateSignature(SignableSAMLObject) - * @param tokenSaml - * the token saml - * @return the SAMLObject validated. - * @throws SAMLEngineException - * exception in validate signature - */ - public SAMLObject validateSignature(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - LOG.info("Start signature validation HW."); - /* - * we are using the soft signature class to validate the signatures. This way we use the same key store code and validation that is used there. - */ - try { - swTrustStore.validateSignature(tokenSaml); - } catch (Exception e) { - LOG.error("SW ValidationException.", e); - throw new SAMLEngineException(e); - } - return tokenSaml; - } - - /** - * load cryptographic service provider. - * - * @throws SAMLEngineException - * the SAML engine exception Note this class was using pkcs11Provider final Provider pkcs11Provider = new sun.security.pkcs11.SunPKCS11(inputStream) if - * (Security.getProperty(pkcs11Provider.getName()) == null) { Security.insertProviderAt(pkcs11Provider, Security .getProviders().length) } storkOwnKeyStore = - * KeyStore.getInstance(properties.getProperty(KEYSTORE_TYPE)) - */ - public void loadCryptServiceProvider() throws SAMLEngineException { - LOG.info("Load Cryptographic Service Provider"); - InputStream inputStream = null; - - try { - inputStream = SignHW.class.getResourceAsStream("/" + properties.getProperty(CONF_FILE)); - final Provider pkcs11Provider = new sun.security.pkcs11.SunPKCS11(inputStream); - if (Security.getProperty(pkcs11Provider.getName()) == null) { - Security.insertProviderAt(pkcs11Provider, Security.getProviders().length); - } - - storkOwnKeyStore = KeyStore.getInstance(properties.getProperty(KEYSTORE_TYPE), pkcs11Provider); - - } catch (final Exception e) { - throw new SAMLEngineException("Error loading CryptographicServiceProvider", e); - } finally { - IOUtils.closeQuietly(inputStream); - } - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignModuleFactory.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignModuleFactory.java deleted file mode 100644 index 66d0201d5..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignModuleFactory.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.engine.core.SAMLEngineSignI; -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -/** - * The Class ModuleSignFactory. - * - * @author fjquevedo - * - */ - -public final class SignModuleFactory { - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(SignModuleFactory.class.getName()); - - /** - * Instantiates a new module sign factory. - */ - private SignModuleFactory() { - - } - - /** - * Gets the single instance of SignModuleFactory. - * - * @param className - * the class name - * - * @return single instance of SignModuleFactory - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static SAMLEngineSignI getInstance(final String className) throws STORKSAMLEngineException { - LOG.info("[START]SignModuleFactory static"); - try { - final Class cls = Class.forName(className); - return (SAMLEngineSignI) cls.newInstance(); - } catch (Exception e) { - throw new STORKSAMLEngineException(e); - } - - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java deleted file mode 100644 index d5f01a4cc..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignP12.java +++ /dev/null @@ -1,493 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.io.ByteArrayInputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.net.URL; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.Provider; -import java.security.Security; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateFactory; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.InvalidPropertiesFormatException; -import java.util.List; -import java.util.Properties; - -import eu.stork.peps.auth.engine.X509PrincipalUtil; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.NotImplementedException; -import org.bouncycastle.jce.X509Principal; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.opensaml.Configuration; -import org.opensaml.common.SAMLObject; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.LogoutResponse; -import org.opensaml.saml2.core.Response; -import org.opensaml.security.SAMLSignatureProfileValidator; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.security.SecurityConfiguration; -import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.security.keyinfo.KeyInfoGenerator; -import org.opensaml.xml.security.keyinfo.KeyInfoGeneratorFactory; -import org.opensaml.xml.security.keyinfo.KeyInfoGeneratorManager; -import org.opensaml.xml.security.keyinfo.NamedKeyInfoGeneratorManager; -import org.opensaml.xml.security.x509.BasicX509Credential; -import org.opensaml.xml.security.trust.ExplicitKeyTrustEvaluator; -import org.opensaml.xml.signature.KeyInfo; -import org.opensaml.xml.signature.Signature; -import org.opensaml.xml.signature.SignatureConstants; -import org.opensaml.xml.signature.SignatureException; -import org.opensaml.xml.signature.SignatureValidator; -import org.opensaml.xml.signature.Signer; -import org.opensaml.xml.util.Base64; -import org.opensaml.xml.validation.ValidationException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; -import eu.stork.peps.auth.engine.core.SAMLEngineSignI; -import eu.stork.peps.exceptions.SAMLEngineException; - -/** - * The Class SWSign. Class responsible for signing and validating of messages SAML with a certificate store software. - * - * @author fjquevedo - */ -public final class SignP12 implements SAMLEngineSignI { - - /** The logger. */ - private static final Logger LOG = LoggerFactory.getLogger(SignP12.class.getName()); - - /** The p12 store. */ - private KeyStore p12Store = null; - - /** The trust store. */ - private KeyStore trustStore = null; - - /** - * Gets the trust store. - * - * @return the trust store - */ - @Override - public KeyStore getTrustStore() { - return trustStore; - } - - /** - * Sets the trust store. - * - * @param newTrustStore - * the new trust store - */ - public void setTrustStore(final KeyStore newTrustStore) { - this.trustStore = newTrustStore; - } - - /** - * The instance. - * - * @return the properties - */ - - public Properties getProperties() { - return properties; - } - - /** - * Gets the p12 store. - * - * @return the p12 store - */ - public KeyStore getP12Store() { - return p12Store; - } - - /** - * Sets the p12 store. - * - * @param newP12Store - * the new p12 store - */ - public void setP12Store(final KeyStore newP12Store) { - this.p12Store = newP12Store; - } - - /** - * Sets the properties. - * - * @param newProperties - * the new properties - */ - public void setProperties(final Properties newProperties) { - this.properties = newProperties; - } - - /** The SW sign prop. */ - private Properties properties = null; - - /** - * Initialize the file configuration. - * - * @param fileConf - * name of the file configuration - * - * @throws SAMLEngineException - * error at the load from file configuration - */ - @Override - public void init(final String fileConf) throws SAMLEngineException { - InputStream fileProperties = null; - properties = new Properties(); - try { - try { - LOG.debug("Loading " + fileConf); - fileProperties = new FileInputStream(fileConf); - properties.loadFromXML(fileProperties); - } catch (Exception e) { - LOG.error("Failed to load external resource. Retrieving internal file."); - fileProperties = SignP12.class.getResourceAsStream("/" + fileConf); - if (fileProperties == null) { - fileProperties = Thread.currentThread().getContextClassLoader().getResourceAsStream(fileConf); - if (fileProperties == null) { - Enumeration files = ClassLoader.getSystemClassLoader().getResources(fileConf); - if (files != null && files.hasMoreElements()) { - LOG.info("Found /s."); - fileProperties = ClassLoader.getSystemClassLoader().getResourceAsStream(files.nextElement().getFile()); - } else { - throw new IOException("Could not load file: " + fileConf, e); - } - } - } - LOG.debug("Recovered " + fileProperties.available() + " bytes"); - properties.loadFromXML(fileProperties); - } - } catch (InvalidPropertiesFormatException e) { - LOG.info("Exception: invalid properties format."); - throw new SAMLEngineException(e); - } catch (IOException e) { - LOG.info("Exception: invalid file: " + fileConf); - throw new SAMLEngineException(e); - } finally { - IOUtils.closeQuietly(fileProperties); - } - } - - /** - * Gets the certificate. - * - * @return the X509Certificate - * - */ - @Override - public X509Certificate getCertificate() { - throw new NotImplementedException(); - } - - /** - * Sign the token SAML. - * - * @param tokenSaml - * token SAML - * - * @return the X509Certificate signed. - * - * @throws SAMLEngineException - * error at sign SAML token - * - */ - @Override - public SAMLObject sign(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - LOG.info("Start Sign process"); - try { - - final String serialNumber = properties.getProperty("serialNumber"); - final String issuer = properties.getProperty("issuer"); - - String alias = null; - String aliasCert; - X509Certificate certificate; - - boolean find = false; - for (final Enumeration e = p12Store.aliases(); e.hasMoreElements() && !find;) { - aliasCert = e.nextElement(); - certificate = (X509Certificate) p12Store.getCertificate(aliasCert); - - final String serialNum = certificate.getSerialNumber().toString(16); - - X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); - X509Principal issuerDNConf = new X509Principal(issuer); - - if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.X509equals(issuerDN, issuerDNConf)) { - alias = aliasCert; - find = true; - } - - } - - certificate = (X509Certificate) p12Store.getCertificate(alias); - final PrivateKey privateKey = (PrivateKey) p12Store.getKey(alias, properties.getProperty("keyPassword").toCharArray()); - - LOG.info("Recover BasicX509Credential."); - final BasicX509Credential credential = new BasicX509Credential(); - - LOG.debug("Load certificate"); - credential.setEntityCertificate(certificate); - - LOG.debug("Load privateKey"); - credential.setPrivateKey(privateKey); - - LOG.debug("Begin signature with openSaml"); - final Signature signature = (Signature) org.opensaml.xml.Configuration.getBuilderFactory().getBuilder(Signature.DEFAULT_ELEMENT_NAME).buildObject(Signature.DEFAULT_ELEMENT_NAME); - - signature.setSigningCredential(credential); - - /* - * signature.setSignatureAlgorithm( SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1); - */ - signature.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256); - - final SecurityConfiguration secConfiguration = org.opensaml.xml.Configuration.getGlobalSecurityConfiguration(); - final NamedKeyInfoGeneratorManager keyInfoManager = secConfiguration.getKeyInfoGeneratorManager(); - final KeyInfoGeneratorManager keyInfoGenManager = keyInfoManager.getDefaultManager(); - final KeyInfoGeneratorFactory keyInfoGenFac = keyInfoGenManager.getFactory(credential); - final KeyInfoGenerator keyInfoGenerator = keyInfoGenFac.newInstance(); - - final KeyInfo keyInfo = keyInfoGenerator.generate(credential); - - signature.setKeyInfo(keyInfo); - signature.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); - - // Create a second signature which will be used when signing assertion and response - final Signature signature2 = (Signature) org.opensaml.xml.Configuration.getBuilderFactory().getBuilder(Signature.DEFAULT_ELEMENT_NAME).buildObject(Signature.DEFAULT_ELEMENT_NAME); - final SecurityConfiguration secConfiguration2 = org.opensaml.xml.Configuration.getGlobalSecurityConfiguration(); - final NamedKeyInfoGeneratorManager keyInfoManager2 = secConfiguration2.getKeyInfoGeneratorManager(); - final KeyInfoGeneratorManager keyInfoGenManager2 = keyInfoManager2.getDefaultManager(); - final KeyInfoGeneratorFactory keyInfoGenFac2 = keyInfoGenManager2.getFactory(credential); - final KeyInfoGenerator keyInfoGenerator2 = keyInfoGenFac2.newInstance(); - - KeyInfo keyInfo2 = keyInfoGenerator2.generate(credential); - signature2.setSigningCredential(credential); - signature2.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256); - signature2.setKeyInfo(keyInfo2); - signature2.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); - - LOG.info("Marshall samlToken."); - String qn = tokenSaml.getElementQName().toString(); - - if (qn.endsWith(CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME)) { - tokenSaml.setSignature(signature); - CustomAttributeQueryMarshaller mars = new CustomAttributeQueryMarshaller(); - mars.marshall(tokenSaml); - Signer.signObject(signature); - } else if (qn.endsWith(Response.DEFAULT_ELEMENT_LOCAL_NAME) && !qn.contains(LogoutResponse.DEFAULT_ELEMENT_LOCAL_NAME)) { - Response res = (Response) tokenSaml; - List asserts = res.getAssertions(); - // If multiple assertions we just sign the response and not the assertion - if (asserts.size() > 1) { - tokenSaml.setSignature(signature); - org.opensaml.xml.Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - } - // If single assertion we sign the assertion and response - else { - Assertion assertion = asserts.get(0); - assertion.setSignature(signature); - tokenSaml.setSignature(signature2); - org.opensaml.xml.Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - Signer.signObject(signature2); - } - } - // Normally we just sign the total saml response - else { - tokenSaml.setSignature(signature); - org.opensaml.xml.Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - } - - } catch (MarshallingException e) { - LOG.error("MarshallingException"); - throw new SAMLEngineException(e); - } catch (NoSuchAlgorithmException e) { - LOG.error("A 'xmldsig#rsa-sha1' cryptographic algorithm is requested but is not available in the environment."); - throw new SAMLEngineException(e); - } catch (KeyStoreException e) { - LOG.error("Generic KeyStore exception."); - throw new SAMLEngineException(e); - } catch (SignatureException e) { - LOG.error("Signature exception."); - throw new SAMLEngineException(e); - } catch (SecurityException e) { - LOG.error("Security exception."); - throw new SAMLEngineException(e); - } catch (UnrecoverableKeyException e) { - LOG.error("UnrecoverableKey exception."); - throw new SAMLEngineException(e); - } - - return tokenSaml; - } - - /** - * Validate signature. - * - * @param tokenSaml - * token SAML - * - * @return the SAMLObject validated. - * - * @throws SAMLEngineException - * error validate signature - * - */ - @Override - public SAMLObject validateSignature(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - LOG.info("Start signature validation."); - try { - - // Validate structure signature - final SAMLSignatureProfileValidator sigProfValidator = new SAMLSignatureProfileValidator(); - try { - // Indicates signature id conform to SAML Signature profile - sigProfValidator.validate(tokenSaml.getSignature()); - } catch (ValidationException e) { - LOG.error("ValidationException: signature isn't conform to SAML Signature profile."); - throw new SAMLEngineException(e); - } - - String aliasCert = null; - X509Certificate certificate; - - final List trustCred = new ArrayList(); - - for (final Enumeration e = trustStore.aliases(); e.hasMoreElements();) { - aliasCert = e.nextElement(); - final BasicX509Credential credential = new BasicX509Credential(); - certificate = (X509Certificate) trustStore.getCertificate(aliasCert); - credential.setEntityCertificate(certificate); - trustCred.add(credential); - } - - final KeyInfo keyInfo = tokenSaml.getSignature().getKeyInfo(); - - final org.opensaml.xml.signature.X509Certificate xmlCert = keyInfo.getX509Datas().get(0).getX509Certificates().get(0); - - final CertificateFactory certFact = CertificateFactory.getInstance("X.509"); - final ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decode(xmlCert.getValue())); - final X509Certificate cert = (X509Certificate) certFact.generateCertificate(bis); - - // Exist only one certificate - final BasicX509Credential entityX509Cred = new BasicX509Credential(); - entityX509Cred.setEntityCertificate(cert); - - /* - * A better use of PKI based validation but not wanted for STORK... boolean trusted = false; - * - * for (final Enumeration e = trustStore.aliases(); e.hasMoreElements();) { aliasCert = e.nextElement(); certificate = (X509Certificate) trustStore.getCertificate(aliasCert); try { - * cert.verify(certificate.getPublicKey()); trusted = true; break; } catch (Exception ex) { //Do nothing - cert not trusted yet } } - * - * if (!trusted) throw new SAMLEngineException("Certificate is not trusted."); - */ - - // Validate trust certificates - final ExplicitKeyTrustEvaluator keyTrustEvaluator = new ExplicitKeyTrustEvaluator(); - if (!keyTrustEvaluator.validate(entityX509Cred, trustCred)) { - throw new SAMLEngineException("Certificate it is not trusted."); - } - - // Validate signature - final SignatureValidator sigValidator = new SignatureValidator(entityX509Cred); - sigValidator.validate(tokenSaml.getSignature()); - - } catch (ValidationException e) { - LOG.error("ValidationException."); - throw new SAMLEngineException(e); - } catch (KeyStoreException e) { - LOG.error("KeyStoreException.", e); - throw new SAMLEngineException(e); - } catch (GeneralSecurityException e) { - LOG.error("GeneralSecurityException.", e); - throw new SAMLEngineException(e); - } - return tokenSaml; - } - - /** - * Load cryptographic service provider. - * - * @throws SAMLEngineException - * the SAML engine exception - */ - @Override - public void loadCryptServiceProvider() throws SAMLEngineException { - LOG.info("Load Cryptographic Service Provider"); - - FileInputStream fis = null; - FileInputStream fisTrustStore = null; - - try { - // Dynamically register Bouncy Castle provider. - boolean found = false; - // Check if BouncyCastle is already registered as a provider - final Provider[] providers = Security.getProviders(); - for (int i = 0; i < providers.length; i++) { - if (providers[i].getName().equals(BouncyCastleProvider.PROVIDER_NAME)) { - found = true; - } - } - - // Register only if the provider has not been previously registered - if (!found) { - LOG.debug("SAMLCore: Register Bouncy Castle provider."); - Security.insertProviderAt(new BouncyCastleProvider(), Security.getProviders().length); - } - - p12Store = KeyStore.getInstance(properties.getProperty("keystoreType")); - - fis = new FileInputStream(properties.getProperty("keystorePath")); - - p12Store.load(fis, properties.getProperty("keyStorePassword").toCharArray()); - - trustStore = KeyStore.getInstance(properties.getProperty("trustStoreType")); - - fisTrustStore = new FileInputStream(properties.getProperty("trustStorePath")); - trustStore.load(fisTrustStore, properties.getProperty("trustStorePassword").toCharArray()); - - } catch (Exception e) { - throw new SAMLEngineException("Error loading CryptographicServiceProvider", e); - } finally { - IOUtils.closeQuietly(fis); - IOUtils.closeQuietly(fisTrustStore); - } - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java deleted file mode 100644 index 59f665449..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/SignSW.java +++ /dev/null @@ -1,488 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ -package eu.stork.peps.auth.engine.core.impl; - -import java.io.ByteArrayInputStream; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.security.GeneralSecurityException; -import java.security.KeyStore; -import java.security.KeyStoreException; -import java.security.NoSuchAlgorithmException; -import java.security.PrivateKey; -import java.security.Provider; -import java.security.Security; -import java.security.UnrecoverableKeyException; -import java.security.cert.CertificateExpiredException; -import java.security.cert.CertificateFactory; -import java.security.cert.CertificateNotYetValidException; -import java.security.cert.X509Certificate; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.InvalidPropertiesFormatException; -import java.util.List; -import java.util.Properties; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.NotImplementedException; -import org.bouncycastle.jce.X509Principal; -import org.bouncycastle.jce.provider.BouncyCastleProvider; -import org.opensaml.Configuration; -import org.opensaml.common.SAMLObject; -import org.opensaml.common.SignableSAMLObject; -import org.opensaml.saml2.core.Assertion; -import org.opensaml.saml2.core.LogoutResponse; -import org.opensaml.saml2.core.Response; -import org.opensaml.security.SAMLSignatureProfileValidator; -import org.opensaml.xml.io.MarshallingException; -import org.opensaml.xml.security.SecurityConfiguration; -import org.opensaml.xml.security.SecurityException; -import org.opensaml.xml.security.credential.Credential; -import org.opensaml.xml.security.keyinfo.KeyInfoGenerator; -import org.opensaml.xml.security.keyinfo.KeyInfoGeneratorFactory; -import org.opensaml.xml.security.keyinfo.KeyInfoGeneratorManager; -import org.opensaml.xml.security.keyinfo.NamedKeyInfoGeneratorManager; -import org.opensaml.xml.security.trust.ExplicitKeyTrustEvaluator; -import org.opensaml.xml.security.trust.ExplicitX509CertificateTrustEvaluator; -import org.opensaml.xml.security.x509.BasicX509Credential; -import org.opensaml.xml.signature.KeyInfo; -import org.opensaml.xml.signature.Signature; -import org.opensaml.xml.signature.SignatureConstants; -import org.opensaml.xml.signature.SignatureException; -import org.opensaml.xml.signature.SignatureValidator; -import org.opensaml.xml.signature.Signer; -import org.opensaml.xml.util.Base64; -import org.opensaml.xml.validation.ValidationException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.engine.X509PrincipalUtil; -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; -import eu.stork.peps.auth.engine.core.SAMLEngineSignI; -import eu.stork.peps.exceptions.SAMLEngineException; - - -/** - * The Class SWSign. Class responsible for signing and validating of messages SAML with a certificate store software. - * - * @author fjquevedo - */ -public class SignSW implements SAMLEngineSignI { - - /** - * The Constant KEYSTORE_TYPE. - */ - private static final String KEYSTORE_TYPE = "keystoreType"; - - /** - * The Constant KEY_STORE_PASSWORD. - */ - private static final String KEY_STORE_PASS = "keyStorePassword"; - - /** - * The logger. - */ - private static final Logger LOG = LoggerFactory.getLogger(SignSW.class.getName()); - - /** - * The stork own key store. - */ - private KeyStore storkOwnKeyStore = null; - - /** - * The instance. - * - * @return the properties - */ - - public final Properties getProperties() { - return properties; - } - - /** - * Gets the stork own key store. - * - * @return the stork own key store - */ - public final KeyStore getStorkOwnKeyStore() { - return storkOwnKeyStore; - } - - /** - * Gets the stork trustStore. - * - * @return the stork own key store - */ - public KeyStore getTrustStore() { - return storkOwnKeyStore; - } - - /** - * Sets the stork own key store. - * - * @param newkOwnKeyStore - * the new stork own key store - */ - public final void setStorkOwnKeyStore(final KeyStore newkOwnKeyStore) { - this.storkOwnKeyStore = newkOwnKeyStore; - } - - /** - * Sets the properties. - * - * @param newProperties - * the new properties - */ - public final void setProperties(final Properties newProperties) { - this.properties = newProperties; - } - - /** - * The SW sign prop. - */ - private Properties properties = null; - - /** - * Inits the file configuration. - * - * @param fileConf - * name of the file configuration - * @throws SAMLEngineException - * error at the load from file configuration - */ - public final void init(final String fileConf) throws SAMLEngineException { - InputStream fileProperties = null; - // fetch base from system properties, give a default if there is nothing configured - String base = System.getProperty("eu.stork.samlengine.config.location"); - if (null != base) { - if (!base.endsWith("/")) { - base += "/"; - } - } else { - base = "/"; - } - - try { - if (null != base) - fileProperties = new FileInputStream(base + fileConf); - else - fileProperties = SignSW.class.getResourceAsStream("/" + fileConf); - properties = new Properties(); - - properties.loadFromXML(fileProperties); - fileProperties.close(); - } catch (InvalidPropertiesFormatException e) { - LOG.info("Exception: invalid properties format."); - throw new SAMLEngineException(e); - } catch (IOException e) { - LOG.info("Exception: invalid file: " + fileConf); - throw new SAMLEngineException(e); - } finally { - IOUtils.closeQuietly(fileProperties); - } - } - - /** - * @return the X509Certificate - * @see eu.stork.peps.auth.engine.core.SAMLEngineSignI#getCertificate() - */ - public final X509Certificate getCertificate() { - throw new NotImplementedException(); - } - - /** - * Sign the token SAML. - * - * @param tokenSaml - * the token SAML. - * @return the SAML object - * @throws SAMLEngineException - * the SAML engine exception - */ - public final SAMLObject sign(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - LOG.info("Start Sign process."); - try { - final String serialNumber = properties.getProperty("serialNumber"); - final String issuer = properties.getProperty("issuer"); - - String alias = null; - String aliasCert; - X509Certificate certificate; - boolean find = false; - - for (final Enumeration e = storkOwnKeyStore.aliases(); e.hasMoreElements() && !find;) { - aliasCert = e.nextElement(); - certificate = (X509Certificate) storkOwnKeyStore.getCertificate(aliasCert); - - final String serialNum = certificate.getSerialNumber().toString(16); - - try { - X509Principal issuerDN = new X509Principal(certificate.getIssuerDN().getName()); - X509Principal issuerDNConf = new X509Principal(issuer); - - if (serialNum.equalsIgnoreCase(serialNumber) && X509PrincipalUtil.X509equals(issuerDN, issuerDNConf)) { - alias = aliasCert; - find = true; - } - - } catch (Exception ex) { - LOG.error("Exception during signing: " + ex.getMessage()); // Added as a workaround for Bouncycastle email error - } - } - if (!find) { - throw new SAMLEngineException("Certificate cannot be found in keystore "); - } - certificate = (X509Certificate) storkOwnKeyStore.getCertificate(alias); - final PrivateKey privateKey = (PrivateKey) storkOwnKeyStore.getKey(alias, properties.getProperty("keyPassword").toCharArray()); - - LOG.info("Recover BasicX509Credential."); - final BasicX509Credential credential = new BasicX509Credential(); - - LOG.debug("Load certificate"); - credential.setEntityCertificate(certificate); - - LOG.debug("Load privateKey"); - credential.setPrivateKey(privateKey); - - LOG.debug("Begin signature with openSaml"); - final Signature signature = (Signature) Configuration.getBuilderFactory().getBuilder(Signature.DEFAULT_ELEMENT_NAME).buildObject(Signature.DEFAULT_ELEMENT_NAME); - - signature.setSigningCredential(credential); - signature.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256); - // signature.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1); - - final SecurityConfiguration secConfiguration = Configuration.getGlobalSecurityConfiguration(); - final NamedKeyInfoGeneratorManager keyInfoManager = secConfiguration.getKeyInfoGeneratorManager(); - final KeyInfoGeneratorManager keyInfoGenManager = keyInfoManager.getDefaultManager(); - final KeyInfoGeneratorFactory keyInfoGenFac = keyInfoGenManager.getFactory(credential); - final KeyInfoGenerator keyInfoGenerator = keyInfoGenFac.newInstance(); - - KeyInfo keyInfo = keyInfoGenerator.generate(credential); - - signature.setKeyInfo(keyInfo); - signature.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); - - // Create a second signature which will be used when signing assertion and response - final Signature signature2 = (Signature) Configuration.getBuilderFactory().getBuilder(Signature.DEFAULT_ELEMENT_NAME).buildObject(Signature.DEFAULT_ELEMENT_NAME); - final SecurityConfiguration secConfiguration2 = Configuration.getGlobalSecurityConfiguration(); - final NamedKeyInfoGeneratorManager keyInfoManager2 = secConfiguration2.getKeyInfoGeneratorManager(); - final KeyInfoGeneratorManager keyInfoGenManager2 = keyInfoManager2.getDefaultManager(); - final KeyInfoGeneratorFactory keyInfoGenFac2 = keyInfoGenManager2.getFactory(credential); - final KeyInfoGenerator keyInfoGenerator2 = keyInfoGenFac2.newInstance(); - - KeyInfo keyInfo2 = keyInfoGenerator2.generate(credential); - signature2.setSigningCredential(credential); - signature2.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256); - // signature2.setSignatureAlgorithm(SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA1); - signature2.setKeyInfo(keyInfo2); - signature2.setCanonicalizationAlgorithm(SignatureConstants.ALGO_ID_C14N_EXCL_OMIT_COMMENTS); - - LOG.info("Marshall samlToken."); - String qn = tokenSaml.getElementQName().toString(); - - if (qn.endsWith(CustomAttributeQuery.DEFAULT_ELEMENT_LOCAL_NAME)) { - tokenSaml.setSignature(signature); - CustomAttributeQueryMarshaller mars = new CustomAttributeQueryMarshaller(); - mars.marshall(tokenSaml); - Signer.signObject(signature); - } else if (qn.endsWith(Response.DEFAULT_ELEMENT_LOCAL_NAME) && !qn.contains(LogoutResponse.DEFAULT_ELEMENT_LOCAL_NAME)) { - Response res = (Response) tokenSaml; - List asserts = res.getAssertions(); - // If multiple assertions we just sign the response and not the assertion - if (asserts.size() > 1) { - tokenSaml.setSignature(signature); - Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - } - // If single assertion we sign the assertion and response - else { - Assertion assertion = (Assertion) asserts.get(0); - assertion.setSignature(signature); - tokenSaml.setSignature(signature2); - Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - Signer.signObject(signature2); - } - } - // Normally we just sign the total saml response - else { - tokenSaml.setSignature(signature); - Configuration.getMarshallerFactory().getMarshaller(tokenSaml).marshall(tokenSaml); - LOG.info("Sign samlToken."); - Signer.signObject(signature); - } - - } catch (MarshallingException e) { - LOG.error("MarshallingException"); - throw new SAMLEngineException(e); - } catch (NoSuchAlgorithmException e) { - LOG.error("A 'xmldsig#rsa-sha1' cryptographic algorithm is requested but is not available in the environment."); - throw new SAMLEngineException(e); - } catch (KeyStoreException e) { - LOG.error("Generic KeyStore exception."); - throw new SAMLEngineException(e); - } catch (SignatureException e) { - LOG.error("Signature exception."); - throw new SAMLEngineException(e); - } catch (SecurityException e) { - LOG.error("Security exception."); - throw new SAMLEngineException(e); - } catch (UnrecoverableKeyException e) { - LOG.error("UnrecoverableKey exception."); - throw new SAMLEngineException(e); - } - - return tokenSaml; - } - - /** - * @param tokenSaml - * token SAML - * @return the SAMLObject validated. - * @throws SAMLEngineException - * error validate signature - * @see eu.stork.peps.auth.engine.core.SAMLEngineSignI#validateSignature(org.opensaml.common.SignableSAMLObject) - */ - public final SAMLObject validateSignature(final SignableSAMLObject tokenSaml) throws SAMLEngineException { - LOG.info("Start signature validation SW."); - try { - - // Validate structure signature - final SAMLSignatureProfileValidator sigProfValidator = new SAMLSignatureProfileValidator(); - try { - // Indicates signature id conform to SAML Signature profile - sigProfValidator.validate(tokenSaml.getSignature()); - } catch (ValidationException e) { - LOG.error("ValidationException: signature isn't conform to SAML Signature profile."); - throw new SAMLEngineException(e); - } - - String aliasCert = null; - X509Certificate certificate; - - final List trustCred = new ArrayList(); - - for (final Enumeration e = storkOwnKeyStore.aliases(); e.hasMoreElements();) { - aliasCert = e.nextElement(); - final BasicX509Credential credential = new BasicX509Credential(); - certificate = (X509Certificate) storkOwnKeyStore.getCertificate(aliasCert); - credential.setEntityCertificate(certificate); - trustCred.add(credential); - } - - final KeyInfo keyInfo = tokenSaml.getSignature().getKeyInfo(); - - final org.opensaml.xml.signature.X509Certificate xmlCert = keyInfo.getX509Datas().get(0).getX509Certificates().get(0); - - final CertificateFactory certFact = CertificateFactory.getInstance("X.509"); - final ByteArrayInputStream bis = new ByteArrayInputStream(Base64.decode(xmlCert.getValue())); - final X509Certificate cert = (X509Certificate) certFact.generateCertificate(bis); - - // Exist only one certificate - final BasicX509Credential entityX509Cred = new BasicX509Credential(); - entityX509Cred.setEntityCertificate(cert); - - try { - cert.checkValidity(); - } catch (CertificateExpiredException exp) { - throw new SAMLEngineException("Certificate expired."); - } catch (CertificateNotYetValidException exp) { - throw new SAMLEngineException("Certificate not yet valid."); - } - - /* - * A better use of PKI based validation but not wanted for STORK... boolean trusted = false; - * - * for (final Enumeration e = storkOwnKeyStore.aliases(); e.hasMoreElements();) { aliasCert = e.nextElement(); certificate = (X509Certificate) - * storkOwnKeyStore.getCertificate(aliasCert); try { cert.verify(certificate.getPublicKey()); trusted = true; break; } catch (Exception ex) { //Do nothing - cert not trusted yet } } - * - * if (!trusted) throw new SAMLEngineException("Certificate is not trusted."); - */ - - // Validate trust certificates - final ExplicitX509CertificateTrustEvaluator chainTrustEvaluator = new ExplicitX509CertificateTrustEvaluator(); - - if (!chainTrustEvaluator.validate(entityX509Cred, trustCred)) { - throw new SAMLEngineException("Certificate is not trusted."); - } - final ExplicitKeyTrustEvaluator keyTrustEvaluator = new ExplicitKeyTrustEvaluator(); - - if (!keyTrustEvaluator.validate(entityX509Cred, trustCred)) { - throw new SAMLEngineException("Certificate is not trusted."); - } - - // Validate signature - final SignatureValidator sigValidator = new SignatureValidator(entityX509Cred); - sigValidator.validate(tokenSaml.getSignature()); - - } catch (ValidationException e) { - LOG.error("ValidationException."); - throw new SAMLEngineException(e); - } catch (KeyStoreException e) { - LOG.error("KeyStoreException.", e); - throw new SAMLEngineException(e); - } catch (GeneralSecurityException e) { - LOG.error("GeneralSecurityException.", e); - throw new SAMLEngineException(e); - } - LOG.info(tokenSaml.getSignatureReferenceID()); - LOG.info("Start signature validation - END."); - return tokenSaml; - } - - /** - * Load cryptographic service provider. - * - * @throws SAMLEngineException - * the SAML engine exception - */ - public final void loadCryptServiceProvider() throws SAMLEngineException { - LOG.info("Load Cryptographic Service Provider"); - FileInputStream fis = null; - try { - // Dynamically register Bouncy Castle provider. - boolean found = false; - // Check if BouncyCastle is already registered as a provider - final Provider[] providers = Security.getProviders(); - for (int i = 0; i < providers.length; i++) { - if (providers[i].getName().equals(BouncyCastleProvider.PROVIDER_NAME)) { - found = true; - } - } - - // Register only if the provider has not been previously registered - if (!found) { - LOG.info("SAMLCore: Register Bouncy Castle provider."); - Security.insertProviderAt(new BouncyCastleProvider(), Security.getProviders().length); - } - - storkOwnKeyStore = KeyStore.getInstance(properties.getProperty(KEYSTORE_TYPE)); - - LOG.info("Loading KeyInfo from keystore file " + properties.getProperty("keystorePath")); - fis = new FileInputStream(properties.getProperty("keystorePath")); - - storkOwnKeyStore.load(fis, properties.getProperty(KEY_STORE_PASS).toCharArray()); - - } catch (Exception e) { - LOG.error("Error loading CryptographicServiceProvider", e); - throw new SAMLEngineException("Error loading CryptographicServiceProvider", e); - } finally { - IOUtils.closeQuietly(fis); - } - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesBuilder.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesBuilder.java deleted file mode 100644 index 332882a03..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesBuilder.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectBuilder; - -import eu.stork.peps.auth.engine.core.SAMLCore; -import eu.stork.peps.auth.engine.core.VIDPAuthenticationAttributes; - -/** - * The Class VIDPAuthenticationAttributesBuilder. - * - * @author fjquevedo - */ -public final class VIDPAuthenticationAttributesBuilder extends AbstractSAMLObjectBuilder { - - /** {@inheritDoc} */ - public VIDPAuthenticationAttributes buildObject() { - return buildObject(SAMLCore.STORK10P_NS.getValue(), VIDPAuthenticationAttributes.DEF_LOCAL_NAME, SAMLCore.STORK10P_PREFIX.getValue()); - } - - /** {@inheritDoc} */ - public VIDPAuthenticationAttributes buildObject(final String namespaceURI, final String localName, final String namespacePrefix) { - return new VIDPAuthenticationAttributesImpl(namespaceURI, localName, namespacePrefix); - } - -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesImpl.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesImpl.java deleted file mode 100644 index bfb85e357..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesImpl.java +++ /dev/null @@ -1,128 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.opensaml.common.impl.AbstractSignableSAMLObject; -import org.opensaml.xml.XMLObject; - -import eu.stork.peps.auth.engine.core.CitizenCountryCode; -import eu.stork.peps.auth.engine.core.SPInformation; -import eu.stork.peps.auth.engine.core.VIDPAuthenticationAttributes; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * The Class VIDPAuthenticationAttributesImpl. - * - * @author fjquevedo - */ -public final class VIDPAuthenticationAttributesImpl extends AbstractSignableSAMLObject implements VIDPAuthenticationAttributes { - - private static final Logger LOGGER = LoggerFactory.getLogger(VIDPAuthenticationAttributesImpl.class.getName()); - /** The citizen country code. */ - private CitizenCountryCode citizenCountryCode; - - /** The SP information. */ - private SPInformation spInformation; - - /** - * Instantiates a new requested attributes implement. - * - * @param namespaceURI - * the namespace URI - * @param elementLocalName - * the element local name - * @param namespacePrefix - * the namespace prefix - */ - protected VIDPAuthenticationAttributesImpl(final String namespaceURI, final String elementLocalName, final String namespacePrefix) { - super(namespaceURI, elementLocalName, namespacePrefix); - } - - /** - * getCitizenCountryCode. - * - * @return the citizen country code - */ - public CitizenCountryCode getCitizenCountryCode() { - return citizenCountryCode; - } - - /** - * getSPInformation - * - * @return the SP information - */ - public SPInformation getSPInformation() { - return spInformation; - } - - /** - * Gets the ordered children. - * - * @return the ordered children - * - */ - public List getOrderedChildren() { - final ArrayList children = new ArrayList(); - - children.add(citizenCountryCode); - children.add(spInformation); - - if (getSignature() != null) { - children.add(getSignature()); - } - - return Collections.unmodifiableList(children); - - } - - /** - * Gets the signature reference id. - * - * @return the signature reference id - * - */ - public String getSignatureReferenceID() { - return null; - } - - /** - * Sets the citizen country code. - * - * @param newCitizenCountryCode - * the new citizen country code - * - */ - public void setCitizenCountryCode(CitizenCountryCode newCitizenCountryCode) { - this.citizenCountryCode = prepareForAssignment(this.citizenCountryCode, newCitizenCountryCode); - } - - /** - * Sets the SP information. - * - * @param newSPInformation - * the new SP information - * - */ - public void setSPInformation(SPInformation newSPInformation) { - this.spInformation = prepareForAssignment(this.spInformation, newSPInformation); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesMarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesMarshaller.java deleted file mode 100644 index 73e0ca6f5..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesMarshaller.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectMarshaller; - -/** - * The Class VIDPAuthenticationAttributesMarshaller. - * - * @author fjquevedo - */ -public class VIDPAuthenticationAttributesMarshaller extends AbstractSAMLObjectMarshaller { - - /** - * Instantiates a new vIDP authentication attributes marshaller. - */ - public VIDPAuthenticationAttributesMarshaller() { - super(); - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesUnmarshaller.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesUnmarshaller.java deleted file mode 100644 index dadf86254..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/VIDPAuthenticationAttributesUnmarshaller.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.impl; - -import org.opensaml.common.impl.AbstractSAMLObjectUnmarshaller; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.UnmarshallingException; - -import eu.stork.peps.auth.engine.core.CitizenCountryCode; -import eu.stork.peps.auth.engine.core.SPInformation; -import eu.stork.peps.auth.engine.core.VIDPAuthenticationAttributes; - -/** - * The Class VIDPAuthenticationAttributesUnmarshaller. - * - * @author fjquevedo - */ -public class VIDPAuthenticationAttributesUnmarshaller extends AbstractSAMLObjectUnmarshaller { - - /** - * Process child element. - * - * @param parentObject - * the parent object - * @param childObject - * the child object - * - * @throws UnmarshallingException - * the unmarshalling exception - * - */ - protected final void processChildElement(final XMLObject parentObject, final XMLObject childObject) throws UnmarshallingException { - final VIDPAuthenticationAttributes vIDPAuthenticationAttr = (VIDPAuthenticationAttributes) parentObject; - - if (childObject instanceof CitizenCountryCode) { - vIDPAuthenticationAttr.setCitizenCountryCode((CitizenCountryCode) childObject); - } else if (childObject instanceof SPInformation) { - vIDPAuthenticationAttr.setSPInformation((SPInformation) childObject); - } else { - super.processChildElement(parentObject, childObject); - } - } -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/package-info.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/package-info.java deleted file mode 100644 index 07db9c9db..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/impl/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -/** - * Implementations of STORK 1.0 core specification types and elements. - */ -package eu.stork.peps.auth.engine.core.impl; \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/package-info.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/package-info.java deleted file mode 100644 index 51745d796..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -/** - * Interfaces for STORK 1.0 core specification types and elements. - */ -package eu.stork.peps.auth.engine.core; \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/CustomAttributeQueryValidator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/CustomAttributeQueryValidator.java deleted file mode 100644 index a4015eed1..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/CustomAttributeQueryValidator.java +++ /dev/null @@ -1,80 +0,0 @@ -package eu.stork.peps.auth.engine.core.validator; - -import org.opensaml.xml.util.DatatypeHelper; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.peps.auth.engine.core.CustomAttributeQuery; - -public class CustomAttributeQueryValidator implements Validator { - - /** - * Validate action. - * - * @param attrQuery - * the attribute query to validate - * - * @throws ValidationException - * the validation exception - */ - public final void validate(final CustomAttributeQuery attrQuery) throws ValidationException { - validateAssertion(attrQuery); - validateSubject(attrQuery); - validateDestination(attrQuery); - } - - /** - * Validate assertion. - * - * @param attrQuery - * the attribute query - * - * @throws ValidationException - * the validation exception - */ - protected final void validateAssertion(final CustomAttributeQuery attrQuery) throws ValidationException { - if (DatatypeHelper.isEmpty(attrQuery.getAssertionConsumerServiceURL())) { - throw new ValidationException("Consumer Service URL must be specified."); - } - } - - /** - * Validate subject - * - * @param query - * the attribute query to validate - * @throws ValidationException - * the validation exception - */ - protected void validateSubject(CustomAttributeQuery query) throws ValidationException { - if (query.getSubject() == null) - throw new ValidationException("Subject is required"); - } - - /** - * Validate the destination - * - * @param query - * the query to validate - * @throws ValidationException - * the validation exception - */ - protected void validateDestination(CustomAttributeQuery query) throws ValidationException { - if (query.getDestination() == null) - throw new ValidationException("Destination is required"); - } - - /** - * Validate the destination - * - * @param query - * the query to validate - * @throws ValidationException - * the validation exception - */ - protected void validateTime(CustomAttributeQuery query) throws ValidationException { - if (query.getIssueInstant().minusMinutes(5).isAfterNow()) - throw new ValidationException("Issue time is in the futue"); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/ExtensionsSchemaValidator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/ExtensionsSchemaValidator.java deleted file mode 100644 index 6a709a7bc..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/ExtensionsSchemaValidator.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.validator; - -import java.util.List; - -import org.opensaml.saml2.common.Extensions; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.peps.auth.engine.core.QAAAttribute; - -/** - * The Class ExtensionsSchemaValidator. - * - * @author fjquevedo - */ -public class ExtensionsSchemaValidator implements Validator { - - /** - * validate the extensions. - * - * @param extensions - * the extensions - * - * @throws ValidationException - * the validation exception - */ - public final void validate(final Extensions extensions) throws ValidationException { - if (extensions.getUnknownXMLObjects() == null || extensions.getUnknownXMLObjects().size() <= 0) { - throw new ValidationException("Extension element is empty or not exist."); - } - - List qaa = extensions.getUnknownXMLObjects(QAAAttribute.DEF_ELEMENT_NAME); - - if (qaa.size() == 1) { - final Validator validatorQaa = new QAAAttributeSchemaValidator(); - validatorQaa.validate((QAAAttribute) qaa.get(0)); - } else { - throw new ValidationException("Extensions must contain only one element QAALevel."); - } - - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/MultipleAssertionResponseValidator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/MultipleAssertionResponseValidator.java deleted file mode 100644 index 9c8c1e6a1..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/MultipleAssertionResponseValidator.java +++ /dev/null @@ -1,93 +0,0 @@ -package eu.stork.peps.auth.engine.core.validator; - -import org.opensaml.saml2.core.Response; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -public class MultipleAssertionResponseValidator implements Validator { - - /** - * Validate action. - * - * @param response - * the response to validate - * - * @throws ValidationException - * the validation exception - */ - public final void validate(final Response response) throws ValidationException { - validateAssertion(response); - validateConsent(response); - validateDestination(response); - validateTime(response); - validateId(response); - } - - /** - * Validate assertion. - * - * @param response - * the attribute query - * - * @throws ValidationException - * the validation exception - */ - protected final void validateAssertion(final Response response) throws ValidationException { - if (response.getAssertions() == null || response.getAssertions().size() < 2) { - throw new ValidationException("Multiple assertions must be specified."); - } - } - - /** - * Validate the Consent - * - * @param response - * the response to validate - * @throws ValidationException - * the validation exception - */ - protected void validateConsent(Response response) throws ValidationException { - if (response.getConsent() == null) - throw new ValidationException("Consent is required"); - } - - /** - * Validate the destination - * - * @param response - * the response to validate - * @throws ValidationException - * the validation exception - */ - protected void validateDestination(Response response) throws ValidationException { - if (response.getDestination() == null) - throw new ValidationException("Destination is required"); - } - - /** - * Validate issue times - * - * @param response - * the response to validate - * @throws ValidationException - * the validation exception - */ - protected void validateTime(Response response) throws ValidationException { - if (response.getIssueInstant().minusMinutes(5).isAfterNow()) - throw new ValidationException("Issue time is in the futue"); - } - - /** - * Validate ids - * - * @param response - * the response to validate - * @throws ValidationException - * the validation exception - */ - protected void validateId(Response response) throws ValidationException { - if (response.getID() == null || response.getInResponseTo() == null) - throw new ValidationException("Id and response id is required"); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/QAAAttributeSchemaValidator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/QAAAttributeSchemaValidator.java deleted file mode 100644 index 04ff153d3..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/QAAAttributeSchemaValidator.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.auth.engine.core.validator; - -import org.opensaml.xml.util.DatatypeHelper; -import org.opensaml.xml.validation.ValidationException; -import org.opensaml.xml.validation.Validator; - -import eu.stork.peps.auth.engine.core.QAAAttribute; - -/** - * The Class QAAAttributeSchemaValidator. - * - * @author fjquevedo - */ -public class QAAAttributeSchemaValidator implements Validator { - - /** - * Validate action. - * - * @param qaa - * the quality authentication assurance level attribute - * - * @throws ValidationException - * the validation exception - */ - public final void validate(final QAAAttribute qaa) throws ValidationException { - validateAction(qaa); - } - - /** - * Validate action. - * - * @param qaaAttribute - * the quality authentication assurance level attribute. - * - * @throws ValidationException - * the validation exception - */ - protected final void validateAction(final QAAAttribute qaaAttribute) throws ValidationException { - if (DatatypeHelper.isEmpty(qaaAttribute.getQaaLevel())) { - throw new ValidationException("QAALevel label must be specified."); - } - int qaa = 0; - try { - qaa = Integer.valueOf(qaaAttribute.getQaaLevel()); - } catch (Exception e) { - throw new ValidationException("QAALevel is not a valid number!"); - } - - if (qaa < QAAAttribute.MIN_VALUE || qaa > QAAAttribute.MAX_VALUE) { - throw new ValidationException("QAALevel label must be greater than 0."); - } - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/package-info.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/package-info.java deleted file mode 100644 index 07b632773..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/core/validator/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -/** - * Validation rules for STORK 1.0 core types and elements. - */ -package eu.stork.peps.auth.engine.core.validator; \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/package-info.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/package-info.java deleted file mode 100644 index 30130b7f6..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/auth/engine/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -/** - * Provides the classes necessary to create a SAML message. - */ -package eu.stork.peps.auth.engine; \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java deleted file mode 100644 index e513c6add..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationCreator.java +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ -package eu.stork.peps.configuration; - -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashMap; -import java.util.InvalidPropertiesFormatException; -import java.util.Map; -import java.util.Properties; - -import org.apache.commons.io.IOUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -/** - * The Class InstanceCreator. - * - * @author fjquevedo - */ -public final class ConfigurationCreator { - - /** - * The Constant LOGGER. - */ - private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationCreator.class.getName()); - - /** - * Creates the configuration. - * - * @param instanceConfs - * the instance configuration - * @return the map< string, map< string, object>> - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public static Map> createConfiguration(final Map instanceConfs) throws STORKSAMLEngineException { - - final HashMap> instances = new HashMap>(); - - LOGGER.info("Create configuration."); - try { - // Only create instances for SAMLEngine configuration. - // INSTANCE - for (Map.Entry entry : instanceConfs.entrySet()) { - final InstanceEngine iEngine = entry.getValue(); - - final Map intance = new HashMap(); - - // CONFIGURATION - for (ConfigurationEngine configuration : iEngine.getConfiguration()) { - // Properties only for configuration SamlEngine. - if (configuration.getName().equalsIgnoreCase("SamlEngineConf")) { - intance.put(configuration.getName(), getNewInstance(configuration.getParameters().get("fileConfiguration"))); - } else { - intance.put(configuration.getName(), configuration.getParameters()); - } - } - instances.put(entry.getKey(), intance); - } - } catch (STORKSAMLEngineException ex) { - LOGGER.error("Can not create instance from file configuration."); - throw new STORKSAMLEngineException(ex); - } - return instances; - } - - /** - * Gets the new instance. - * - * @param fileName - * the file name - * @return the properties from the new instance - * @throws STORKSAMLEngineException - * the STORKSAML engine runtime exception - */ - private static Properties getNewInstance(final String fileName) throws STORKSAMLEngineException { - LOGGER.info("Create file configuration properties to Stork Saml Engine: " + fileName); - InputStream fileEngineProp = null; - - // fetch base from system properties, give a default if there is nothing configured - String base = System.getProperty("eu.stork.samlengine.config.location"); - if (null != base) { - if (!base.endsWith("/")) { - base += "/"; - } - } else { - base = "/"; - } - - LOGGER.info("Create file configuration properties to Stork Saml Engine: " + base + fileName); - - try { - - if (null != base) - fileEngineProp = new FileInputStream(base + fileName); - else - fileEngineProp = ConfigurationCreator.class.getResourceAsStream(base + fileName); - - final Properties configuration = new Properties(); - configuration.loadFromXML(fileEngineProp); - return configuration; - } catch (InvalidPropertiesFormatException e) { - LOGGER.error("Invalid properties format: " + fileName); - throw new STORKSAMLEngineException(e); - } catch (IOException e) { - LOGGER.error("Error read file: " + fileName); - throw new STORKSAMLEngineException(e); - } finally { - IOUtils.closeQuietly(fileEngineProp); - } - } - - /** - * Instantiates a new instance creator. - */ - private ConfigurationCreator() { - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationEngine.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationEngine.java deleted file mode 100644 index 9dbed386e..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationEngine.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.configuration; - -import java.util.Map; - -/** - * The Class ConfigurationEngine. - * - * @author fjquevedo - */ -public class ConfigurationEngine { - - /** The name of the configuration file. */ - private String name; - - /** The parameters. */ - private Map parameters; - - /** - * Gets the name. - * - * @return the name - */ - public final String getName() { - return name; - } - - /** - * Gets the parameters. - * - * @return the parameters - */ - public final Map getParameters() { - return parameters; - } - - /** - * Sets the name. - * - * @param newName - * the new name - */ - public final void setName(final String newName) { - this.name = newName; - } - - /** - * Sets the parameters. - * - * @param newParameters - * the parameters - */ - public final void setParameters(final Map newParameters) { - this.parameters = newParameters; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationReader.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationReader.java deleted file mode 100644 index f68060154..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationReader.java +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.configuration; - -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashMap; -import java.util.Map; - -import javax.xml.XMLConstants; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; -import org.xml.sax.SAXException; - -import eu.stork.peps.exceptions.SAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineRuntimeException; - -/** - * The Class ConfigurationReader. - * - * @author fjquevedo - */ -public final class ConfigurationReader { - - /** The Constant SAML_ENGINE_CONFIGURATION_FILE. */ - private static final String ENGINE_CONF_FILE = "SamlEngine.xml"; - - /** The Constant LOGGER. */ - private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationReader.class.getName()); - - /** The Constant NODE_CONFIGURATION. */ - private static final String NODE_CONF = "configuration"; - - /** The Constant NODE_CONFIGURATION_NAME. */ - private static final String NODE_CONF_NAME = "name"; - - /** The Constant NODE_INSTANCE_NAME. */ - private static final String NODE_INST_NAME = "name"; - - /** The Constant NODE_INSTANCE. */ - private static final String NODE_INSTANCE = "instance"; - - /** The Constant NODE_CONFIGURATION_NAME. */ - private static final String NODE_PARAM_NAME = "name"; - - /** The Constant NODE_CONFIGURATION_NAME. */ - private static final String NODE_PARAM_VALUE = "value"; - - /** The Constant NODE_CONFIGURATION_NAME. */ - private static final String NODE_PARAMETER = "parameter"; - - /** - * Generate parameters. - * - * @param configurationNode - * the configuration node - * - * @return the map< string, string> - */ - private static Map generateParam(final Element configurationNode) { - - final HashMap parameters = new HashMap(); - - final NodeList parameterNodes = configurationNode.getElementsByTagName(NODE_PARAMETER); - - String parameterName; - String parameterValue; - - for (int k = 0; k < parameterNodes.getLength(); ++k) { - // for every parameter find, process. - final Element parameterNode = (Element) parameterNodes.item(k); - parameterName = parameterNode.getAttribute(NODE_PARAM_NAME); - parameterValue = parameterNode.getAttribute(NODE_PARAM_VALUE); - - // verified the content. - if (StringUtils.isBlank(parameterName) || StringUtils.isBlank(parameterValue)) { - throw new STORKSAMLEngineRuntimeException("Error reader parameters (name - value)."); - } else { - parameters.put(parameterName.trim(), parameterValue.trim()); - } - } - return parameters; - } - - /** - * Read configuration. - * - * @return the map< string, instance engine> - * - * @throws SAMLEngineException - * the STORKSAML engine runtime exception - */ - public static Map readConfiguration() throws SAMLEngineException { - - // fetch base from system properties, give a default if there is nothing configured - String base = System.getProperty("eu.stork.samlengine.config.location"); - if (null != base) - if (!base.endsWith("/")) - base += "/"; - - LOGGER.info("Init reader: " + base + ENGINE_CONF_FILE); - final Map instanceConfs = new HashMap(); - - Document document = null; - // Load configuration file - final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder; - - InputStream engineConf = null; - try { - - factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); - - builder = factory.newDocumentBuilder(); - - if (null != base) - engineConf = new FileInputStream(base + ENGINE_CONF_FILE); - else - engineConf = ConfigurationReader.class.getResourceAsStream("/" + ENGINE_CONF_FILE); - - document = builder.parse(engineConf); - - // Read instance - final NodeList list = document.getElementsByTagName(NODE_INSTANCE); - - for (int indexElem = 0; indexElem < list.getLength(); ++indexElem) { - final Element element = (Element) list.item(indexElem); - - final InstanceEngine instanceConf = new InstanceEngine(); - - // read every configuration. - final String instanceName = element.getAttribute(NODE_INST_NAME); - - if (StringUtils.isBlank(instanceName)) { - throw new STORKSAMLEngineRuntimeException("Error reader instance name."); - } - instanceConf.setName(instanceName.trim()); - - final NodeList confNodes = element.getElementsByTagName(NODE_CONF); - - for (int indexNode = 0; indexNode < confNodes.getLength(); ++indexNode) { - - final Element configurationNode = (Element) confNodes.item(indexNode); - - final String configurationName = configurationNode.getAttribute(NODE_CONF_NAME); - - if (StringUtils.isBlank(configurationName)) { - throw new STORKSAMLEngineRuntimeException("Error reader configuration name."); - } - - final ConfigurationEngine confSamlEngine = new ConfigurationEngine(); - - // Set configuration name. - confSamlEngine.setName(configurationName.trim()); - - // Read every parameter for this configuration. - final Map parameters = generateParam(configurationNode); - - // Set parameters - confSamlEngine.setParameters(parameters); - - // Add parameters to the configuration. - instanceConf.getConfiguration().add(confSamlEngine); - } - - // Add to the list of configurations. - instanceConfs.put(element.getAttribute(NODE_INST_NAME), instanceConf); - } - - } catch (SAXException e) { - LOGGER.error("Error: init library parser."); - throw new SAMLEngineException(e); - } catch (ParserConfigurationException e) { - LOGGER.error("Error: parser configuration file xml."); - throw new SAMLEngineException(e); - } catch (IOException e) { - LOGGER.error("Error: read configuration file."); - throw new SAMLEngineException(e); - } finally { - IOUtils.closeQuietly(engineConf); - } - - return instanceConfs; - } - - /** - * Instantiates a new configuration reader. - */ - private ConfigurationReader() { - - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationSingleton.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationSingleton.java deleted file mode 100644 index 4a382fe99..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/ConfigurationSingleton.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.configuration; - -import java.util.Map; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.exceptions.SAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineException; -import eu.stork.peps.exceptions.STORKSAMLEngineRuntimeException; - -/** - * The Class InstanceCreator. - * - * @author fjquevedo - */ -public final class ConfigurationSingleton { - - /** The instance of every engine SAML. */ - private static Map instanceConfigs; - - /** The instances of SAML engine. */ - private static Map> instances; - - /** The Constant LOGGER. */ - private static final Logger LOGGER = LoggerFactory.getLogger(ConfigurationSingleton.class.getName()); - - static { - LOGGER.debug("Read all file configurations. (instances of SAMLEngine)"); - try { - instanceConfigs = ConfigurationReader.readConfiguration(); - } catch (SAMLEngineException e) { - LOGGER.error("Error read configuration file."); - throw new STORKSAMLEngineRuntimeException(e); - } - } - - /** - * Gets the new instance. - * - * @param fileName - * the file name - * - * @return the properties from the new instance - * - * @throws STORKSAMLEngineException - * the STORKSAML engine runtime exception - */ - private static Map> getInstance(final String fileName) throws STORKSAMLEngineException { - return ConfigurationCreator.createConfiguration(instanceConfigs); - } - - /** - * Instantiates a new instance creator. - */ - private ConfigurationSingleton() { - } - -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/InstanceEngine.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/InstanceEngine.java deleted file mode 100644 index 0343d915a..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/InstanceEngine.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.configuration; - -import java.util.ArrayList; -import java.util.List; - -/** - * The Class InstanceConfiguration. - * - * @author fjquevedo - */ -public class InstanceEngine { - - /** The configuration. */ - private List configuration = new ArrayList(); - - /** The name. */ - private String name; - - /** - * Gets the parameters. - * - * @return the parameters - */ - public final List getConfiguration() { - return this.configuration; - } - - /** - * Gets the name. - * - * @return the name - */ - public final String getName() { - return name; - } - - /** - * Sets the parameters. - * - * @param newConfiguration - * the new parameters - */ - public final void setConfiguration(final List newConfiguration) { - this.configuration = newConfiguration; - } - - /** - * Sets the name. - * - * @param newName - * the new name - */ - public final void setName(final String newName) { - this.name = newName; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/package-info.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/package-info.java deleted file mode 100644 index e6676342d..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/configuration/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -/** - * Provides the classes necessary to create a SAML message instance. - */ -package eu.stork.peps.configuration; - diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/SAMLEngineException.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/SAMLEngineException.java deleted file mode 100644 index cc3bf3676..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/SAMLEngineException.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.exceptions; - -/** - * The Class SAMLEngineException. - * - * @author fjquevedo - */ -public class SAMLEngineException extends Exception { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 2611361164977849837L; - - /** - * Instantiates a new SAMLEngine exception. - * - * @param wrappedException - * the wrapped exception - */ - public SAMLEngineException(final Exception wrappedException) { - super(wrappedException); - } - - /** - * Instantiates a new SAMLEngine exception. - * - * @param message - * the message - */ - public SAMLEngineException(final String message) { - super(message); - } - - /** - * Instantiates a new SAMLEngine exception. - * - * @param message - * the message - * @param wrappedException - * the wrapped exception - */ - public SAMLEngineException(final String message, final Exception wrappedException) { - super(message, wrappedException); - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/STORKSAMLEngineException.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/STORKSAMLEngineException.java deleted file mode 100644 index d0d9d721d..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/STORKSAMLEngineException.java +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.exceptions; - -/** - * The Class STORKSAMLEngineException. - * - * @author fjquevedo - */ -public class STORKSAMLEngineException extends Exception { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = -8319723167019122930L; - - /** The error code. */ - private String errorCode; - - /** The error detail. */ - private String errorDetail; - - /** - * Instantiates a new sTORKSAML engine exception. - * - * @param wrappedException - * the wrapped exception - */ - public STORKSAMLEngineException(final Exception wrappedException) { - super(wrappedException); - } - - /** - * Instantiates a new sTORKSAML engine exception. - * - * @param errorMessage - * the error message - */ - public STORKSAMLEngineException(final String errorMessage) { - super(errorMessage); - } - - /** - * Instantiates a new sTORKSAML engine exception. - * - * @param message - * the message - * @param wrappedException - * the wrapped exception - */ - public STORKSAMLEngineException(final String message, final Exception wrappedException) { - super(message, wrappedException); - } - - /** - * Instantiates a new sTORKSAML engine exception. - * - * @param newErrorCode - * the error code - * @param errorMessage - * the error message - * @param newErrorDetail - * the error detail - */ - public STORKSAMLEngineException(final String newErrorCode, final String errorMessage, final String newErrorDetail) { - super(errorMessage); - this.errorCode = newErrorCode; - this.errorDetail = newErrorDetail; - } - - /** - * Gets the error code. - * - * @return the error code - */ - public final String getErrorCode() { - return this.errorCode; - } - - /** - * Gets the error detail. - * - * @return the error detail - */ - public final String getErrorDetail() { - return errorDetail; - } - - /** - * Gets the error message. - * - * @return the error message - */ - public final String getErrorMessage() { - return super.getMessage(); - } - - /** - * Gets the message. - * - * @return the message of the exception. - * - * @see java.lang.Throwable#getMessage() - */ - public final String getMessage() { - return "Error (no. " + errorCode + ") processing request : " + super.getMessage(); - } - - /** - * Sets the error code. - * - * @param newErrorCode - * the new error code - */ - public final void setErrorCode(final String newErrorCode) { - this.errorCode = newErrorCode; - } - - /** - * Sets the error detail. - * - * @param newErrorDetail - * the new error detail - */ - public final void setErrorDetail(final String newErrorDetail) { - this.errorDetail = newErrorDetail; - } - -} diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/STORKSAMLEngineRuntimeException.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/STORKSAMLEngineRuntimeException.java deleted file mode 100644 index f43c1bd78..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/STORKSAMLEngineRuntimeException.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.exceptions; - -/** - * The Class STORKSAMLEngineRuntimeException. - * - * @author fjquevedo - */ -public class STORKSAMLEngineRuntimeException extends RuntimeException { - - /** The Constant serialVersionUID. */ - private static final long serialVersionUID = 5829810358581493517L; - - /** - * Instantiates a new sTORKSAML engine runtime exception. - * - * @param wrappedException - * the wrapped exception - */ - public STORKSAMLEngineRuntimeException(final Exception wrappedException) { - super(wrappedException); - } - - /** - * Creates a new instance of application exception. - * - * @param cause - * the exception cause. - */ - public STORKSAMLEngineRuntimeException(final String cause) { - super(cause); - } - - /** - * Instantiates a new sTORKSAML engine runtime exception. - * - * @param message - * the message - * @param wrappedException - * the wrapped exception - */ - public STORKSAMLEngineRuntimeException(final String message, final Exception wrappedException) { - super(message, wrappedException); - } -} \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/package-info.java b/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/package-info.java deleted file mode 100644 index 0c7341995..000000000 --- a/id/server/stork2-saml-engine/src/main/java/eu/stork/peps/exceptions/package-info.java +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -/** - * Provides the classes for STORK exceptions management. - */ -package eu.stork.peps.exceptions; \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/SSETestUtils.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/SSETestUtils.java deleted file mode 100644 index b421dce8c..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/SSETestUtils.java +++ /dev/null @@ -1,173 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.test.simple; - -import java.io.IOException; -import java.io.InputStream; -import java.io.StringWriter; - -import javax.xml.XMLConstants; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.apache.commons.io.IOUtils; -import org.bouncycastle.util.encoders.Base64; -import org.opensaml.Configuration; -import org.opensaml.xml.XMLObject; -import org.opensaml.xml.io.Marshaller; -import org.opensaml.xml.io.MarshallerFactory; -import org.opensaml.xml.io.MarshallingException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -/** - * The Class SSETestUtils. - */ -public final class SSETestUtils { - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(SSETestUtils.class.getName()); - - /** - * Instantiates a new sSE test utils. - */ - private SSETestUtils() { - } - - /** - * Prints the tree DOM. - * - * @param samlToken - * the SAML token - * @param isIndent - * the is indent - * - * @return the string - * @throws TransformerException - * the exception - */ - public static String printTreeDOM(final Element samlToken, final boolean isIndent) throws TransformerException { - // set up a transformer - final TransformerFactory transfac = TransformerFactory.newInstance(); - final Transformer trans = transfac.newTransformer(); - trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - trans.setOutputProperty(OutputKeys.INDENT, String.valueOf(isIndent)); - - // create string from XML tree - final StringWriter stringWriter = new StringWriter(); - final StreamResult result = new StreamResult(stringWriter); - final DOMSource source = new DOMSource(samlToken); - trans.transform(source, result); - final String xmlString = stringWriter.toString(); - - return xmlString; - } - - /** - * Marshall. - * - * @param samlToken - * the SAML token - * - * @return the byte[] - * - * @throws MarshallingException - * the marshalling exception - * @throws ParserConfigurationException - * the parser configuration exception - * @throws TransformerException - * the transformer exception - */ - public static byte[] marshall(final XMLObject samlToken) throws MarshallingException, ParserConfigurationException, TransformerException { - - final javax.xml.parsers.DocumentBuilderFactory dbf = javax.xml.parsers.DocumentBuilderFactory.newInstance(); - dbf.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true); - dbf.setNamespaceAware(true); - dbf.setIgnoringComments(true); - final javax.xml.parsers.DocumentBuilder docBuild = dbf.newDocumentBuilder(); - - // Get the marshaller factory - final MarshallerFactory marshallerFactory = Configuration.getMarshallerFactory(); - - // Get the Subject marshaller - final Marshaller marshaller = marshallerFactory.getMarshaller(samlToken); - - final Document doc = docBuild.newDocument(); - - // Marshall the SAML token - marshaller.marshall(samlToken, doc); - - // Obtain a byte array representation of the marshalled SAML object - final DOMSource domSource = new DOMSource(doc); - final StringWriter writer = new StringWriter(); - final StreamResult result = new StreamResult(writer); - final TransformerFactory transFact = TransformerFactory.newInstance(); - final Transformer transformer = transFact.newTransformer(); - transformer.transform(domSource, result); - - return writer.toString().getBytes(); - } - - /** - * Encode SAML token. - * - * @param samlToken - * the SAML token - * - * @return the string - */ - public static String encodeSAMLToken(final byte[] samlToken) { - return new String(Base64.encode(samlToken)); - } - - /** - * Read stork SAML from file. - * - * @param resource - * the resource - * - * @return the byte[] - * @throws IOException - * the exception - * - */ - public static byte[] readStorkSamlFromFile(final String resource) throws IOException { - InputStream inputStream = null; - byte[] bytes; - - try { - inputStream = StorkAuthRequestTest.class.getResourceAsStream(resource); - - // Create the byte array to hold the data - bytes = new byte[(int) inputStream.available()]; - inputStream.read(bytes); - } catch (IOException e) { - LOG.error("Error read from file: " + resource); - throw e; - } finally { - IOUtils.closeQuietly(inputStream); - } - return bytes; - - } -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/SimpleBaseTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/SimpleBaseTest.java deleted file mode 100644 index bdb8780c3..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/SimpleBaseTest.java +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.test.simple; - -import org.junit.Test; - -import junit.framework.Assert; -import junit.framework.TestCase; -import eu.stork.peps.auth.engine.STORKSAMLEngine; - -/** - * The Class SimpleBaseTest. Defines a set of test the initialization of the SAML engine. - */ -@SuppressWarnings("deprecation") -public class SimpleBaseTest extends TestCase { - - /** - * Test SAML engine correct configuration name. - */ - - @Test - public final void testSamlEngineCorrectInit() { - Assert.assertNotNull(STORKSAMLEngine.getInstance("CONF1")); - } - - /** - * Test SAML engine error configuration name. - */ - @Test - public final void testSamlEngineErrorNameConf() { - Assert.assertNull(STORKSAMLEngine.getInstance("CONF_ERROR")); - } - - /** - * Test SAML engine error name null. - */ - @Test - public final void testSamlEngineErrorNameNull() { - Assert.assertNull(STORKSAMLEngine.getInstance(null)); - } - - /** - * Test SAML engine correct name configuration with spaces. - */ - @Test - public final void testSamlEngineErrorNameSpaces() { - Assert.assertNotNull(STORKSAMLEngine.getInstance(" CONF1 ")); - } - -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java deleted file mode 100644 index 4f22df7fb..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryRequestTest.java +++ /dev/null @@ -1,852 +0,0 @@ -package eu.stork.peps.test.simple; - -import static org.junit.Assert.*; - -import java.io.*; -import java.util.ArrayList; -import java.util.Arrays; - -import org.junit.Ignore; -import org.junit.Test; -import org.opensaml.xml.parse.BasicParserPool; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKAttrQueryRequest; -import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -public class StorkAttrQueryRequestTest { - - /** The engines. */ - private static STORKSAMLEngine engine = STORKSAMLEngine.getInstance("CONF1"); - private static STORKSAMLEngine engine0 = STORKSAMLEngine.getInstance("CONF0"); - private static STORKSAMLEngine engine2 = STORKSAMLEngine.getInstance("CONF2"); - private static STORKSAMLEngine engine3 = STORKSAMLEngine.getInstance("CONF3"); - - /** - * Instantiates a new stork authentication request test. - */ - public StorkAttrQueryRequestTest() { - pal = new PersonalAttributeList(); - - final PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(true); - final ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - pal.add(isAgeOver); - - final PersonalAttribute dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - pal.add(dateOfBirth); - - final PersonalAttribute eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - eIDNumber.setValue(Arrays.asList("ES/IS/1234567890")); - pal.add(eIDNumber); - - final PersonalAttribute givenName = new PersonalAttribute(); - givenName.setName("givenName"); - givenName.setIsRequired(true); - givenName.setValue(Arrays.asList("Sveinbjorn")); - pal.add(givenName); - - final PersonalAttribute fiscalNumber = new PersonalAttribute(); - fiscalNumber.setName("fiscalNumber"); - fiscalNumber.setIsRequired(true); - fiscalNumber.setValue(Arrays.asList("fiscalNumber")); - pal.add(fiscalNumber); - - final PersonalAttribute LPFiscalNumber = new PersonalAttribute(); - LPFiscalNumber.setName("LPFiscalNumber"); - LPFiscalNumber.setIsRequired(true); - LPFiscalNumber.setValue(Arrays.asList("LPFiscalNumber")); - pal.add(LPFiscalNumber); - - destination = "http://A-PEPS.gov.xx/PEPS/AttributeColleagueRequest"; - assertConsumerUrl = "http://S-PEPS.gov.xx/PEPS/ColleagueResponse"; - // spName = "University of Oxford"; - spSector = "EDU001"; - spInstitution = "OXF001"; - spApplication = "APP001"; - spCountry = "IS"; - - spId = "EDU001-OXF001-APP001"; - - } - - /** The destination. */ - private String destination; - - /** The service provider sector. */ - private String spSector; - - /** The service provider institution. */ - private String spInstitution; - - /** The service provider application. */ - private String spApplication; - - /** The service provider country. */ - private String spCountry; - - /** The service provider id. */ - private String spId; - - /** The assertion consumer URL. */ - private String assertConsumerUrl; - - /** The quality authentication assurance level. */ - private static final int QAAL = 3; - - /** The List of Personal Attributes. */ - private IPersonalAttributeList pal; - - /** The attribute query request. */ - private static byte[] attrRequest; - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(StorkAttrQueryRequestTest.class.getName()); - - /** Parser manager used to parse XML. */ - private static BasicParserPool parser; - - static { - parser = new BasicParserPool(); - parser.setNamespaceAware(true); - } - - /** - * Test generate authentication request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAttrQueryRequest() throws STORKSAMLEngineException { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - - // new parameters - request.setEIDSectorShare(false); - request.setEIDCrossSectorShare(false); - request.setEIDCrossBorderShare(false); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - request.setSpCountry(spCountry); - - STORKAttrQueryRequest req1 = engine0.generateSTORKAttrQueryRequest(request); - byte[] reqByte = req1.getTokenSaml(); - FileOutputStream output = null; - - try { - output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml")); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(reqByte); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - LOG.info("STORKAttrQueryRequest 1: " + SSETestUtils.encodeSAMLToken(engine.generateSTORKAttrQueryRequest(request).getTokenSaml())); - - request.setCitizenCountryCode("IS"); - LOG.info("STORKAttrQueryRequest 2: " + SSETestUtils.encodeSAMLToken(engine.generateSTORKAttrQueryRequest(request).getTokenSaml())); - } - - /** - * Test generate authentication request error personal attribute name error. - */ - @Test - public final void testGenerateAttrQueryRequestPALsErr1() { - - final IPersonalAttributeList palWrong = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("attrNotValid"); - worngAttr.setIsRequired(true); - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(palWrong); - - // news parameters - request.setEIDSectorShare(false); - request.setEIDCrossSectorShare(false); - request.setEIDCrossBorderShare(false); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - engine.generateSTORKAttrQueryRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request error personal attribute value error. - */ - @Test - public final void testGenerateAttrQueryRequestPALsErr2() { - - final IPersonalAttributeList palWrong = new PersonalAttributeList(); - - final PersonalAttribute attrNotValid = new PersonalAttribute(); - attrNotValid.setName("attrNotValid"); - attrNotValid.setIsRequired(true); - palWrong.add(attrNotValid); - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(palWrong); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - engine.generateSTORKAttrQueryRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request authentication assurance level negative value. - */ - @Test - public final void testGenerateAttrQueryRequestQaalErr1() { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(-1); - request.setPersonalAttributeList(pal); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - - try { - engine.generateSTORKAttrQueryRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request service provider sector null. - */ - @Test - public final void testGenerateAttrQueryRequestSectorErr() { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(null); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - engine.generateSTORKAttrQueryRequest(request); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - - } - } - - /** - * Test generate authentication request service provider institution null. - */ - @Test - public final void testGenerateAttrQueryRequestDestinationErr() { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(null); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(null); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - engine.generateSTORKAttrQueryRequest(request); - fail("generateSTORKAttrQueryRequest(...) should've thrown an STORKSAMLEngineException!"); - - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request service provider application null. - */ - @Test - public final void testGenerateAttrQueryRequestApplicationErr() { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(null); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - engine.generateSTORKAttrQueryRequest(request); - - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } - } - - /** - * Test generate authentication request service provider country null. - */ - @Test - public final void testGenerateAttrQueryRequestCountryErr() { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(null); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - engine.generateSTORKAttrQueryRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request error with quality authentication assurance level wrong. - */ - @Test - public final void testGenerateAttrQueryRequestQaalErr2() { - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(0); - request.setPersonalAttributeList(pal); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - engine.generateSTORKAttrQueryRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request personal attribute list null value. - */ - @Test - public final void testGenerateAttrQueryRequestPALErr1() { - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(null); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - engine.generateSTORKAttrQueryRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication request null parameter. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAttrQueryRequestNullParam() throws STORKSAMLEngineException { - try { - engine.validateSTORKAttrQueryRequest(null); - fail("validateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication request error bytes encode. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAttrQueryRequestErrorEncode() throws STORKSAMLEngineException { - try { - engine.validateSTORKAttrQueryRequest("messageError".getBytes()); - fail("validateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAttrQueryRequest() throws STORKSAMLEngineException { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - attrRequest = engine.generateSTORKAttrQueryRequest(request).getTokenSaml(); - - final STORKAttrQueryRequest validatedRequest = engine.validateSTORKAttrQueryRequest(attrRequest); - - assertEquals("CrossBorderShare incorrect: ", validatedRequest.isEIDCrossBorderShare(), false); - assertEquals("CrossSectorShare incorrect: ", validatedRequest.isEIDCrossSectorShare(), false); - assertEquals("SectorShare incorrect: ", validatedRequest.isEIDSectorShare(), false); - - } - - /** - * Test validate data authenticate request. Verified parameters after validation. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateDataAttrQueryRequest() throws STORKSAMLEngineException { - - final STORKAttrQueryRequest request = engine.validateSTORKAttrQueryRequest(attrRequest); - - assertEquals("Sestination incorrect: ", request.getDestination(), destination); - - assertEquals("CrossBorderShare incorrect: ", request.isEIDCrossBorderShare(), false); - assertEquals("CrossSectorShare incorrect: ", request.isEIDCrossSectorShare(), false); - assertEquals("SectorShare incorrect: ", request.isEIDSectorShare(), false); - - assertEquals("QAAL incorrect: ", request.getQaa(), QAAL); - assertEquals("SPSector incorrect: ", request.getSpSector(), spSector); - assertEquals("SPInstitution incorrect: ", request.getSpInstitution(), null); - assertEquals("SPApplication incorrect: ", request.getSpApplication(), spApplication); - assertEquals("CitizenCountryCode incorrect: ", request.getCitizenCountryCode(), null); - - } - - /** - * Test validate file attribute query request. Validate from XML file. - * - * @throws Exception - * the exception - */ - @Test - public final void testValidateFileAttrQueryRequest() throws Exception { - - final byte[] bytes = SSETestUtils.readStorkSamlFromFile("/data/eu/stork/STORKSAMLEngine/AttrQueryRequest1.xml"); - - try { - engine.validateSTORKAttrQueryRequest(bytes); - fail("testValidateFileAttrQueryRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error(e.getMessage()); - } - } - - /** - * Test validate file authentication request tag delete. - * - * @throws Exception - * the exception - */ - @Test - public final void testValidateFileAttrRequestTagDelete() throws Exception { - - final byte[] bytes = SSETestUtils.readStorkSamlFromFile("/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml"); - - try { - engine.validateSTORKAttrQueryRequest(bytes); - fail("validateSTORKAttrQueryRequest(...) should have thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error(e.getMessage()); - - } - } - - /** - * Test validate authentication request not trusted token. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAttrQueryRequestNotTrustedErr1() throws STORKSAMLEngineException { - - try { - final STORKSAMLEngine engineNotTrusted = STORKSAMLEngine.getInstance("CONF2"); - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - - final byte[] authReqNotTrust = engineNotTrusted.generateSTORKAttrQueryRequest(request).getTokenSaml(); - - engine.validateSTORKAttrQueryRequest(authReqNotTrust); - fail("validateSTORKAttrQueryRequestNotTrusted(...) should have thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication request trusted. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAttrQueryRequestTrusted() throws STORKSAMLEngineException { - - final STORKSAMLEngine engineTrusted = STORKSAMLEngine.getInstance("CONF3"); - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - final byte[] authReqNotTrust = engineTrusted.generateSTORKAttrQueryRequest(request).getTokenSaml(); - - // engine ("CONF1") no have trust certificate from "CONF2" - engine.validateSTORKAttrQueryRequest(authReqNotTrust); - - } - - /** - * Test generate authentication request service provider application null. - */ - @Test - public final void testGenerateAttrQueryRequestNADA() { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - - // news parameters - request.setSpSector(null); - request.setSpInstitution(null); - request.setSpApplication(null); - request.setSpCountry(null); - - try { - - engine.validateSTORKAttrQueryRequest(attrRequest); - - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } - } - - /** - * Test validate authentication request with unknown elements. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAttrQueryRequestWithUnknownElements() throws STORKSAMLEngineException { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - - IPersonalAttributeList pAttList = new PersonalAttributeList(); - - final PersonalAttribute unknown = new PersonalAttribute(); - unknown.setName("unknown"); - unknown.setIsRequired(true); - pAttList.add(unknown); - - final PersonalAttribute eIdentifier = new PersonalAttribute(); - eIdentifier.setName("eIdentifier"); - eIdentifier.setIsRequired(true); - pAttList.add(eIdentifier); - - request.setPersonalAttributeList(pAttList); - - // new parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - STORKAttrQueryRequest req = new STORKAttrQueryRequest(); - - req = engine3.generateSTORKAttrQueryRequest(request); - - req = engine.validateSTORKAttrQueryRequest(req.getTokenSaml()); - - assertNull("The value shouldn't exist", req.getPersonalAttributeList().get("unknown")); - assertNotNull("The value should exist", req.getPersonalAttributeList().get("eIdentifier")); - - } - - /** - * Test generate Request with required elements by default - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAttrQueryRequestWithIsRequiredElementsByDefault() throws STORKSAMLEngineException { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - - IPersonalAttributeList pAttList = new PersonalAttributeList(); - - final PersonalAttribute eIdentifier = new PersonalAttribute(); - eIdentifier.setName("eIdentifier"); - eIdentifier.setIsRequired(true); - pAttList.add(eIdentifier); - - request.setPersonalAttributeList(pAttList); - - // new parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - STORKAttrQueryRequest req = new STORKAttrQueryRequest(); - STORKAttrQueryRequest reqTrue = new STORKAttrQueryRequest(); - STORKAttrQueryRequest reqFalse = new STORKAttrQueryRequest(); - - reqTrue = engine.generateSTORKAttrQueryRequest(request); - reqFalse = engine2.generateSTORKAttrQueryRequest(request); - req = engine3.generateSTORKAttrQueryRequest(request); - - String token = new String(req.getTokenSaml()); - String reqTrueToken = new String(reqTrue.getTokenSaml()); - String reqFalseToken = new String(reqFalse.getTokenSaml()); - - assertTrue("The token must contain the chain 'isRequired'", token.contains("isRequired")); - assertTrue("The token must contain the chain 'isRequired'", reqTrueToken.contains("isRequired")); - assertFalse("The token must contain the chain 'isRequired'", reqFalseToken.contains("isRequired")); - - } - - /** - * Test validating attribute query and getting alias used to save the saml trusted certificate into trustore - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - /* - * @Test public final void testValidateAtrrQueryRequestGettingItsAlias() throws STORKSAMLEngineException { - * - * final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - * - * request.setDestination(destination); request.setQaa(QAAL); request.setPersonalAttributeList(pal); - * - * IPersonalAttributeList pAttList = new PersonalAttributeList(); - * - * final PersonalAttribute eIdentifier = new PersonalAttribute(); eIdentifier.setName("eIdentifier"); eIdentifier.setIsRequired(true); pAttList.add(eIdentifier); - * - * request.setPersonalAttributeList(pAttList); - * - * // new parameters request.setSpSector(spSector); request.setSpInstitution(spInstitution); request.setSpApplication(spApplication); request.setSpCountry(spCountry); request.setSPID(spId); - * request.setCitizenCountryCode("IS"); request.setAssertionConsumerServiceURL(assertConsumerUrl); - * - * STORKAttrQueryRequest req = new STORKAttrQueryRequest(); - * - * req = engine3.generateSTORKAttrQueryRequest(request); req = engine.validateSTORKAttrQueryRequest(req.getTokenSaml()); String prufa = req.getAlias(); - * assertTrue("The alias should match this value", req.getAlias().equals("local-demo")); - * - * req = engine2.generateSTORKAttrQueryRequest(request); req = engine2.validateSTORKAttrQueryRequest(req.getTokenSaml()); assertTrue("The alias should match this value", - * req.getAlias().equals("local-demo2")); } - */ - - @Test - public final void testGenerateAttrQueryRequestSignDoc() throws STORKSAMLEngineException { - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - - request.setDestination(destination); - request.setQaa(QAAL); - PersonalAttributeList pal0 = new PersonalAttributeList(); - - final PersonalAttribute signDoc = new PersonalAttribute(); - signDoc.setName("docRequest"); - signDoc.setIsRequired(true); - signDoc.setValue(Arrays.asList("IS/IS/fbea6e68-0393-401b-b616-f767fff9418c")); - pal0.add(signDoc); - - request.setPersonalAttributeList(pal0); - - // new parameters - /* - * request.setEIDSectorShare(false); request.setEIDCrossSectorShare(false); request.setEIDCrossBorderShare(false); - */ - request.setAssertionConsumerServiceURL(assertConsumerUrl); - request.setSpCountry(spCountry); - - STORKAttrQueryRequest req1 = engine0.generateSTORKAttrQueryRequest(request); - byte[] reqByte = req1.getTokenSaml(); - FileOutputStream output = null; - - STORKAttrQueryRequest req2 = engine0.validateSTORKAttrQueryRequest(reqByte); - // reqByte = req2.getTokenSaml(); - - try { - // output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml")); - FileOutputStream fos; - File outputDir = new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine"); - File saveFile = new File(outputDir, "AttrQueryRequestSdoc.xml"); - fos = new FileOutputStream(saveFile); - fos.write(reqByte); - fos.flush(); - fos.close(); - } catch (Exception e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(reqByte); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - LOG.info("STORKAttrQueryRequest 1: " + SSETestUtils.encodeSAMLToken(engine.generateSTORKAttrQueryRequest(request).getTokenSaml())); - - request.setCitizenCountryCode("IS"); - LOG.info("STORKAttrQueryRequest 2: " + SSETestUtils.encodeSAMLToken(engine.generateSTORKAttrQueryRequest(request).getTokenSaml())); - } - -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryResponseTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryResponseTest.java deleted file mode 100644 index 0ecca1eab..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAttrQueryResponseTest.java +++ /dev/null @@ -1,988 +0,0 @@ -package eu.stork.peps.test.simple; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; - -import org.junit.Ignore; -import org.junit.Test; -import org.opensaml.xml.parse.BasicParserPool; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PEPSUtil; -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKAttrQueryRequest; -import eu.stork.peps.auth.commons.STORKAttrQueryResponse; -import eu.stork.peps.auth.commons.STORKAuthnRequest; -import eu.stork.peps.auth.commons.STORKAuthnResponse; -import eu.stork.peps.auth.commons.STORKStatusCode; -import eu.stork.peps.auth.commons.STORKSubStatusCode; -import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -public class StorkAttrQueryResponseTest { - - /** The engine. */ - private static STORKSAMLEngine engine = STORKSAMLEngine.getInstance("CONF1"); - - /** - * Gets the engine. - * - * @return the engine - */ - public static STORKSAMLEngine getEngine() { - return engine; - } - - /** - * Sets the engine. - * - * @param newEngine - * the new engine - */ - public static void setEngine(final STORKSAMLEngine newEngine) { - StorkAttrQueryResponseTest.engine = newEngine; - } - - /** The destination. */ - private static String destination; - - /** The service provider sector. */ - private static String spSector; - - /** The service provider institution. */ - private static String spInstitution; - - /** The service provider application. */ - private static String spApplication; - - /** The service provider country. */ - private static String spCountry; - - /** The service provider id. */ - private static String spId; - - /** The quality authentication assurance level. */ - private static final int QAAL = 3; - - /** The state. */ - private static String state = "IS"; - - /** The town. */ - private static String town = "Reykjavik"; - - /** The postal code. */ - private static String postalCode = "105"; - - /** The street name. */ - private static String streetName = "Gudrunartun"; - - /** The street number. */ - private static String streetNumber = "10"; - - /** The List of Personal Attributes. */ - private static IPersonalAttributeList pal; - - /** The assertion consumer URL. */ - private static String assertConsumerUrl; - - /** The attribute query request. */ - private static byte[] attrQueryRequest; - - /** The attribute query response. */ - private static byte[] attrQueryResponse; - - /** The attribute query request. */ - private static STORKAttrQueryRequest attrQueryenRequest; - - /** The attribute query response. */ - private static STORKAttrQueryResponse attrQeuryenResponse; - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(StorkAttrQueryResponseTest.class.getName()); - - /** - * Instantiates a new stork response test. - */ - public StorkAttrQueryResponseTest() { - super(); - } - - /** The IP address. */ - private static String ipAddress; - - /** The destination URL. */ - private static String destinationUrl; - - /** The is hashing. */ - private final boolean isHashing = Boolean.TRUE; - - /** The is not hashing. */ - private final boolean isNotHashing = Boolean.FALSE; - - /** The ERROR text. */ - private static final String ERROR_TXT = "generateAttrQueryResponse(...) should've thrown an STORKSAMLEngineException!"; - - /** Parser manager used to parse XML. */ - private static BasicParserPool parser; - - static { - parser = new BasicParserPool(); - parser.setNamespaceAware(true); - - pal = new PersonalAttributeList(); - - PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(false); - ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - pal.add(isAgeOver); - - PersonalAttribute dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - pal.add(dateOfBirth); - - PersonalAttribute eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - List eid = Arrays.asList("IS/IS/1234567890"); - eIDNumber.setValue(eid); - eIDNumber.setIsRequired(true); - pal.add(eIDNumber); - - final PersonalAttribute givenName = new PersonalAttribute(); - givenName.setName("givenName"); - givenName.setIsRequired(true); - pal.add(givenName); - - PersonalAttribute canRessAddress = new PersonalAttribute(); - canRessAddress.setName("canonicalResidenceAddress"); - canRessAddress.setIsRequired(true); - pal.add(canRessAddress); - - PersonalAttribute newAttribute = new PersonalAttribute(); - newAttribute.setName("newAttribute2"); - newAttribute.setIsRequired(true); - pal.add(newAttribute); - - destination = "http://C-PEPS.gov.xx/PEPS/ColleagueRequest"; - assertConsumerUrl = "http://S-PEPS.gov.xx/PEPS/ColleagueResponse"; - spSector = "EDU001"; - spInstitution = "OXF001"; - spApplication = "APP001"; - spCountry = "EN"; - - spId = "EDU001-APP001-APP001"; - - final STORKAttrQueryRequest request = new STORKAttrQueryRequest(); - request.setDestination(destination); - // request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // new parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("IS"); - - try { - attrQueryRequest = getEngine().generateSTORKAttrQueryRequest(request).getTokenSaml(); - - attrQueryenRequest = getEngine().validateSTORKAttrQueryRequest(attrQueryRequest); - - } catch (STORKSAMLEngineException e) { - fail("Error create STORKAuthnRequest"); - } - - ipAddress = "111.222.333.444"; - - destinationUrl = "http://C-PEPS.gov.xx/PEPS/ColleagueRequest"; - - pal = new PersonalAttributeList(); - - isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(true); - ages = new ArrayList(); - - ages.add("16"); - ages.add("18"); - - isAgeOver.setValue(ages); - isAgeOver.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(isAgeOver); - - dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - final ArrayList date = new ArrayList(); - date.add("16/12/2008"); - dateOfBirth.setValue(date); - dateOfBirth.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(dateOfBirth); - - eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - final ArrayList idNumber = new ArrayList(); - idNumber.add("123456789IS"); - eIDNumber.setValue(idNumber); - eIDNumber.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(eIDNumber); - - canRessAddress = new PersonalAttribute(); - canRessAddress.setName("canonicalResidenceAddress"); - canRessAddress.setIsRequired(true); - canRessAddress.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - final HashMap address = new HashMap(); - - address.put("state", state); - address.put("town", town); - address.put("postalCode", postalCode); - address.put("streetName", streetName); - address.put("streetNumber", streetNumber); - - canRessAddress.setComplexValue(address); - pal.add(canRessAddress); - - newAttribute = new PersonalAttribute(); - newAttribute.setName("newAttribute2"); - newAttribute.setIsRequired(true); - newAttribute.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - final HashMap values = new HashMap(); - - values.put("value1", "value1"); - values.put("value2", "value2"); - values.put("value3", "value3"); - values.put("value4", "value4"); - - newAttribute.setComplexValue(values); - pal.add(newAttribute); - - } - - /** - * Test generate attribute query request without errors. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAttrQueryResponse() throws STORKSAMLEngineException { - - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setPersonalAttributeList(pal); - - final STORKAttrQueryResponse storkResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing); - - attrQueryResponse = storkResponse.getTokenSaml(); - - FileOutputStream output = null; - - try { - output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml")); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(attrQueryResponse); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - LOG.info("RESPONSE: " + SSETestUtils.encodeSAMLToken(attrQueryResponse)); - - } - - /** - * Test validation id parameter mandatory. - */ - @Test - public final void testResponseMandatoryId() { - final String identifier = attrQueryenRequest.getSamlId(); - attrQueryenRequest.setSamlId(null); - - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setPersonalAttributeList(pal); - - try { - getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isHashing); - fail(ERROR_TXT); - } catch (STORKSAMLEngineException e) { - attrQueryenRequest.setSamlId(identifier); - LOG.error("Error"); - } - } - - /** - * Test generate attribute query response in response to err1. - */ - @Test - public final void testResponseMandatoryIssuer() { - - final String issuer = attrQueryenRequest.getIssuer(); - attrQueryenRequest.setIssuer(null); - - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setPersonalAttributeList(pal); - - try { - getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isHashing); - fail(ERROR_TXT); - } catch (STORKSAMLEngineException e) { - attrQueryenRequest.setIssuer(issuer); - LOG.error("Error"); - } - } - - /** - * Test generate attribute query response assertion consumer null. - */ - /* - * @Test public final void testResponseMandatoryAssertionConsumerServiceURL() { final String asserConsumerUrl = attrQueryenRequest .getAssertionConsumerServiceURL(); - * attrQueryenRequest.setAssertionConsumerServiceURL(null); - * - * final STORKAuthnResponse response = new STORKAuthnResponse(); response.setPersonalAttributeList(pal); try { getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, - * isHashing); fail("generateAuthnResponse(...) should've thrown an STORKSAMLEngineException!"); } catch (STORKSAMLEngineException e) { - * attrQueryenRequest.setAssertionConsumerServiceURL(asserConsumerUrl); LOG.error("Error"); } } - * - * /** Test generate attribute query response IP address null. - */ - @Test - public final void testResponseValidationIP() { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setPersonalAttributeList(pal); - - try { - getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, null, destinationUrl, isHashing); - fail("generateAuthnResponse(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate attribute query response with personal attribute list null. - */ - @Test - public final void testResponseMandatoryPersonalAttributeList() { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setPersonalAttributeList(null); - - try { - getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isHashing); - fail("generateAuthnResponse(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response token null. - */ - @Test - public final void testResponseInvalidParametersToken() { - try { - getEngine().validateSTORKAttrQueryResponse(null, ipAddress); - fail(ERROR_TXT); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response IP null. - */ - @Test - public final void STORKAttrQueryResponse() { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setPersonalAttributeList(pal); - try { - attrQueryResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response parameter name wrong. - */ - @Test - public final void testResponseInvalidParametersAttr() { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("AttrWrong"); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - attrQueryResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response set null value into attribute. - */ - @Test - public final void testResponseInvalidParametersAttrSimpleValue() { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("isAgeOver"); - worngAttr.setValue(null); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - attrQueryResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response set null value into attribute. - */ - @Test - public final void testResponseInvalidParametersAttrNoValue() { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("isAgeOver"); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - attrQueryResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response set null value into attribute. - */ - @Test - public final void testResponseInvalidParametersAttrNoName() { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - attrQueryResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response set null complex value into attribute. - */ - @Test - public final void testResponseInvalidParametersAttrComplexValue() { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("isAgeOver"); - worngAttr.setComplexValue(null); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - attrQueryResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response IP distinct and disabled validation IP. - */ - @Test - public final void testResponseInvalidParametersIPDistinct() { - try { - // ipAddress origin "111.222.333.444" - // ipAddrValidation = false - // Subject Confirmation Bearer. - - getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, "127.0.0.1"); - } catch (STORKSAMLEngineException e) { - fail("validateAttributeQueryResponse(...) should've thrown an STORKSAMLEngineException!"); - LOG.error("Error"); - } - } - - /** - * Test response invalid parameters invalid token. - */ - @Test - public final void testResponseInvalidParametersTokenMsg() { - try { - // ipAddress origin "111.222.333.444" - // Subject Confirmation Bearer. - getEngine().validateSTORKAttrQueryResponse("errorMessage".getBytes(), ipAddress); - fail("validateAuthenticationResponse(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate attribute query response is fail. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - /* - * @Test public final void testValidateAuthenticationResponseIsFail() throws STORKSAMLEngineException { attrQeuryenResponse = getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, - * ipAddress); - * - * assertFalse("Generate incorrect response: ", attrQeuryenResponse.isFail()); } - * - * /** Test validate attribute query response destination. - * - * @throws STORKSAMLEngineException the STORKSAML engine exception - */ - @Test - public final void testValidateAuthenticationResponseDestination() throws STORKSAMLEngineException { - attrQeuryenResponse = getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress); - - assertEquals("Destination incorrect: ", attrQeuryenResponse.getInResponseTo(), attrQueryenRequest.getSamlId()); - } - - /** - * Test validate attribute query response values. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthenticationResponseValuesComplex() throws STORKSAMLEngineException { - attrQeuryenResponse = getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress); - - assertEquals("Country incorrect:", attrQeuryenResponse.getCountry(), "ES"); - - final Iterator iterator = attrQeuryenResponse.getPersonalAttributeList().iterator(); - - while (iterator.hasNext()) { - final PersonalAttribute attribute = iterator.next(); - if (attribute.getName().equalsIgnoreCase("canonicalResidenceAddress")) { - assertEquals("State incorrect: ", state, attribute.getComplexValue().get("state")); - assertEquals("Town incorrect: ", town, attribute.getComplexValue().get("town")); - assertEquals("Postal code incorrect: ", postalCode, attribute.getComplexValue().get("postalCode")); - assertEquals("Street name incorrect: ", streetName, attribute.getComplexValue().get("streetName")); - assertEquals("Street number incorrect: ", streetNumber, attribute.getComplexValue().get("streetNumber")); - } - } - } - - /** - * Test generate attribute query response fail in response to it's null. - * - * @throws STORKSAMLEngineException - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - // ( expected=STORKSAMLEngineException.class) - public final void testGenerateAttrQueryResponseFailInResponseToNull() throws STORKSAMLEngineException { - final String identifier = attrQueryenRequest.getSamlId(); - attrQueryenRequest.setSamlId(null); - - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setStatusCode(STORKStatusCode.REQUESTER_URI.toString()); - response.setSubStatusCode(STORKSubStatusCode.AUTHN_FAILED_URI.toString()); - response.setMessage(""); - - try { - attrQueryResponse = getEngine().generateSTORKAttrQueryResponseFail(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - fail(ERROR_TXT); - } catch (STORKSAMLEngineException e) { - attrQueryenRequest.setSamlId(identifier); - LOG.error("Error"); - // throw new STORKSAMLEngineException(e); - } - } - - /** - * Test generate attribute query response fail assertion consumer URL err1. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - /* - * @Test public final void testGenerateAuthnResponseFailAssertionConsumerUrlNull() throws STORKSAMLEngineException { - * - * final String assertConsumerUrl = attrQueryenRequest .getAssertionConsumerServiceURL(); attrQueryenRequest.setAssertionConsumerServiceURL(null); - * - * final STORKAuthnResponse response = new STORKAuthnResponse(); response.setStatusCode(STORKStatusCode.REQUESTER_URI.toString()); - * response.setSubStatusCode(STORKSubStatusCode.AUTHN_FAILED_URI.toString()); response.setMessage(""); - * - * try { attrQueryResponse = getEngine().generateSTORKAuthnResponseFail(attrQueryenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - * fail("generateAuthnResponseFail(...) should've thrown an STORKSAMLEngineException!"); } catch (STORKSAMLEngineException e) { - * attrQueryenRequest.setAssertionConsumerServiceURL(assertConsumerUrl); LOG.error("Error"); } } - * - * /** Test generate attribute query response fail code error err1. - * - * @throws STORKSAMLEngineException the STORKSAML engine exception - */ - @Test - public final void testGenerateAttrQueryResponseFailCodeErrorNull() throws STORKSAMLEngineException { - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setStatusCode(null); - response.setSubStatusCode(STORKSubStatusCode.AUTHN_FAILED_URI.toString()); - response.setMessage(""); - - try { - attrQueryResponse = getEngine().generateSTORKAttrQueryResponseFail(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - fail("generateAttrQueryResponseFail(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate attribute query request without errors. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAttrQueryResponse() throws STORKSAMLEngineException { - - IPersonalAttributeList palist = new PersonalAttributeList(); - - PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(true); - ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - isAgeOver.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - palist.add(isAgeOver); - - PersonalAttribute dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - final ArrayList date = new ArrayList(); - date.add("16/12/2008"); - dateOfBirth.setValue(date); - dateOfBirth.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - palist.add(dateOfBirth); - - PersonalAttribute eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - - final ArrayList idNumber = new ArrayList(); - idNumber.add("123456789PÑ"); - - final HashMap complex = new HashMap(); - complex.put("one", "two"); - - // eIDNumber.setValue(null); - // eIDNumber.setValue(idNumber); - // eIDNumber.setComplexValue(complex); - - eIDNumber.setStatus(STORKStatusCode.STATUS_NOT_AVAILABLE.toString()); - palist.add(eIDNumber); - - PersonalAttribute canRessAddress = new PersonalAttribute(); - canRessAddress.setName("canonicalResidenceAddress"); - canRessAddress.setIsRequired(true); - canRessAddress.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - final HashMap address = new HashMap(); - - address.put("state", state); - address.put("town", town); - address.put("postalCode", postalCode); - address.put("streetName", streetName); - address.put("streetNumber", streetNumber); - - canRessAddress.setComplexValue(address); - palist.add(canRessAddress); - - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - - response.setPersonalAttributeList(palist); - - final STORKAttrQueryResponse storkResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing); - - attrQueryResponse = storkResponse.getTokenSaml(); - LOG.info("Request id: " + attrQueryenRequest.getSamlId()); - - LOG.info("RESPONSE: " + SSETestUtils.encodeSAMLToken(attrQueryResponse)); - - attrQeuryenResponse = getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress); - - LOG.info("RESPONSE ID: " + attrQeuryenResponse.getSamlId()); - LOG.info("RESPONSE IN_RESPONSE_TO: " + attrQeuryenResponse.getInResponseTo()); - LOG.info("RESPONSE COUNTRY: " + attrQeuryenResponse.getCountry()); - - } - - /** - * Test validate attribute query response fail is fail. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAttrQueryResponseFailIsFail() throws STORKSAMLEngineException { - - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setStatusCode(STORKStatusCode.REQUESTER_URI.toString()); - response.setSubStatusCode(STORKSubStatusCode.AUTHN_FAILED_URI.toString()); - response.setMessage("message"); - - attrQueryResponse = getEngine().generateSTORKAttrQueryResponseFail(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing).getTokenSaml(); - - LOG.error("ERROR_FAIL: " + PEPSUtil.encodeSAMLToken(attrQueryResponse)); - - attrQeuryenResponse = getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress); - - LOG.info("COUNTRY: " + attrQeuryenResponse.getCountry()); - assertTrue("Generate incorrect response: ", attrQeuryenResponse.isFail()); - } - - /** - * Test generate/validate response with signedDoc - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAttrQueryResponseWithSignedDoc() throws STORKSAMLEngineException { - - String signedDocResponse = " urn:oasis:names:tc:dss:1.0:resultmajor:Success PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48ZHM6U2lnbmF0dXJlIHhtbG5zOmRzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIiBJZD0iU2lnbmF0dXJlLThlYWJkMGE1LTY2MGQtNGFmZC05OTA1LTBhYmM3NTUzZDE5Mi1TaWduYXR1cmUiPjxkczpTaWduZWRJbmZvPjxkczpDYW5vbmljYWxpemF0aW9uTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMteG1sLWMxNG4tMjAwMTAzMTUiLz48ZHM6U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI3JzYS1zaGExIi8+PGRzOlJlZmVyZW5jZSBJZD0iUmVmZXJlbmNlLWJhYmE0ZDFhLWExN2UtNDJjNi05N2QyLWJlZWUxMzUwOTUwMyIgVHlwZT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI09iamVjdCIgVVJJPSIjT2JqZWN0LTk4NzMzY2RlLThiY2MtNDhhMC05Yjc3LTBlOTk5N2JkZDA1OCI+PGRzOlRyYW5zZm9ybXM+PGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNiYXNlNjQiLz48L2RzOlRyYW5zZm9ybXM+PGRzOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNzaGExIi8+PGRzOkRpZ2VzdFZhbHVlPkNrMVZxTmQ0NVFJdnEzQVpkOFhZUUx2RWh0QT08L2RzOkRpZ2VzdFZhbHVlPjwvZHM6UmVmZXJlbmNlPjxkczpSZWZlcmVuY2UgVHlwZT0iaHR0cDovL3VyaS5ldHNpLm9yZy8wMTkwMyNTaWduZWRQcm9wZXJ0aWVzIiBVUkk9IiNTaWduYXR1cmUtOGVhYmQwYTUtNjYwZC00YWZkLTk5MDUtMGFiYzc1NTNkMTkyLVNpZ25lZFByb3BlcnRpZXMiPjxkczpEaWdlc3RNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjc2hhMSIvPjxkczpEaWdlc3RWYWx1ZT5BNVk5MW40cXBMZ3l0VFc3ZnhqWENVZVJ2NTQ9PC9kczpEaWdlc3RWYWx1ZT48L2RzOlJlZmVyZW5jZT48ZHM6UmVmZXJlbmNlIFVSST0iI1NpZ25hdHVyZS04ZWFiZDBhNS02NjBkLTRhZmQtOTkwNS0wYWJjNzU1M2QxOTItS2V5SW5mbyI+PGRzOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNzaGExIi8+PGRzOkRpZ2VzdFZhbHVlPlZQWDRuS0Z5UzZyRitGNmNSUjBQck5aZHc2Zz08L2RzOkRpZ2VzdFZhbHVlPjwvZHM6UmVmZXJlbmNlPjwvZHM6U2lnbmVkSW5mbz48ZHM6U2lnbmF0dXJlVmFsdWUgSWQ9IlNpZ25hdHVyZS04ZWFiZDBhNS02NjBkLTRhZmQtOTkwNS0wYWJjNzU1M2QxOTItU2lnbmF0dXJlVmFsdWUiPkxiS04vL0M3WGt5eFR0WVRpQ1VScjhuWnp4QW1zdGNNZDBDZ0VBQ3JLMWR5Z1JIcUdjSzR4dHMrV0NVOFB5RXFXclJJVFl6SXV3LzcNClY0Wno5VFQ2MHA0S1RNZXd1UUw2NHNrRVN4MllnMkVkaWtTTyt0S3hXa2hyYVVzbVZiR2JQbW1jbUR2OTd0SER3ODg3NDdlRnE1RjUNCnYrYVZTeUF6MDNpVUttdVNlSDg9PC9kczpTaWduYXR1cmVWYWx1ZT48ZHM6S2V5SW5mbyBJZD0iU2lnbmF0dXJlLThlYWJkMGE1LTY2MGQtNGFmZC05OTA1LTBhYmM3NTUzZDE5Mi1LZXlJbmZvIj48ZHM6S2V5VmFsdWU+PGRzOlJTQUtleVZhbHVlPjxkczpNb2R1bHVzPnd1Y21qOXRJV3J2d2JTVFVEZndLbCtKdERNTUVSMGNMZDZEa0JTcjc5MHQrckdOakVTcVlqUndFSWVCbktvUUhQeDVIb1JlRjg4L3QNCnFZOStDaEVYcExITHM5cDVhWDdTREp1YnBRTWZwMXRERlgzNHl3Z3hTUXZjZWVKUVdCWGppZXVJbWZDMjFzNGJPY2dKYlYxaGJpZ1MNCnpPS1RRS3IxVHpkR1IrdVJ5MDA9PC9kczpNb2R1bHVzPjxkczpFeHBvbmVudD5BUUFCPC9kczpFeHBvbmVudD48L2RzOlJTQUtleVZhbHVlPjwvZHM6S2V5VmFsdWU+PGRzOlg1MDlEYXRhPjxkczpYNTA5Q2VydGlmaWNhdGU+TUlJSW1UQ0NCNEdnQXdJQkFnSURBWFVVTUEwR0NTcUdTSWIzRFFFQkJRVUFNSUlCT3pFTE1Ba0dBMVVFQmhNQ1JWTXhPekE1QmdOVg0KQkFvVE1rRm5aVzVqYVdFZ1EyRjBZV3hoYm1FZ1pHVWdRMlZ5ZEdsbWFXTmhZMmx2SUNoT1NVWWdVUzB3T0RBeE1UYzJMVWtwTVRRdw0KTWdZRFZRUUhFeXRRWVhOellYUm5aU0JrWlNCc1lTQkRiMjVqWlhCamFXOGdNVEVnTURnd01EZ2dRbUZ5WTJWc2IyNWhNUzR3TEFZRA0KVlFRTEV5VlRaWEoyWldseklGQjFZbXhwWTNNZ1pHVWdRMlZ5ZEdsbWFXTmhZMmx2SUVWRFZpMHlNVFV3TXdZRFZRUUxFeXhXWldkbA0KZFNCb2RIUndjem92TDNkM2R5NWpZWFJqWlhKMExtNWxkQzkyWlhKRFNVTXRNaUFvWXlrd016RTFNRE1HQTFVRUN4TXNSVzUwYVhSaA0KZENCd2RXSnNhV05oSUdSbElHTmxjblJwWm1sallXTnBieUJrWlNCamFYVjBZV1JoYm5NeEd6QVpCZ05WQkFNVEVsQlNSVkJTVDBSVg0KUTBOSlR5QkpSRU5oZERBZUZ3MHhNREF5TVRFeE9ESXlNRFJhRncweE5EQXlNVEF4T0RJeU1EUmFNSUd3TVFzd0NRWURWUVFHRXdKRg0KVXpFMU1ETUdBMVVFQ3hNc1ZtVm5aWFVnYUhSMGNITTZMeTkzZDNjdVkyRjBZMlZ5ZEM1dVpYUXZkbVZ5U1VSRFlYUWdLR01wTURNeA0KRmpBVUJnTlZCQVFURFVKRlVreEJUa2RCSUZOUFZFOHhGekFWQmdOVkJDb1REazFCVWtsQklFVk9SMUpCUTBsQk1SSXdFQVlEVlFRRg0KRXdreE1EQXdNRGswTkZNeEpUQWpCZ05WQkFNVEhFMUJVa2xCSUVWT1IxSkJRMGxCSUVKRlVreEJUa2RCSUZOUFZFOHdnWjh3RFFZSg0KS29aSWh2Y05BUUVCQlFBRGdZMEFNSUdKQW9HQkFNTG5Kby9iU0ZxNzhHMGsxQTM4Q3BmaWJRekRCRWRIQzNlZzVBVXErL2RMZnF4ag0KWXhFcW1JMGNCQ0hnWnlxRUJ6OGVSNkVYaGZQUDdhbVBmZ29SRjZTeHk3UGFlV2wrMGd5Ym02VURINmRiUXhWOStNc0lNVWtMM0huaQ0KVUZnVjQ0bnJpSm53dHRiT0d6bklDVzFkWVc0b0VzemlrMENxOVU4M1JrZnJrY3ROQWdNQkFBR2pnZ1N3TUlJRXJEQU1CZ05WSFJNQg0KQWY4RUFqQUFNQTRHQTFVZER3RUIvd1FFQXdJRm9EQ0J6QVlEVlIwUkJJSEVNSUhCZ1E5aWMyOTBiMEJuYldGcGJDNWpiMjJrZ1lVdw0KZ1lJeEN6QUpCZ05WQkFZVEFrVlRNU3N3S1FZRFZRUUtGQ0pCWjhPb2JtTnBZU0JEWVhSaGJHRnVZU0JrWlNCRFpYSjBhV1pwWTJGag0KYWNPek1RNHdEQVlEVlFRTEV3VkpSRU5CVkRFUE1BMEdBMVVFQlJNR01ERTNOVEUwTVNVd0l3WURWUVFERXh4TlFWSkpRU0JGVGtkUw0KUVVOSlFTQkNSVkpNUVU1SFFTQlRUMVJQb0JBR0Npc0dBUVFCOVhnQkFRR2dBZ3dBb0JRR0RsWUVBQUVEQmdFRUFmVjRBUUVDb0FJTQ0KQURBZkJnTlZIUklFR0RBV2dSUmxZMTlwWkdOaGRFQmpZWFJqWlhKMExtNWxkREFkQmdOVkhRNEVGZ1FVQUZYanVOc2tCMk1seXZVQg0KaDdwOFRKMHVKMHd3Z2dGSUJnTlZIU01FZ2dFL01JSUJPNEFVUkt2Y2tVaE4xNGg0Q24vZ2RPRG42NzIzS1Z5aGdnRVBwSUlCQ3pDQw0KQVFjeEN6QUpCZ05WQkFZVEFrVlRNVHN3T1FZRFZRUUtFekpCWjJWdVkybGhJRU5oZEdGc1lXNWhJR1JsSUVObGNuUnBabWxqWVdOcA0KYnlBb1RrbEdJRkV0TURnd01URTNOaTFKS1RFb01DWUdBMVVFQ3hNZlUyVnlkbVZwY3lCUWRXSnNhV056SUdSbElFTmxjblJwWm1sag0KWVdOcGJ6RThNRG9HQTFVRUN4TXpWbVZuWlhVZ2FIUjBjSE02THk5M2QzY3VZMkYwWTJWeWRDNXVaWFF2ZG1WeWNISmxjSEp2WkhWag0KWTJsdklDaGpLVEF6TVRVd013WURWUVFMRXl4S1pYSmhjbkYxYVdFZ1JXNTBhWFJoZEhNZ1pHVWdRMlZ5ZEdsbWFXTmhZMmx2SUVOaA0KZEdGc1lXNWxjekVjTUJvR0ExVUVBeE1UVUZKRlVGSlBSRlZEUTBsUElFVkRMVUZEUTRJUWR3S1R0TTFFRVU5RkVQWFVZSGdnaERBZA0KQmdOVkhTVUVGakFVQmdnckJnRUZCUWNEQWdZSUt3WUJCUVVIQXdRd0VRWUpZSVpJQVliNFFnRUJCQVFEQWdXZ01EUUdDQ3NHQVFVRg0KQndFQkJDZ3dKakFrQmdnckJnRUZCUWN3QVlZWWFIUjBjSE02THk5dlkzTndMbU5oZEdObGNuUXVibVYwTUJnR0NDc0dBUVVGQndFRA0KQkF3d0NqQUlCZ1lFQUk1R0FRRXdnWVlHQTFVZEh3Ui9NSDB3UEtBNm9EaUdObWgwZEhBNkx5OWxjSE5qWkM1allYUmpaWEowTG01bA0KZEM5amNtd3ZjSEpsY0hKdlpIVmpZMmx2WDJWakxXbGtZMkYwTG1OeWJEQTlvRHVnT1lZM2FIUjBjRG92TDJWd2MyTmtNaTVqWVhSag0KWlhKMExtNWxkQzlqY213dmNISmxjSEp2WkhWalkybHZYMlZqTFdsa1kyRjBMbU55YkRDQjlnWURWUjBnQklIdU1JSHJNSUhvQmd3cg0KQmdFRUFmVjRBUU1CVmdFd2dkY3dMQVlJS3dZQkJRVUhBZ0VXSUdoMGRIQnpPaTh2ZDNkM0xtTmhkR05sY25RdWJtVjBMM1psY2tsRQ0KUTJGME1JR21CZ2dyQmdFRkJRY0NBakNCbVJxQmxrRnhkV1Z6ZENEdnY3MXpJSFZ1SUdObGNuUnBabWxqWVhRZ2NHVnljMjl1WVd3Zw0KU1VSRFFWUXNJSEpsWTI5dVpXZDFkQ0JrSjJsa1pXNTBhV1pwWTJGajc3KzlMQ0J6YVdkdVlYUjFjbUVnYVNCNGFXWnlZWFFnWkdVZw0KWTJ4aGMzTmxJRElnYVc1a2FYWnBaSFZoYkM0Z1ZtVm5aWFVnYUhSMGNITTZMeTkzZDNjdVkyRjBZMlZ5ZEM1dVpYUXZkbVZ5UkVOaA0KZERBdEJnTlZIUWtFSmpBa01CQUdDQ3NHQVFVRkJ3a0VNUVFUQWtWVE1CQUdDQ3NHQVFVRkJ3a0ZNUVFUQWtWVE1BMEdDU3FHU0liMw0KRFFFQkJRVUFBNElCQVFDcTc3ODBSR1FNTEIxZ2tkTk1mTFhuZ3FNb1JIR0taYnZ6a3JxSUFtVDhXQWQxRThyQXBoUjkveExKVXRwNQ0KbGJnMmZScjVibDJqOE9WREJLMlltRzQxaDhBRG40U1RJL0FwZU5JTlNmalpzNk5Sc25XekZ5ZlhYbVBDSFlGQi9YV3p5aW1DRXhndg0KdnR1SCszUUF3Y3dobjUwUExFdWh3NUM1dmxYN0x5NUs2ckxMTUZOVVVNYldWeTFoWmVsSy9DQlRjQWpJTzM4TlkrdllSQU1LU2Y0TQ0KL2daUXo0cUJlRlZKYTUyUjdOY0FxQ2ZyZkxmYVhwYkRTZzk4eG9CZU5zMmluR3p4OFVTZ0VyTFpqS0pzZG4vS2pURDlnUy9zVGRRNg0KUTdpZHFsZDJMRlZsTzIvYjk0Wk5aQmNTLzc4RU9EWGdkV2ZreVBDN1J3OHJlOW5JMy9qVDwvZHM6WDUwOUNlcnRpZmljYXRlPjwvZHM6WDUwOURhdGE+PC9kczpLZXlJbmZvPjxkczpPYmplY3QgRW5jb2Rpbmc9ImJhc2U2NCIgSWQ9Ik9iamVjdC05ODczM2NkZS04YmNjLTQ4YTAtOWI3Ny0wZTk5OTdiZGQwNTgiIE1pbWVUeXBlPSJhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0iPlNHVnNiRzhnVjI5eWJHUT08L2RzOk9iamVjdD48ZHM6T2JqZWN0Pjx4YWRlczpRdWFsaWZ5aW5nUHJvcGVydGllcyB4bWxuczp4YWRlcz0iaHR0cDovL3VyaS5ldHNpLm9yZy8wMTkwMy92MS4zLjIjIiBJZD0iU2lnbmF0dXJlLThlYWJkMGE1LTY2MGQtNGFmZC05OTA1LTBhYmM3NTUzZDE5Mi1RdWFsaWZ5aW5nUHJvcGVydGllcyIgVGFyZ2V0PSIjU2lnbmF0dXJlLThlYWJkMGE1LTY2MGQtNGFmZC05OTA1LTBhYmM3NTUzZDE5Mi1TaWduYXR1cmUiPjx4YWRlczpTaWduZWRQcm9wZXJ0aWVzIElkPSJTaWduYXR1cmUtOGVhYmQwYTUtNjYwZC00YWZkLTk5MDUtMGFiYzc1NTNkMTkyLVNpZ25lZFByb3BlcnRpZXMiPjx4YWRlczpTaWduZWRTaWduYXR1cmVQcm9wZXJ0aWVzPjx4YWRlczpTaWduaW5nVGltZT4yMDExLTAzLTIxVDExOjQ0OjQyKzAxOjAwPC94YWRlczpTaWduaW5nVGltZT48eGFkZXM6U2lnbmluZ0NlcnRpZmljYXRlPjx4YWRlczpDZXJ0Pjx4YWRlczpDZXJ0RGlnZXN0PjxkczpEaWdlc3RNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjc2hhMSIvPjxkczpEaWdlc3RWYWx1ZT4zbTZ3OTlUb3lTZDlKcEJsMWdCazhEei9iYlU9PC9kczpEaWdlc3RWYWx1ZT48L3hhZGVzOkNlcnREaWdlc3Q+PHhhZGVzOklzc3VlclNlcmlhbD48ZHM6WDUwOUlzc3Vlck5hbWU+Q049UFJFUFJPRFVDQ0lPIElEQ2F0LCBPVT1FbnRpdGF0IHB1YmxpY2EgZGUgY2VydGlmaWNhY2lvIGRlIGNpdXRhZGFucywgT1U9VmVnZXUgaHR0cHM6Ly93d3cuY2F0Y2VydC5uZXQvdmVyQ0lDLTIgKGMpMDMsIE9VPVNlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8gRUNWLTIsIEw9UGFzc2F0Z2UgZGUgbGEgQ29uY2VwY2lvIDExIDA4MDA4IEJhcmNlbG9uYSwgTz1BZ2VuY2lhIENhdGFsYW5hIGRlIENlcnRpZmljYWNpbyAoTklGIFEtMDgwMTE3Ni1JKSwgQz1FUzwvZHM6WDUwOUlzc3Vlck5hbWU+PGRzOlg1MDlTZXJpYWxOdW1iZXI+OTU1MDg8L2RzOlg1MDlTZXJpYWxOdW1iZXI+PC94YWRlczpJc3N1ZXJTZXJpYWw+PC94YWRlczpDZXJ0PjwveGFkZXM6U2lnbmluZ0NlcnRpZmljYXRlPjwveGFkZXM6U2lnbmVkU2lnbmF0dXJlUHJvcGVydGllcz48eGFkZXM6U2lnbmVkRGF0YU9iamVjdFByb3BlcnRpZXM+PHhhZGVzOkRhdGFPYmplY3RGb3JtYXQgT2JqZWN0UmVmZXJlbmNlPSIjUmVmZXJlbmNlLWJhYmE0ZDFhLWExN2UtNDJjNi05N2QyLWJlZWUxMzUwOTUwMyI+PHhhZGVzOk1pbWVUeXBlPmFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbTwveGFkZXM6TWltZVR5cGU+PHhhZGVzOkVuY29kaW5nPmJhc2U2NDwveGFkZXM6RW5jb2Rpbmc+PC94YWRlczpEYXRhT2JqZWN0Rm9ybWF0PjwveGFkZXM6U2lnbmVkRGF0YU9iamVjdFByb3BlcnRpZXM+PC94YWRlczpTaWduZWRQcm9wZXJ0aWVzPjwveGFkZXM6UXVhbGlmeWluZ1Byb3BlcnRpZXM+PC9kczpPYmplY3Q+PC9kczpTaWduYXR1cmU+ "; - - IPersonalAttributeList palist = new PersonalAttributeList(); - - PersonalAttribute signedDoc = new PersonalAttribute(); - signedDoc.setName("signedDoc"); - signedDoc.setIsRequired(false); - ArrayList signed = new ArrayList(); - signed.add(signedDocResponse); - signedDoc.setValue(signed); - palist.add(signedDoc); - - PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(false); - ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - palist.add(isAgeOver); - - attrQueryenRequest.setPersonalAttributeList(palist); - - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - - response.setPersonalAttributeList(palist); - - final STORKAttrQueryResponse storkResponse = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, response, ipAddress, destinationUrl, isNotHashing); - - attrQueryResponse = storkResponse.getTokenSaml(); - attrQeuryenResponse = getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress); - - assertTrue("SignedDoc response should be the same: ", attrQeuryenResponse.getPersonalAttributeList().get("signedDoc").getValue().get(0).equals(signedDocResponse)); - - } - - @Test - public final void testEncodeDecode() { - STORKAttrQueryRequest attrRequest = new STORKAttrQueryRequest(); - STORKAttrQueryRequest request; - IPersonalAttributeList list = null; - boolean outcome = false; - - try { - // STEP 1: Create the STORKAttrQueryRequest and get the SAML bytes - attrRequest.setSpSector("NOT AVAILABLE"); - attrRequest.setSpInstitution("NOT AVAILABLE"); - attrRequest.setSpApplication("NOT AVAILABLE"); - attrRequest.setSpCountry("NOT AVAILABLE"); - - attrRequest.setIssuer("123"); - attrRequest.setDestination("456"); - attrRequest.setAssertionConsumerServiceURL("789"); - attrRequest.setQaa(2); - attrRequest.setPersonalAttributeList(pal); - - System.out.println("Original PAL:"); - System.out.println(pal.toString()); - - attrRequest = engine.generateSTORKAttrQueryRequest(attrRequest); - - byte[] saml = attrRequest.getTokenSaml(); - - // STEP 2: RE-Create the STORKAttrQueryRequest from the SAML bytes - request = engine.validateSTORKAttrQueryRequest(saml); - - System.out.println("STORKAttrQueryRequest Issuer: " + request.getIssuer()); - System.out.println("STORKAttrQueryRequest Destination: " + request.getDestination()); - System.out.println("STORKAttrQueryRequest ServiceURL: " + request.getAssertionConsumerServiceURL()); - System.out.println("STORKAttrQueryRequest Attributes: " + request.getPersonalAttributeList().toString()); - System.out.println("STORKAttrQueryRequest QAA: " + request.getQaa()); - // ------------------------------ - list = request.getPersonalAttributeList(); - - List values = new ArrayList(); - values.add("test1"); - values.add("test2"); - values.add("test3"); - list.get("newAttribute2").setValue(values); - - System.out.println("Values added in newAttribute2 PAL:"); - System.out.println(list.toString()); - - // //////////////////////////////////////////////////////////////////////// - final STORKAttrQueryResponse response = new STORKAttrQueryResponse(); - response.setPersonalAttributeList(list); - - final STORKAttrQueryResponse storkResponse = engine.generateSTORKAttrQueryResponse(request, response, "127.0.0.1", request.getAssertionConsumerServiceURL(), false); - - byte[] samlBytes = storkResponse.getTokenSaml(); - - // STEP 3: RE-Create the STORKAttrQueryResponse from the SAML bytes - STORKAttrQueryResponse attrResponse = null; - attrResponse = engine.validateSTORKAttrQueryResponse(samlBytes, "127.0.0.1"); - - System.out.println("Response decoded PAL:"); - System.out.println(attrResponse.getPersonalAttributeList().toString()); - - values = attrResponse.getPersonalAttributeList().get("newAttribute2").getValue(); - if (values.contains("test1") && values.contains("test2") && values.contains("test3")) - outcome = true; - } catch (final STORKSAMLEngineException e) { - LOG.error("Errror genereating SAML Token for Authentication Request", e); - } - - assertTrue(outcome); - } - - @Test - public final void testGenerateAttrRequestWithMultipleAssertions() throws STORKSAMLEngineException { - STORKAttrQueryRequest req = null; - STORKAttrQueryResponse res0 = null; - STORKAttrQueryResponse res1 = null; - STORKAttrQueryResponse res2 = null; - STORKAttrQueryResponse res = null; - STORKAttrQueryResponse restotal = null; - - try { - req = getEngine().validateSTORKAttrQueryRequest(attrQueryRequest); - - attrQueryenRequest = getEngine().validateSTORKAttrQueryRequest(attrQueryRequest); - - } catch (STORKSAMLEngineException e) { - fail("Error validating STORKAuthnRequest"); - } - - IPersonalAttributeList pList = req.getPersonalAttributeList(); - for (int i = 0; i < pList.size(); i++) { - PersonalAttribute attr = pList.get("dateOfBirth"); - attr.setValue(Arrays.asList("19820919")); - pList.remove("dateOfBirth"); - pList.add(attr); - PersonalAttribute attr1 = pList.get("givenName"); - attr1.setValue(Arrays.asList("Sveinborn Oskarsson")); - pList.remove("givenName"); - pList.add(attr1); - PersonalAttribute attr2 = pList.get("isAgeOver"); - attr2.setValue(Arrays.asList("true")); - pList.remove("isAgeOver"); - pList.add(attr2); - } - - res = new STORKAttrQueryResponse(); - res.setPersonalAttributeList(pList); - - STORKAttrQueryResponse storkResponse = getEngine().generateSTORKAttrQueryResponse(req, res, ipAddress, destinationUrl, isNotHashing); - - res0 = getEngine().validateSTORKAttrQueryResponse(storkResponse.getTokenSaml(), ipAddress); - - storkResponse = getEngine().generateSTORKAttrQueryResponse(req, res, ipAddress, destinationUrl, isNotHashing); - res1 = getEngine().validateSTORKAttrQueryResponse(storkResponse.getTokenSaml(), ipAddress); - - storkResponse = getEngine().generateSTORKAttrQueryResponse(req, res, ipAddress, destinationUrl, isNotHashing); - res2 = getEngine().validateSTORKAttrQueryResponse(storkResponse.getTokenSaml(), ipAddress); - - List responses = new ArrayList(); - responses.add(res0); - responses.add(res1); - responses.add(res2); - - STORKAttrQueryResponse resfinal = new STORKAttrQueryResponse(); - storkResponse = getEngine().generateSTORKAttrQueryResponseWithAssertions(req, resfinal, responses, ipAddress, destinationUrl, isNotHashing); - - attrQueryResponse = storkResponse.getTokenSaml(); - FileOutputStream output = null; - try { - output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryMultiAssertResponse.xml")); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(attrQueryResponse); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - res = null; - res = getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress); - System.out.println(res.getTotalPersonalAttributeList().toString()); - assertNotNull(res); - } -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java deleted file mode 100644 index d476ad26e..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkAuthRequestTest.java +++ /dev/null @@ -1,947 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.test.simple; - -import static org.junit.Assert.*; - -import java.util.ArrayList; - -import org.junit.Ignore; -import org.junit.Test; -import org.opensaml.xml.parse.BasicParserPool; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.*; -import eu.stork.peps.auth.commons.*; -import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -/** - * The Class StorkAuthRequestTest defines a class to . - */ -public class StorkAuthRequestTest { - - /** The engines. */ - private static STORKSAMLEngine engine = STORKSAMLEngine.getInstance("CONF1"); - private static STORKSAMLEngine engine2 = STORKSAMLEngine.getInstance("CONF2"); - private static STORKSAMLEngine engine3 = STORKSAMLEngine.getInstance("CONF3"); - - /** - * Instantiates a new stork authentication request test. - */ - public StorkAuthRequestTest() { - pal = new PersonalAttributeList(); - - final PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(true); - final ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - pal.add(isAgeOver); - - final PersonalAttribute dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - pal.add(dateOfBirth); - - final PersonalAttribute eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - pal.add(eIDNumber); - - final PersonalAttribute LPFiscalNumber = new PersonalAttribute(); - LPFiscalNumber.setName("LPFiscalNumber"); - LPFiscalNumber.setIsRequired(true); - pal.add(LPFiscalNumber); - - destination = "http://C-PEPS.gov.xx/PEPS/ColleagueRequest"; - assertConsumerUrl = "http://S-PEPS.gov.xx/PEPS/ColleagueResponse"; - - spName = "University of Oxford"; - spSector = "EDU001"; - spInstitution = "OXF001"; - spApplication = "APP001"; - spCountry = "EN"; - - spId = "EDU001-OXF001-APP001"; - - } - - /** The destination. */ - private String destination; - - /** The service provider name. */ - private String spName; - - /** The service provider sector. */ - private String spSector; - - /** The service provider institution. */ - private String spInstitution; - - /** The service provider application. */ - private String spApplication; - - /** The service provider country. */ - private String spCountry; - - /** The service provider id. */ - private String spId; - - /** The quality authentication assurance level. */ - private static final int QAAL = 3; - - /** The List of Personal Attributes. */ - private IPersonalAttributeList pal; - - /** The assertion consumer URL. */ - private String assertConsumerUrl; - - /** The authentication request. */ - private static byte[] authRequest; - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(StorkAuthRequestTest.class.getName()); - - /** Parser manager used to parse XML. */ - private static BasicParserPool parser; - - static { - parser = new BasicParserPool(); - parser.setNamespaceAware(true); - } - - /** - * Test generate authentication request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthnRequest() throws STORKSAMLEngineException { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // new parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - // engine.generateSTORKAuthnRequest(request); - - LOG.info("STORKAuthnRequest 1: " + SSETestUtils.encodeSAMLToken(engine.generateSTORKAuthnRequest(request).getTokenSaml())); - request.setCitizenCountryCode("ES"); - LOG.info("STORKAuthnRequest 2: " + SSETestUtils.encodeSAMLToken(engine.generateSTORKAuthnRequest(request).getTokenSaml())); - } - - /** - * Test generate authentication request error personal attribute name error. - */ - @Test - public final void testGenerateAuthnRequestPALsErr1() { - - final IPersonalAttributeList palWrong = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("attrNotValid"); - worngAttr.setIsRequired(true); - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(palWrong); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request error personal attribute value error. - */ - @Test - public final void testGenerateAuthnRequestPALsErr2() { - - final IPersonalAttributeList palWrong = new PersonalAttributeList(); - - final PersonalAttribute attrNotValid = new PersonalAttribute(); - attrNotValid.setName("attrNotValid"); - attrNotValid.setIsRequired(true); - palWrong.add(attrNotValid); - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(palWrong); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request error provider name null. - */ - @Test - public final void testGenerateAuthnRequestSPNAmeErr1() { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(null); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request authentication assurance level negative value. - */ - @Test - public final void testGenerateAuthnRequestQaalErr1() { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(-1); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - - try { - engine.generateSTORKAuthnRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request service provider sector null. - */ - @Test - public final void testGenerateAuthnRequestSectorErr() { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(null); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - - } - } - - /** - * Test generate authentication request service provider institution null. - */ - @Test - public final void testGenerateAuthnRequestInstitutionrErr() { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(null); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } - } - - /** - * Test generate authentication request service provider application null. - */ - @Test - public final void testGenerateAuthnRequestApplicationErr() { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(null); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } - } - - /** - * Test generate authentication request service provider country null. - */ - @Test - public final void testGenerateAuthnRequestCountryErr() { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(null); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - LOG.error("Error"); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request error with quality authentication assurance level wrong. - */ - @Test - public final void testGenerateAuthnRequestQaalErr2() { - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(0); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request personal attribute list null value. - */ - @Test - public final void testGenerateAuthnRequestPALErr1() { - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(null); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request error with assertion consumer URL null. - */ - @Test - public final void testGenerateAuthnRequestAssertionConsumerErr1() { - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(null); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - engine.generateSTORKAuthnRequest(request); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication request null parameter. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthnRequestNullParam() throws STORKSAMLEngineException { - try { - engine.validateSTORKAuthnRequest(null); - fail("validateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication request error bytes encode. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthnRequestErrorEncode() throws STORKSAMLEngineException { - try { - engine.validateSTORKAuthnRequest("messageError".getBytes()); - fail("validateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthnRequest() throws STORKSAMLEngineException { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - authRequest = engine.generateSTORKAuthnRequest(request).getTokenSaml(); - - final STORKAuthnRequest validatedRequest = engine.validateSTORKAuthnRequest(authRequest); - - assertEquals("CrossBorderShare incorrect: ", validatedRequest.isEIDCrossBorderShare(), false); - assertEquals("CrossSectorShare incorrect: ", validatedRequest.isEIDCrossSectorShare(), false); - assertEquals("SectorShare incorrect: ", validatedRequest.isEIDSectorShare(), false); - - } - - /** - * Test validate data authenticate request. Verified parameters after validation. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateDataAuthnRequest() throws STORKSAMLEngineException { - - final STORKAuthnRequest request = engine.validateSTORKAuthnRequest(authRequest); - - assertEquals("Sestination incorrect: ", request.getDestination(), destination); - - assertEquals("CrossBorderShare incorrect: ", request.isEIDCrossBorderShare(), false); - assertEquals("CrossSectorShare incorrect: ", request.isEIDCrossSectorShare(), false); - assertEquals("SectorShare incorrect: ", request.isEIDSectorShare(), false); - - assertEquals("Service provider incorrect: ", request.getProviderName(), spName); - assertEquals("QAAL incorrect: ", request.getQaa(), QAAL); - assertEquals("SPSector incorrect: ", request.getSpSector(), spSector); - assertEquals("SPInstitution incorrect: ", request.getSpInstitution(), null); - assertEquals("SPApplication incorrect: ", request.getSpApplication(), spApplication); - assertEquals("Asserition consumer URL incorrect: ", request.getAssertionConsumerServiceURL(), assertConsumerUrl); - - assertEquals("SP Country incorrect: ", request.getSpCountry(), spCountry); - assertEquals("SP Id incorrect: ", request.getSPID(), spId); - assertEquals("CitizenCountryCode incorrect: ", request.getCitizenCountryCode(), "ES"); - - } - - /** - * Test validate file authentication request. Validate from XML file. - * - * @throws Exception - * the exception - */ - @Test - public final void testValidateFileAuthnRequest() throws Exception { - - final byte[] bytes = SSETestUtils.readStorkSamlFromFile("/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml"); - - try { - engine.validateSTORKAuthnRequest(bytes); - fail("testValidateFileAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error(e.getMessage()); - } - } - - /** - * Test validate file authentication request tag delete. - * - * @throws Exception - * the exception - */ - @Test - public final void testValidateFileAuthnRequestTagDelete() throws Exception { - - final byte[] bytes = SSETestUtils.readStorkSamlFromFile("/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml"); - - try { - engine.validateSTORKAuthnRequest(bytes); - fail("validateSTORKAuthnRequest(...) should have thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error(e.getMessage()); - - } - } - - /** - * Test validate authentication request not trusted token. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthnRequestNotTrustedErr1() throws STORKSAMLEngineException { - - try { - final STORKSAMLEngine engineNotTrusted = STORKSAMLEngine.getInstance("CONF2"); - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - - final byte[] authReqNotTrust = engineNotTrusted.generateSTORKAuthnRequest(request).getTokenSaml(); - - engine.validateSTORKAuthnRequest(authReqNotTrust); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - fail("validateSTORKAuthnRequestNotTrusted(...) should not have thrown an STORKSAMLEngineException!"); - } - } - - /** - * Test validate authentication request trusted. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthnRequestTrusted() throws STORKSAMLEngineException { - - final STORKSAMLEngine engineTrusted = STORKSAMLEngine.getInstance("CONF3"); - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - - final byte[] authReqNotTrust = engineTrusted.generateSTORKAuthnRequest(request).getTokenSaml(); - - // engine ("CONF1") no have trust certificate from "CONF2" - engine.validateSTORKAuthnRequest(authReqNotTrust); - - } - - /** - * Test generate authentication request service provider application null. - */ - @Test - public final void testGenerateAuthnRequestNADA() { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(null); - request.setSpInstitution(null); - request.setSpApplication(null); - request.setSpCountry(null); - - try { - - engine.validateSTORKAuthnRequest(authRequest); - - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - fail("generateSTORKAuthnRequest(...) should've thrown an STORKSAMLEngineException!"); - } - } - - /** - * Test validate authentication request with unknown elements. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthnRequestWithUnknownElements() throws STORKSAMLEngineException { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - IPersonalAttributeList pAttList = new PersonalAttributeList(); - - final PersonalAttribute unknown = new PersonalAttribute(); - unknown.setName("unknown"); - unknown.setIsRequired(true); - pAttList.add(unknown); - - final PersonalAttribute eIdentifier = new PersonalAttribute(); - eIdentifier.setName("eIdentifier"); - eIdentifier.setIsRequired(true); - pAttList.add(eIdentifier); - - request.setPersonalAttributeList(pAttList); - - // new parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - STORKAuthnRequest req = new STORKAuthnRequest(); - - req = engine3.generateSTORKAuthnRequest(request); - - req = engine.validateSTORKAuthnRequest(req.getTokenSaml()); - - assertNull("The value shouldn't exist", req.getPersonalAttributeList().get("unknown")); - assertNotNull("The value should exist", req.getPersonalAttributeList().get("eIdentifier")); - - } - - /** - * Test generate Request with required elements by default - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthnRequestWithIsRequiredElementsByDefault() throws STORKSAMLEngineException { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - IPersonalAttributeList pAttList = new PersonalAttributeList(); - - final PersonalAttribute eIdentifier = new PersonalAttribute(); - eIdentifier.setName("eIdentifier"); - eIdentifier.setIsRequired(true); - pAttList.add(eIdentifier); - - request.setPersonalAttributeList(pAttList); - - // new parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - STORKAuthnRequest req = new STORKAuthnRequest(); - STORKAuthnRequest reqTrue = new STORKAuthnRequest(); - STORKAuthnRequest reqFalse = new STORKAuthnRequest(); - - reqTrue = engine.generateSTORKAuthnRequest(request); - reqFalse = engine2.generateSTORKAuthnRequest(request); - req = engine3.generateSTORKAuthnRequest(request); - - String token = new String(req.getTokenSaml()); - String reqTrueToken = new String(reqTrue.getTokenSaml()); - String reqFalseToken = new String(reqFalse.getTokenSaml()); - - assertTrue("The token must contain the chain 'isRequired'", token.contains("isRequired")); - assertTrue("The token must contain the chain 'isRequired'", reqTrueToken.contains("isRequired")); - assertFalse("The token must contain the chain 'isRequired'", reqFalseToken.contains("isRequired")); - - } - - /** - * Test validating request and getting alias used to save the saml trusted certificate into trustore - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthnRequestGettingItsAlias() throws STORKSAMLEngineException { - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - IPersonalAttributeList pAttList = new PersonalAttributeList(); - - final PersonalAttribute eIdentifier = new PersonalAttribute(); - eIdentifier.setName("eIdentifier"); - eIdentifier.setIsRequired(true); - pAttList.add(eIdentifier); - - request.setPersonalAttributeList(pAttList); - - // new parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - STORKAuthnRequest req = new STORKAuthnRequest(); - - req = engine3.generateSTORKAuthnRequest(request); - req = engine.validateSTORKAuthnRequest(req.getTokenSaml()); - assertTrue("The alias should match this value", req.getAlias().equals("local-demo-cert")); - - req = engine2.generateSTORKAuthnRequest(request); - req = engine2.validateSTORKAuthnRequest(req.getTokenSaml()); - assertTrue("The alias should match this value", req.getAlias().equals("local-demo-cert")); - - } - - /** - * Test generating/validating request with signedDoc - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthnRequestWithSignedDoc() throws STORKSAMLEngineException { - - String signedDocRequest = "VGVzdCB0ZXh0"; - - final STORKAuthnRequest request = new STORKAuthnRequest(); - - PersonalAttributeList paler = new PersonalAttributeList(); - - final PersonalAttribute eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - paler.add(eIDNumber); - - final PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(true); - final ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - paler.add(isAgeOver); - - final PersonalAttribute signedDoc = new PersonalAttribute(); - signedDoc.setName("signedDoc"); - final ArrayList signedDocs = new ArrayList(); - signedDocs.add(signedDocRequest); - signedDoc.setValue(signedDocs); - signedDoc.setIsRequired(false); - paler.add(signedDoc); - - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(paler); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // new parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - STORKAuthnRequest req = new STORKAuthnRequest(); - - req = engine.generateSTORKAuthnRequest(request); - req = engine.validateSTORKAuthnRequest(req.getTokenSaml()); - - assertTrue("SignedDoc request should be the same: ", req.getPersonalAttributeList().get("signedDoc").getValue().get(0).equals(signedDocRequest)); - - } - -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkLogoutRequestTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkLogoutRequestTest.java deleted file mode 100644 index e05c660ea..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkLogoutRequestTest.java +++ /dev/null @@ -1,88 +0,0 @@ -package eu.stork.peps.test.simple; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; - -import org.junit.Test; -import org.opensaml.xml.parse.BasicParserPool; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.STORKLogoutRequest; -import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -public class StorkLogoutRequestTest { - - /** The engines. */ - private static STORKSAMLEngine engine = STORKSAMLEngine.getInstance("CONF1"); - private static STORKSAMLEngine engine0 = STORKSAMLEngine.getInstance("CONF0"); - private static STORKSAMLEngine engine2 = STORKSAMLEngine.getInstance("CONF2"); - private static STORKSAMLEngine engine3 = STORKSAMLEngine.getInstance("CONF3"); - - public StorkLogoutRequestTest() { - destination = "http://C-PEPS.gov.xx/PEPS/ColleagueRequest"; - spUserId = "IS/IS/1234567890"; - } - - /** The destination. */ - private String destination; - - /** The user id. */ - private String spUserId; - - /** The logout request. */ - private static byte[] logoutRequest; - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(StorkLogoutRequestTest.class.getName()); - - /** Parser manager used to parse XML. */ - private static BasicParserPool parser; - - static { - parser = new BasicParserPool(); - parser.setNamespaceAware(true); - } - - /** - * Test generate authentication request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateLogoutRequest() throws STORKSAMLEngineException { - - final STORKLogoutRequest request = new STORKLogoutRequest(); - - request.setDestination(destination); - - request.setSpProvidedId(spUserId); - - STORKLogoutRequest req1 = engine0.generateSTORKLogoutRequest(request); - byte[] reqByte = req1.getTokenSaml(); - FileOutputStream output = null; - - try { - output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/LogoutRequest.xml")); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(reqByte); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - LOG.info("STORKAttrQueryRequest 1: " + SSETestUtils.encodeSAMLToken(engine.generateSTORKLogoutRequest(request).getTokenSaml())); - - LOG.info("STORKAttrQueryRequest 2: " + SSETestUtils.encodeSAMLToken(engine.generateSTORKLogoutRequest(request).getTokenSaml())); - } - -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkLogoutResponseTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkLogoutResponseTest.java deleted file mode 100644 index b9907002a..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkLogoutResponseTest.java +++ /dev/null @@ -1,141 +0,0 @@ -package eu.stork.peps.test.simple; - -import static org.junit.Assert.*; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; - -import junit.framework.Assert; - -import org.junit.Test; -import org.opensaml.xml.parse.BasicParserPool; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.commons.STORKLogoutRequest; -import eu.stork.peps.auth.commons.STORKLogoutResponse; -import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -public class StorkLogoutResponseTest { - - /** The engines. */ - private static STORKSAMLEngine engine = STORKSAMLEngine.getInstance("CONF1"); - private static STORKSAMLEngine engine0 = STORKSAMLEngine.getInstance("CONF0"); - private static STORKSAMLEngine engine2 = STORKSAMLEngine.getInstance("CONF2"); - private static STORKSAMLEngine engine3 = STORKSAMLEngine.getInstance("CONF3"); - - public StorkLogoutResponseTest() { - destination = "http://C-PEPS.gov.xx/PEPS/ColleagueRequest"; - spUserId = "IS/IS/1234567890"; - } - - /** The destination. */ - private String destination; - - /** The user id. */ - private String spUserId; - - /** The logout request. */ - private static byte[] logoutRequest; - - /** The logout response. */ - private static byte[] logoutResponse; - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(StorkLogoutResponseTest.class.getName()); - - /** Parser manager used to parse XML. */ - private static BasicParserPool parser; - - static { - parser = new BasicParserPool(); - parser.setNamespaceAware(true); - } - - /** - * Test generate authentication request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateLogoutRequest() throws STORKSAMLEngineException { - - final STORKLogoutRequest request = new STORKLogoutRequest(); - - final STORKLogoutResponse response = new STORKLogoutResponse(); - - request.setDestination(destination); - response.setDestination(destination); - - request.setSpProvidedId(spUserId); - - STORKLogoutRequest req1 = engine0.generateSTORKLogoutRequest(request); - - STORKLogoutResponse res = engine0.generateSTORKLogoutResponse(req1, response); - - byte[] reqByte = res.getTokenSaml(); - FileOutputStream output = null; - - try { - output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/LogoutResponse.xml")); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(reqByte); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - assertNotNull(reqByte); - } - - /** - * Test generate authentication request. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateLogoutRequestFail() throws STORKSAMLEngineException { - - final STORKLogoutRequest request = new STORKLogoutRequest(); - - final STORKLogoutResponse response = new STORKLogoutResponse(); - - request.setDestination(destination); - response.setDestination(destination); - response.setStatusMessage("User not found."); - response.setStatusCode("1234"); - request.setSpProvidedId(spUserId); - - STORKLogoutRequest req1 = engine0.generateSTORKLogoutRequest(request); - - STORKLogoutResponse res = engine0.generateSTORKLogoutResponseFail(req1, response); - - byte[] reqByte = res.getTokenSaml(); - FileOutputStream output = null; - - try { - output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/LogoutResponseFail.xml")); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(reqByte); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - assertNotNull(reqByte); - } - -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkNewResponseTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkNewResponseTest.java deleted file mode 100644 index 876c2c14d..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkNewResponseTest.java +++ /dev/null @@ -1,510 +0,0 @@ -package eu.stork.peps.test.simple; - -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.fail; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -import org.junit.Test; -import org.opensaml.xml.parse.BasicParserPool; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKAttrQueryRequest; -import eu.stork.peps.auth.commons.STORKAttrQueryResponse; -import eu.stork.peps.auth.commons.STORKAuthnRequest; -import eu.stork.peps.auth.commons.STORKAuthnResponse; -import eu.stork.peps.auth.commons.STORKStatusCode; -import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -public class StorkNewResponseTest { - /** The engine. */ - private static STORKSAMLEngine engine = STORKSAMLEngine.getInstance("CONF1"); - private static STORKSAMLEngine engine0 = STORKSAMLEngine.getInstance("CONF0"); - - /** - * Gets the engine. - * - * @return the engine - */ - public static STORKSAMLEngine getEngine() { - return engine; - } - - public static STORKSAMLEngine getEngine2() { - return engine0; - } - - /** - * Sets the engine. - * - * @param newEngine - * the new engine - */ - public static void setEngine(final STORKSAMLEngine newEngine) { - StorkNewResponseTest.engine = newEngine; - } - - /** The destination. */ - private static String destination; - - /** The service provider name. */ - private static String spName; - - /** The service provider sector. */ - private static String spSector; - - /** The service provider institution. */ - private static String spInstitution; - - /** The service provider application. */ - private static String spApplication; - - /** The service provider country. */ - private static String spCountry; - - /** The service provider id. */ - private static String spId; - - /** The quality authentication assurance level. */ - private static final int QAAL = 3; - - /** The state. */ - private static String state = "ES"; - - /** The town. */ - private static String town = "Madrid"; - - /** The municipality code. */ - private static String municipalityCode = "MA001"; - - /** The postal code. */ - private static String postalCode = "28038"; - - /** The street name. */ - private static String streetName = "Marchamalo"; - - /** The street number. */ - private static String streetNumber = "3"; - - /** The apartament number. */ - private static String apartamentNumber = "5º E"; - - /** The List of Personal Attributes. */ - private static IPersonalAttributeList pal; - - /** The List of Personal Attributes. */ - private static IPersonalAttributeList pal2; - - /** The assertion consumer URL. */ - private static String assertConsumerUrl; - - /** The authentication request. */ - private static byte[] authRequest; - - /** The authentication response. */ - private static byte[] authResponse; - - /** The authentication request. */ - private static STORKAuthnRequest authenRequest; - - /** The authentication response. */ - private static STORKAuthnResponse authnResponse; - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(StorkResponseTest.class.getName()); - - /** - * Instantiates a new stork response test. - */ - public StorkNewResponseTest() { - super(); - } - - /** The IP address. */ - private static String ipAddress; - - /** The is hashing. */ - private final boolean isHashing = Boolean.TRUE; - - /** The is not hashing. */ - private final boolean isNotHashing = Boolean.FALSE; - - /** The ERROR text. */ - private static final String ERROR_TXT = "generateAuthnResponse(...) should've thrown an STORKSAMLEngineException!"; - - /** Parser manager used to parse XML. */ - private static BasicParserPool parser; - - /** The attribute query request. */ - private static STORKAttrQueryRequest attrQueryenRequest; - - /** The attribute query response. */ - private static STORKAttrQueryResponse attrQeuryenResponse; - - /** The attribute query request. */ - private static byte[] attrQueryRequest; - - /** The attribute query response. */ - private static byte[] attrQueryResponse; - - static { - parser = new BasicParserPool(); - parser.setNamespaceAware(true); - - pal = new PersonalAttributeList(); - pal2 = new PersonalAttributeList(); - - PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(false); - ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - pal.add(isAgeOver); - - PersonalAttribute dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - pal.add(dateOfBirth); - - PersonalAttribute eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - pal.add(eIDNumber); - - final PersonalAttribute givenName = new PersonalAttribute(); - givenName.setName("givenName"); - givenName.setIsRequired(true); - pal.add(givenName); - - PersonalAttribute canRessAddress = new PersonalAttribute(); - canRessAddress.setName("canonicalResidenceAddress"); - canRessAddress.setIsRequired(true); - pal.add(canRessAddress); - - PersonalAttribute newAttribute = new PersonalAttribute(); - newAttribute.setName("newAttribute2"); - newAttribute.setIsRequired(true); - pal.add(newAttribute); - - PersonalAttribute hasDegree = new PersonalAttribute(); - hasDegree.setName("hasDegree"); - List vals = new ArrayList(); - vals.add("Engineering"); - vals.add("Computer Science"); - hasDegree.setValue(vals); - pal2.add(hasDegree); - - PersonalAttribute mandate = new PersonalAttribute(); - mandate.setName("mandateContent"); - List manvalues = new ArrayList(); - manvalues.add("Powers"); - mandate.setValue(manvalues); - pal2.add(mandate); - - destination = "http://C-PEPS.gov.xx/PEPS/ColleagueRequest"; - assertConsumerUrl = "http://S-PEPS.gov.xx/PEPS/ColleagueResponse"; - spName = "University Oxford"; - - spName = "University of Oxford"; - spSector = "EDU001"; - spInstitution = "OXF001"; - spApplication = "APP001"; - spCountry = "EN"; - - spId = "EDU001-APP001-APP001"; - - final STORKAuthnRequest request = new STORKAuthnRequest(); - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - authRequest = getEngine().generateSTORKAuthnRequest(request).getTokenSaml(); - - authenRequest = getEngine().validateSTORKAuthnRequest(authRequest); - - } catch (STORKSAMLEngineException e) { - fail("Error create STORKAuthnRequest"); - } - - ipAddress = "111.222.333.444"; - - pal = new PersonalAttributeList(); - - isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(true); - ages = new ArrayList(); - - ages.add("16"); - ages.add("18"); - - isAgeOver.setValue(ages); - isAgeOver.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(isAgeOver); - - dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - final ArrayList date = new ArrayList(); - date.add("16/12/2008"); - dateOfBirth.setValue(date); - dateOfBirth.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(dateOfBirth); - - eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - final ArrayList idNumber = new ArrayList(); - idNumber.add("123456789PA"); - eIDNumber.setValue(idNumber); - eIDNumber.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(eIDNumber); - - canRessAddress = new PersonalAttribute(); - canRessAddress.setName("canonicalResidenceAddress"); - canRessAddress.setIsRequired(true); - canRessAddress.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - final HashMap address = new HashMap(); - - address.put("state", state); - address.put("municipalityCode", municipalityCode); - address.put("town", town); - address.put("postalCode", postalCode); - address.put("streetName", streetName); - address.put("streetNumber", streetNumber); - address.put("apartamentNumber", apartamentNumber); - - canRessAddress.setComplexValue(address); - pal.add(canRessAddress); - - newAttribute = new PersonalAttribute(); - newAttribute.setName("newAttribute2"); - newAttribute.setIsRequired(true); - newAttribute.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - final HashMap values = new HashMap(); - - values.put("value1", "value1"); - values.put("value2", "value2"); - values.put("value3", "value3"); - values.put("value4", "value4"); - - newAttribute.setComplexValue(values); - pal.add(newAttribute); - - final STORKAttrQueryRequest arequest = new STORKAttrQueryRequest(); - arequest.setDestination(destination); - // request.setProviderName(spName); - arequest.setQaa(QAAL); - arequest.setPersonalAttributeList(pal2); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - arequest.setSpSector(spSector); - arequest.setSpInstitution(spInstitution); - arequest.setSpApplication(spApplication); - arequest.setSpCountry(spCountry); - arequest.setSPID(spId); - arequest.setCitizenCountryCode("IS"); - arequest.setAssertionConsumerServiceURL(assertConsumerUrl); - - try { - attrQueryRequest = getEngine().generateSTORKAttrQueryRequest(arequest).getTokenSaml(); - - attrQueryenRequest = getEngine().validateSTORKAttrQueryRequest(attrQueryRequest); - - } catch (STORKSAMLEngineException e) { - fail("Error create STORKAuthnRequest"); - } - - } - - /** - * Test generate authentication request without errors. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthnResponseWithSimpleRes() throws STORKSAMLEngineException { - - // Create the response holding pal - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(pal); - - // List of query responses - List resList = new ArrayList(); - - final STORKAttrQueryResponse aResponse1 = new STORKAttrQueryResponse(); - aResponse1.setPersonalAttributeList(pal2); - - final STORKAttrQueryResponse aStorkResponse1 = getEngine2().generateSTORKAttrQueryResponse(attrQueryenRequest, aResponse1, ipAddress, destination, isNotHashing); - - attrQueryResponse = aStorkResponse1.getTokenSaml(); - - resList.add(getEngine2().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress)); - - final STORKAttrQueryResponse aResponse2 = new STORKAttrQueryResponse(); - aResponse2.setPersonalAttributeList(pal2); - - final STORKAttrQueryResponse aStorkResponse2 = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, aResponse2, ipAddress, destination, isNotHashing); - - attrQueryResponse = aStorkResponse2.getTokenSaml(); - - resList.add(getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress)); - - // Create the final response containing query responses - final STORKAuthnResponse storkResponse = getEngine().generateSTORKAuthnResponseAfterQuery(authenRequest, response, ipAddress, isNotHashing, resList); - - authResponse = storkResponse.getTokenSaml(); - - // Validate, write out and print out the attribute lists a - STORKAuthnResponse finalResponse = getEngine().validateSTORKAuthnResponseWithQuery(authResponse, ipAddress); - System.out.println("The original pal: " + finalResponse.getPersonalAttributeList().toString()); - for (int i = 0; i < finalResponse.getPersonalAttributeLists().size(); i++) { - System.out.println("Pal " + Integer.toString(i) + ": " + finalResponse.getPersonalAttributeLists().get(i).toString()); - } - System.out.println("The total pal: " + finalResponse.getTotalPersonalAttributeList().toString()); - - FileOutputStream output = null; - - try { - output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthAttrQResponse.xml")); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(authResponse); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * Test generate authentication request without errors. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthnResponseWithComplexRes() throws STORKSAMLEngineException { - - // Create the response holding pal - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(pal); - - // Create a list for the attribute query responses we have - List resList = new ArrayList(); - - // Create the first attribute query response - final STORKAttrQueryResponse aResponse1 = new STORKAttrQueryResponse(); - aResponse1.setPersonalAttributeList(pal2); - - // Generate the first response - final STORKAttrQueryResponse aStorkResponse1 = getEngine2().generateSTORKAttrQueryResponse(attrQueryenRequest, aResponse1, ipAddress, destination, isNotHashing); - - attrQueryResponse = aStorkResponse1.getTokenSaml(); - - // Validate it and add to the response list - resList.add(getEngine2().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress)); - - // Create a second response like the first - final STORKAttrQueryResponse aResponse2 = new STORKAttrQueryResponse(); - aResponse2.setPersonalAttributeList(pal2); - - final STORKAttrQueryResponse aStorkResponse2 = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, aResponse2, ipAddress, destination, isNotHashing); - - attrQueryResponse = aStorkResponse2.getTokenSaml(); - - resList.add(getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress)); - - // Create a attribute query response which contains multiple assertions from an AP - final STORKAttrQueryResponse aResponseMulti = new STORKAttrQueryResponse(); - aResponseMulti.setPersonalAttributeList(pal2); - - // Create a list for the responses which the multiple assertion response will hold - List multiResponses = new ArrayList(); - - // Create two more simple responses which the multi assertion response will hold - final STORKAttrQueryResponse aResponse3 = new STORKAttrQueryResponse(); - aResponse3.setPersonalAttributeList(pal2); - - final STORKAttrQueryResponse aStorkResponse3 = getEngine2().generateSTORKAttrQueryResponse(attrQueryenRequest, aResponse3, ipAddress, destination, isNotHashing); - - attrQueryResponse = aStorkResponse3.getTokenSaml(); - // Validate and add to the multi response - multiResponses.add(getEngine2().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress)); - - final STORKAttrQueryResponse aResponse4 = new STORKAttrQueryResponse(); - aResponse4.setPersonalAttributeList(pal2); - - final STORKAttrQueryResponse aStorkResponse4 = getEngine().generateSTORKAttrQueryResponse(attrQueryenRequest, aResponse4, ipAddress, destination, isNotHashing); - - attrQueryResponse = aStorkResponse4.getTokenSaml(); - - multiResponses.add(getEngine2().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress)); - - // Generate the multi assertion query response - final STORKAttrQueryResponse aStorkResponseMulti = getEngine().generateSTORKAttrQueryResponseWithAssertions(attrQueryenRequest, aResponseMulti, multiResponses, ipAddress, destination, - isNotHashing); - - attrQueryResponse = aStorkResponseMulti.getTokenSaml(); - - // Add to the list of query responses - resList.add(getEngine().validateSTORKAttrQueryResponse(attrQueryResponse, ipAddress)); - - // Generate the stork response with all the query responses - final STORKAuthnResponse storkResponse = getEngine().generateSTORKAuthnResponseAfterQuery(authenRequest, response, ipAddress, isNotHashing, resList); - - authResponse = storkResponse.getTokenSaml(); - - // Validate it, write out and print out the personal attribute lists - STORKAuthnResponse finalResponse = getEngine().validateSTORKAuthnResponseWithQuery(authResponse, ipAddress); - System.out.println("The original pal: " + finalResponse.getPersonalAttributeList().toString()); - for (int i = 0; i < finalResponse.getPersonalAttributeLists().size(); i++) { - System.out.println("Pal " + Integer.toString(i) + ": " + finalResponse.getPersonalAttributeLists().get(i).toString()); - } - System.out.println("The total pal: " + finalResponse.getTotalPersonalAttributeList().toString()); - - FileOutputStream output = null; - - try { - output = new FileOutputStream(new File(System.getProperty("user.dir") + "/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthAttrQMultiAssertResponse.xml")); - } catch (FileNotFoundException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - try { - output.write(authResponse); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - assertNotNull(finalResponse); - } -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkResponseTest.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkResponseTest.java deleted file mode 100644 index d09ed7648..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/StorkResponseTest.java +++ /dev/null @@ -1,873 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -package eu.stork.peps.test.simple; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.Iterator; -import java.util.List; - -import org.junit.Ignore; -import org.junit.Test; -import org.opensaml.xml.parse.BasicParserPool; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import eu.stork.peps.auth.commons.IPersonalAttributeList; -import eu.stork.peps.auth.commons.PEPSUtil; -import eu.stork.peps.auth.commons.PersonalAttribute; -import eu.stork.peps.auth.commons.PersonalAttributeList; -import eu.stork.peps.auth.commons.STORKAttrQueryRequest; -import eu.stork.peps.auth.commons.STORKAttrQueryResponse; -import eu.stork.peps.auth.commons.STORKAuthnRequest; -import eu.stork.peps.auth.commons.STORKAuthnResponse; -import eu.stork.peps.auth.commons.STORKStatusCode; -import eu.stork.peps.auth.commons.STORKSubStatusCode; -import eu.stork.peps.auth.engine.STORKSAMLEngine; -import eu.stork.peps.exceptions.STORKSAMLEngineException; - -/** - * The Class AuthRequestTest. - */ -public class StorkResponseTest { - - /** The engine. */ - private static STORKSAMLEngine engine = STORKSAMLEngine.getInstance("CONF1"); - - /** - * Gets the engine. - * - * @return the engine - */ - public static STORKSAMLEngine getEngine() { - return engine; - } - - /** - * Sets the engine. - * - * @param newEngine - * the new engine - */ - public static void setEngine(final STORKSAMLEngine newEngine) { - StorkResponseTest.engine = newEngine; - } - - /** The destination. */ - private static String destination; - - /** The service provider name. */ - private static String spName; - - /** The service provider sector. */ - private static String spSector; - - /** The service provider institution. */ - private static String spInstitution; - - /** The service provider application. */ - private static String spApplication; - - /** The service provider country. */ - private static String spCountry; - - /** The service provider id. */ - private static String spId; - - /** The quality authentication assurance level. */ - private static final int QAAL = 3; - - /** The state. */ - private static String state = "ES"; - - /** The town. */ - private static String town = "Madrid"; - - /** The municipality code. */ - private static String municipalityCode = "MA001"; - - /** The postal code. */ - private static String postalCode = "28038"; - - /** The street name. */ - private static String streetName = "Marchamalo"; - - /** The street number. */ - private static String streetNumber = "3"; - - /** The apartament number. */ - private static String apartamentNumber = "5º E"; - - /** The List of Personal Attributes. */ - private static IPersonalAttributeList pal; - - /** The assertion consumer URL. */ - private static String assertConsumerUrl; - - /** The authentication request. */ - private static byte[] authRequest; - - /** The authentication response. */ - private static byte[] authResponse; - - /** The authentication request. */ - private static STORKAuthnRequest authenRequest; - - /** The authentication response. */ - private static STORKAuthnResponse authnResponse; - - /** The Constant LOG. */ - private static final Logger LOG = LoggerFactory.getLogger(StorkResponseTest.class.getName()); - - /** - * Instantiates a new stork response test. - */ - public StorkResponseTest() { - super(); - } - - /** The IP address. */ - private static String ipAddress; - - /** The is hashing. */ - private final boolean isHashing = Boolean.TRUE; - - /** The is not hashing. */ - private final boolean isNotHashing = Boolean.FALSE; - - /** The ERROR text. */ - private static final String ERROR_TXT = "generateAuthnResponse(...) should've thrown an STORKSAMLEngineException!"; - - /** Parser manager used to parse XML. */ - private static BasicParserPool parser; - - static { - parser = new BasicParserPool(); - parser.setNamespaceAware(true); - - pal = new PersonalAttributeList(); - - PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(false); - ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - pal.add(isAgeOver); - - PersonalAttribute dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - pal.add(dateOfBirth); - - PersonalAttribute eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - pal.add(eIDNumber); - - final PersonalAttribute givenName = new PersonalAttribute(); - givenName.setName("givenName"); - givenName.setIsRequired(true); - pal.add(givenName); - - PersonalAttribute canRessAddress = new PersonalAttribute(); - canRessAddress.setName("canonicalResidenceAddress"); - canRessAddress.setIsRequired(true); - pal.add(canRessAddress); - - PersonalAttribute newAttribute = new PersonalAttribute(); - newAttribute.setName("newAttribute2"); - newAttribute.setIsRequired(true); - pal.add(newAttribute); - - destination = "http://C-PEPS.gov.xx/PEPS/ColleagueRequest"; - assertConsumerUrl = "http://S-PEPS.gov.xx/PEPS/ColleagueResponse"; - spName = "University Oxford"; - - spName = "University of Oxford"; - spSector = "EDU001"; - spInstitution = "OXF001"; - spApplication = "APP001"; - spCountry = "EN"; - - spId = "EDU001-APP001-APP001"; - - final STORKAuthnRequest request = new STORKAuthnRequest(); - request.setDestination(destination); - request.setProviderName(spName); - request.setQaa(QAAL); - request.setPersonalAttributeList(pal); - request.setAssertionConsumerServiceURL(assertConsumerUrl); - - // news parameters - request.setSpSector(spSector); - request.setSpInstitution(spInstitution); - request.setSpApplication(spApplication); - request.setSpCountry(spCountry); - request.setSPID(spId); - request.setCitizenCountryCode("ES"); - - try { - authRequest = getEngine().generateSTORKAuthnRequest(request).getTokenSaml(); - - authenRequest = getEngine().validateSTORKAuthnRequest(authRequest); - - } catch (STORKSAMLEngineException e) { - fail("Error create STORKAuthnRequest"); - } - - ipAddress = "111.222.333.444"; - - pal = new PersonalAttributeList(); - - isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(true); - ages = new ArrayList(); - - ages.add("16"); - ages.add("18"); - - isAgeOver.setValue(ages); - isAgeOver.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(isAgeOver); - - dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - final ArrayList date = new ArrayList(); - date.add("16/12/2008"); - dateOfBirth.setValue(date); - dateOfBirth.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(dateOfBirth); - - eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - final ArrayList idNumber = new ArrayList(); - idNumber.add("123456789PÑ"); - eIDNumber.setValue(idNumber); - eIDNumber.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - pal.add(eIDNumber); - - canRessAddress = new PersonalAttribute(); - canRessAddress.setName("canonicalResidenceAddress"); - canRessAddress.setIsRequired(true); - canRessAddress.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - final HashMap address = new HashMap(); - - address.put("state", state); - address.put("municipalityCode", municipalityCode); - address.put("town", town); - address.put("postalCode", postalCode); - address.put("streetName", streetName); - address.put("streetNumber", streetNumber); - address.put("apartamentNumber", apartamentNumber); - - canRessAddress.setComplexValue(address); - pal.add(canRessAddress); - - newAttribute = new PersonalAttribute(); - newAttribute.setName("newAttribute2"); - newAttribute.setIsRequired(true); - newAttribute.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - final HashMap values = new HashMap(); - - values.put("value1", "value1"); - values.put("value2", "value2"); - values.put("value3", "value3"); - values.put("value4", "value4"); - - newAttribute.setComplexValue(values); - pal.add(newAttribute); - - } - - /** - * Test generate authentication request without errors. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthnResponse() throws STORKSAMLEngineException { - - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(pal); - - final STORKAuthnResponse storkResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing); - - authResponse = storkResponse.getTokenSaml(); - - LOG.info("RESPONSE: " + SSETestUtils.encodeSAMLToken(authResponse)); - - } - - /** - * Test validation id parameter mandatory. - */ - @Test - public final void testResponseMandatoryId() { - final String identifier = authenRequest.getSamlId(); - authenRequest.setSamlId(null); - - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(pal); - - try { - getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isHashing); - fail(ERROR_TXT); - } catch (STORKSAMLEngineException e) { - authenRequest.setSamlId(identifier); - LOG.error("Error"); - } - } - - /** - * Test generate authentication response in response to err1. - */ - @Test - public final void testResponseMandatoryIssuer() { - - final String issuer = authenRequest.getIssuer(); - authenRequest.setIssuer(null); - - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(pal); - - try { - getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isHashing); - fail(ERROR_TXT); - } catch (STORKSAMLEngineException e) { - authenRequest.setIssuer(issuer); - LOG.error("Error"); - } - } - - /** - * Test generate authentication response assertion consumer null. - */ - @Test - public final void testResponseMandatoryAssertionConsumerServiceURL() { - final String asserConsumerUrl = authenRequest.getAssertionConsumerServiceURL(); - authenRequest.setAssertionConsumerServiceURL(null); - - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(pal); - try { - getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isHashing); - fail("generateAuthnResponse(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - authenRequest.setAssertionConsumerServiceURL(asserConsumerUrl); - LOG.error("Error"); - } - } - - /** - * Test generate authentication response IP address null. - */ - @Test - public final void testResponseValidationIP() { - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(pal); - - try { - getEngine().generateSTORKAuthnResponse(authenRequest, response, null, isHashing); - fail("generateAuthnResponse(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication response with personal attribute list null. - */ - @Test - public final void testResponseMandatoryPersonalAttributeList() { - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(null); - - try { - getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isHashing); - fail("generateAuthnResponse(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response token null. - */ - @Test - public final void testResponseInvalidParametersToken() { - try { - getEngine().validateSTORKAuthnResponse(null, ipAddress); - fail(ERROR_TXT); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response IP null. - */ - @Test - public final void testResponseInvalidParametersIP() { - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setPersonalAttributeList(pal); - try { - authResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAuthnResponse(authResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response parameter name wrong. - */ - @Test - public final void testResponseInvalidParametersAttr() { - final STORKAuthnResponse response = new STORKAuthnResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("AttrWrong"); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - authResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAuthnResponse(authResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response set null value into attribute. - */ - @Test - public final void testResponseInvalidParametersAttrSimpleValue() { - final STORKAuthnResponse response = new STORKAuthnResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("isAgeOver"); - worngAttr.setValue(null); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - authResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAuthnResponse(authResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response set null value into attribute. - */ - @Test - public final void testResponseInvalidParametersAttrNoValue() { - final STORKAuthnResponse response = new STORKAuthnResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("isAgeOver"); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - authResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAuthnResponse(authResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response set null value into attribute. - */ - @Test - public final void testResponseInvalidParametersAttrNoName() { - final STORKAuthnResponse response = new STORKAuthnResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - authResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAuthnResponse(authResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response set null complex value into attribute. - */ - @Test - public final void testResponseInvalidParametersAttrComplexValue() { - final STORKAuthnResponse response = new STORKAuthnResponse(); - final IPersonalAttributeList wrongList = new PersonalAttributeList(); - - final PersonalAttribute worngAttr = new PersonalAttribute(); - worngAttr.setName("isAgeOver"); - worngAttr.setComplexValue(null); - wrongList.add(worngAttr); - - response.setPersonalAttributeList(wrongList); - try { - authResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - // In Conf1 ipValidate is false - getEngine().validateSTORKAuthnResponse(authResponse, null); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response IP distinct and disabled validation IP. - */ - @Test - public final void testResponseInvalidParametersIPDistinct() { - try { - // ipAddress origin "111.222.333.444" - // ipAddrValidation = false - // Subject Confirmation Bearer. - - getEngine().validateSTORKAuthnResponse(authResponse, "127.0.0.1"); - fail("validateAuthenticationResponse(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test response invalid parameters invalid token. - */ - @Test - public final void testResponseInvalidParametersTokenMsg() { - try { - // ipAddress origin "111.222.333.444" - // Subject Confirmation Bearer. - getEngine().validateSTORKAuthnResponse("errorMessage".getBytes(), ipAddress); - fail("validateAuthenticationResponse(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test validate authentication response is fail. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthenticationResponseIsFail() throws STORKSAMLEngineException { - if (authResponse == null) - testGenerateAuthnResponse(); - - authnResponse = getEngine().validateSTORKAuthnResponse(authResponse, ipAddress); - - assertFalse("Generate incorrect response: ", authnResponse.isFail()); - } - - /** - * Test validate authentication response destination. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthenticationResponseDestination() throws STORKSAMLEngineException { - authnResponse = getEngine().validateSTORKAuthnResponse(authResponse, ipAddress); - - assertEquals("Destination incorrect: ", authnResponse.getInResponseTo(), authenRequest.getSamlId()); - } - - /** - * Test validate authentication response values. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - public final void testValidateAuthenticationResponseValuesComplex() throws STORKSAMLEngineException { - authnResponse = getEngine().validateSTORKAuthnResponse(authResponse, ipAddress); - - assertEquals("Country incorrect:", authnResponse.getCountry(), "EN"); - - final Iterator iterator = authnResponse.getPersonalAttributeList().iterator(); - - while (iterator.hasNext()) { - final PersonalAttribute attribute = iterator.next(); - if (attribute.getName().equalsIgnoreCase("canonicalResidenceAddress")) { - assertEquals("State incorrect: ", state, attribute.getComplexValue().get("state")); - assertEquals("Municipality Code incorrect: ", municipalityCode, attribute.getComplexValue().get("municipalityCode")); - assertEquals("Town incorrect: ", town, attribute.getComplexValue().get("town")); - assertEquals("Postal code incorrect: ", postalCode, attribute.getComplexValue().get("postalCode")); - assertEquals("Street name incorrect: ", streetName, attribute.getComplexValue().get("streetName")); - assertEquals("Street number incorrect: ", streetNumber, attribute.getComplexValue().get("streetNumber")); - assertEquals("Apartament number incorrect: ", apartamentNumber, attribute.getComplexValue().get("apartamentNumber")); - } - } - } - - /** - * Test generate authenticate response fail in response to it's null. - * - * @throws STORKSAMLEngineException - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - // ( expected=STORKSAMLEngineException.class) - public final void testGenerateAuthnResponseFailInResponseToNull() throws STORKSAMLEngineException { - final String identifier = authenRequest.getSamlId(); - authenRequest.setSamlId(null); - - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setStatusCode(STORKStatusCode.REQUESTER_URI.toString()); - response.setSubStatusCode(STORKSubStatusCode.AUTHN_FAILED_URI.toString()); - response.setMessage(""); - - try { - authResponse = getEngine().generateSTORKAuthnResponseFail(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - fail(ERROR_TXT); - } catch (STORKSAMLEngineException e) { - authenRequest.setSamlId(identifier); - LOG.error("Error"); - // throw new STORKSAMLEngineException(e); - } - } - - /** - * Test generate authenticate response fail assertion consumer URL err1. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthnResponseFailAssertionConsumerUrlNull() throws STORKSAMLEngineException { - - final String assertConsumerUrl = authenRequest.getAssertionConsumerServiceURL(); - authenRequest.setAssertionConsumerServiceURL(null); - - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setStatusCode(STORKStatusCode.REQUESTER_URI.toString()); - response.setSubStatusCode(STORKSubStatusCode.AUTHN_FAILED_URI.toString()); - response.setMessage(""); - - try { - authResponse = getEngine().generateSTORKAuthnResponseFail(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - fail("generateAuthnResponseFail(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - authenRequest.setAssertionConsumerServiceURL(assertConsumerUrl); - LOG.error("Error"); - } - } - - /** - * Test generate authentication response fail code error err1. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthnResponseFailCodeErrorNull() throws STORKSAMLEngineException { - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setStatusCode(null); - response.setSubStatusCode(STORKSubStatusCode.AUTHN_FAILED_URI.toString()); - response.setMessage(""); - - try { - authResponse = getEngine().generateSTORKAuthnResponseFail(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - fail("generateAuthnResponseFail(...) should've thrown an STORKSAMLEngineException!"); - } catch (STORKSAMLEngineException e) { - LOG.error("Error"); - } - } - - /** - * Test generate authentication request without errors. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthnResponse() throws STORKSAMLEngineException { - - IPersonalAttributeList palist = new PersonalAttributeList(); - - PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(true); - ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - isAgeOver.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - palist.add(isAgeOver); - - PersonalAttribute dateOfBirth = new PersonalAttribute(); - dateOfBirth.setName("dateOfBirth"); - dateOfBirth.setIsRequired(false); - final ArrayList date = new ArrayList(); - date.add("16/12/2008"); - dateOfBirth.setValue(date); - dateOfBirth.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - palist.add(dateOfBirth); - - PersonalAttribute eIDNumber = new PersonalAttribute(); - eIDNumber.setName("eIdentifier"); - eIDNumber.setIsRequired(true); - - final ArrayList idNumber = new ArrayList(); - idNumber.add("123456789PÑ"); - - final HashMap complex = new HashMap(); - complex.put("one", "two"); - - // eIDNumber.setValue(null); - // eIDNumber.setValue(idNumber); - // eIDNumber.setComplexValue(complex); - - eIDNumber.setStatus(STORKStatusCode.STATUS_NOT_AVAILABLE.toString()); - palist.add(eIDNumber); - - PersonalAttribute canRessAddress = new PersonalAttribute(); - canRessAddress.setName("canonicalResidenceAddress"); - canRessAddress.setIsRequired(true); - canRessAddress.setStatus(STORKStatusCode.STATUS_AVAILABLE.toString()); - final HashMap address = new HashMap(); - - address.put("state", state); - address.put("municipalityCode", municipalityCode); - address.put("town", town); - address.put("postalCode", postalCode); - address.put("streetName", streetName); - address.put("streetNumber", streetNumber); - address.put("apartamentNumber", apartamentNumber); - - canRessAddress.setComplexValue(address); - palist.add(canRessAddress); - - final STORKAuthnResponse response = new STORKAuthnResponse(); - - response.setPersonalAttributeList(palist); - - final STORKAuthnResponse storkResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing); - - authResponse = storkResponse.getTokenSaml(); - LOG.info("Request id: " + authenRequest.getSamlId()); - - LOG.info("RESPONSE: " + SSETestUtils.encodeSAMLToken(authResponse)); - - authnResponse = getEngine().validateSTORKAuthnResponse(authResponse, ipAddress); - - LOG.info("RESPONSE ID: " + authnResponse.getSamlId()); - LOG.info("RESPONSE IN_RESPONSE_TO: " + authnResponse.getInResponseTo()); - LOG.info("RESPONSE COUNTRY: " + authnResponse.getCountry()); - - } - - /** - * Test validate authentication response fail is fail. - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testValidateAuthenticationResponseFailIsFail() throws STORKSAMLEngineException { - - final STORKAuthnResponse response = new STORKAuthnResponse(); - response.setStatusCode(STORKStatusCode.REQUESTER_URI.toString()); - response.setSubStatusCode(STORKSubStatusCode.AUTHN_FAILED_URI.toString()); - response.setMessage("message"); - - authResponse = getEngine().generateSTORKAuthnResponseFail(authenRequest, response, ipAddress, isNotHashing).getTokenSaml(); - - LOG.error("ERROR_FAIL: " + PEPSUtil.encodeSAMLToken(authResponse)); - - authnResponse = getEngine().validateSTORKAuthnResponse(authResponse, ipAddress); - - LOG.info("COUNTRY: " + authnResponse.getCountry()); - assertTrue("Generate incorrect response: ", authnResponse.isFail()); - } - - /** - * Test generate/validate response with signedDoc - * - * @throws STORKSAMLEngineException - * the STORKSAML engine exception - */ - @Test - public final void testGenerateAuthenResponseWithSignedDoc() throws STORKSAMLEngineException { - - String signedDocResponse = " urn:oasis:names:tc:dss:1.0:resultmajor:Success PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48ZHM6U2lnbmF0dXJlIHhtbG5zOmRzPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjIiBJZD0iU2lnbmF0dXJlLThlYWJkMGE1LTY2MGQtNGFmZC05OTA1LTBhYmM3NTUzZDE5Mi1TaWduYXR1cmUiPjxkczpTaWduZWRJbmZvPjxkczpDYW5vbmljYWxpemF0aW9uTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvVFIvMjAwMS9SRUMteG1sLWMxNG4tMjAwMTAzMTUiLz48ZHM6U2lnbmF0dXJlTWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI3JzYS1zaGExIi8+PGRzOlJlZmVyZW5jZSBJZD0iUmVmZXJlbmNlLWJhYmE0ZDFhLWExN2UtNDJjNi05N2QyLWJlZWUxMzUwOTUwMyIgVHlwZT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI09iamVjdCIgVVJJPSIjT2JqZWN0LTk4NzMzY2RlLThiY2MtNDhhMC05Yjc3LTBlOTk5N2JkZDA1OCI+PGRzOlRyYW5zZm9ybXM+PGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNiYXNlNjQiLz48L2RzOlRyYW5zZm9ybXM+PGRzOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNzaGExIi8+PGRzOkRpZ2VzdFZhbHVlPkNrMVZxTmQ0NVFJdnEzQVpkOFhZUUx2RWh0QT08L2RzOkRpZ2VzdFZhbHVlPjwvZHM6UmVmZXJlbmNlPjxkczpSZWZlcmVuY2UgVHlwZT0iaHR0cDovL3VyaS5ldHNpLm9yZy8wMTkwMyNTaWduZWRQcm9wZXJ0aWVzIiBVUkk9IiNTaWduYXR1cmUtOGVhYmQwYTUtNjYwZC00YWZkLTk5MDUtMGFiYzc1NTNkMTkyLVNpZ25lZFByb3BlcnRpZXMiPjxkczpEaWdlc3RNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjc2hhMSIvPjxkczpEaWdlc3RWYWx1ZT5BNVk5MW40cXBMZ3l0VFc3ZnhqWENVZVJ2NTQ9PC9kczpEaWdlc3RWYWx1ZT48L2RzOlJlZmVyZW5jZT48ZHM6UmVmZXJlbmNlIFVSST0iI1NpZ25hdHVyZS04ZWFiZDBhNS02NjBkLTRhZmQtOTkwNS0wYWJjNzU1M2QxOTItS2V5SW5mbyI+PGRzOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNzaGExIi8+PGRzOkRpZ2VzdFZhbHVlPlZQWDRuS0Z5UzZyRitGNmNSUjBQck5aZHc2Zz08L2RzOkRpZ2VzdFZhbHVlPjwvZHM6UmVmZXJlbmNlPjwvZHM6U2lnbmVkSW5mbz48ZHM6U2lnbmF0dXJlVmFsdWUgSWQ9IlNpZ25hdHVyZS04ZWFiZDBhNS02NjBkLTRhZmQtOTkwNS0wYWJjNzU1M2QxOTItU2lnbmF0dXJlVmFsdWUiPkxiS04vL0M3WGt5eFR0WVRpQ1VScjhuWnp4QW1zdGNNZDBDZ0VBQ3JLMWR5Z1JIcUdjSzR4dHMrV0NVOFB5RXFXclJJVFl6SXV3LzcNClY0Wno5VFQ2MHA0S1RNZXd1UUw2NHNrRVN4MllnMkVkaWtTTyt0S3hXa2hyYVVzbVZiR2JQbW1jbUR2OTd0SER3ODg3NDdlRnE1RjUNCnYrYVZTeUF6MDNpVUttdVNlSDg9PC9kczpTaWduYXR1cmVWYWx1ZT48ZHM6S2V5SW5mbyBJZD0iU2lnbmF0dXJlLThlYWJkMGE1LTY2MGQtNGFmZC05OTA1LTBhYmM3NTUzZDE5Mi1LZXlJbmZvIj48ZHM6S2V5VmFsdWU+PGRzOlJTQUtleVZhbHVlPjxkczpNb2R1bHVzPnd1Y21qOXRJV3J2d2JTVFVEZndLbCtKdERNTUVSMGNMZDZEa0JTcjc5MHQrckdOakVTcVlqUndFSWVCbktvUUhQeDVIb1JlRjg4L3QNCnFZOStDaEVYcExITHM5cDVhWDdTREp1YnBRTWZwMXRERlgzNHl3Z3hTUXZjZWVKUVdCWGppZXVJbWZDMjFzNGJPY2dKYlYxaGJpZ1MNCnpPS1RRS3IxVHpkR1IrdVJ5MDA9PC9kczpNb2R1bHVzPjxkczpFeHBvbmVudD5BUUFCPC9kczpFeHBvbmVudD48L2RzOlJTQUtleVZhbHVlPjwvZHM6S2V5VmFsdWU+PGRzOlg1MDlEYXRhPjxkczpYNTA5Q2VydGlmaWNhdGU+TUlJSW1UQ0NCNEdnQXdJQkFnSURBWFVVTUEwR0NTcUdTSWIzRFFFQkJRVUFNSUlCT3pFTE1Ba0dBMVVFQmhNQ1JWTXhPekE1QmdOVg0KQkFvVE1rRm5aVzVqYVdFZ1EyRjBZV3hoYm1FZ1pHVWdRMlZ5ZEdsbWFXTmhZMmx2SUNoT1NVWWdVUzB3T0RBeE1UYzJMVWtwTVRRdw0KTWdZRFZRUUhFeXRRWVhOellYUm5aU0JrWlNCc1lTQkRiMjVqWlhCamFXOGdNVEVnTURnd01EZ2dRbUZ5WTJWc2IyNWhNUzR3TEFZRA0KVlFRTEV5VlRaWEoyWldseklGQjFZbXhwWTNNZ1pHVWdRMlZ5ZEdsbWFXTmhZMmx2SUVWRFZpMHlNVFV3TXdZRFZRUUxFeXhXWldkbA0KZFNCb2RIUndjem92TDNkM2R5NWpZWFJqWlhKMExtNWxkQzkyWlhKRFNVTXRNaUFvWXlrd016RTFNRE1HQTFVRUN4TXNSVzUwYVhSaA0KZENCd2RXSnNhV05oSUdSbElHTmxjblJwWm1sallXTnBieUJrWlNCamFYVjBZV1JoYm5NeEd6QVpCZ05WQkFNVEVsQlNSVkJTVDBSVg0KUTBOSlR5QkpSRU5oZERBZUZ3MHhNREF5TVRFeE9ESXlNRFJhRncweE5EQXlNVEF4T0RJeU1EUmFNSUd3TVFzd0NRWURWUVFHRXdKRg0KVXpFMU1ETUdBMVVFQ3hNc1ZtVm5aWFVnYUhSMGNITTZMeTkzZDNjdVkyRjBZMlZ5ZEM1dVpYUXZkbVZ5U1VSRFlYUWdLR01wTURNeA0KRmpBVUJnTlZCQVFURFVKRlVreEJUa2RCSUZOUFZFOHhGekFWQmdOVkJDb1REazFCVWtsQklFVk9SMUpCUTBsQk1SSXdFQVlEVlFRRg0KRXdreE1EQXdNRGswTkZNeEpUQWpCZ05WQkFNVEhFMUJVa2xCSUVWT1IxSkJRMGxCSUVKRlVreEJUa2RCSUZOUFZFOHdnWjh3RFFZSg0KS29aSWh2Y05BUUVCQlFBRGdZMEFNSUdKQW9HQkFNTG5Kby9iU0ZxNzhHMGsxQTM4Q3BmaWJRekRCRWRIQzNlZzVBVXErL2RMZnF4ag0KWXhFcW1JMGNCQ0hnWnlxRUJ6OGVSNkVYaGZQUDdhbVBmZ29SRjZTeHk3UGFlV2wrMGd5Ym02VURINmRiUXhWOStNc0lNVWtMM0huaQ0KVUZnVjQ0bnJpSm53dHRiT0d6bklDVzFkWVc0b0VzemlrMENxOVU4M1JrZnJrY3ROQWdNQkFBR2pnZ1N3TUlJRXJEQU1CZ05WSFJNQg0KQWY4RUFqQUFNQTRHQTFVZER3RUIvd1FFQXdJRm9EQ0J6QVlEVlIwUkJJSEVNSUhCZ1E5aWMyOTBiMEJuYldGcGJDNWpiMjJrZ1lVdw0KZ1lJeEN6QUpCZ05WQkFZVEFrVlRNU3N3S1FZRFZRUUtGQ0pCWjhPb2JtTnBZU0JEWVhSaGJHRnVZU0JrWlNCRFpYSjBhV1pwWTJGag0KYWNPek1RNHdEQVlEVlFRTEV3VkpSRU5CVkRFUE1BMEdBMVVFQlJNR01ERTNOVEUwTVNVd0l3WURWUVFERXh4TlFWSkpRU0JGVGtkUw0KUVVOSlFTQkNSVkpNUVU1SFFTQlRUMVJQb0JBR0Npc0dBUVFCOVhnQkFRR2dBZ3dBb0JRR0RsWUVBQUVEQmdFRUFmVjRBUUVDb0FJTQ0KQURBZkJnTlZIUklFR0RBV2dSUmxZMTlwWkdOaGRFQmpZWFJqWlhKMExtNWxkREFkQmdOVkhRNEVGZ1FVQUZYanVOc2tCMk1seXZVQg0KaDdwOFRKMHVKMHd3Z2dGSUJnTlZIU01FZ2dFL01JSUJPNEFVUkt2Y2tVaE4xNGg0Q24vZ2RPRG42NzIzS1Z5aGdnRVBwSUlCQ3pDQw0KQVFjeEN6QUpCZ05WQkFZVEFrVlRNVHN3T1FZRFZRUUtFekpCWjJWdVkybGhJRU5oZEdGc1lXNWhJR1JsSUVObGNuUnBabWxqWVdOcA0KYnlBb1RrbEdJRkV0TURnd01URTNOaTFKS1RFb01DWUdBMVVFQ3hNZlUyVnlkbVZwY3lCUWRXSnNhV056SUdSbElFTmxjblJwWm1sag0KWVdOcGJ6RThNRG9HQTFVRUN4TXpWbVZuWlhVZ2FIUjBjSE02THk5M2QzY3VZMkYwWTJWeWRDNXVaWFF2ZG1WeWNISmxjSEp2WkhWag0KWTJsdklDaGpLVEF6TVRVd013WURWUVFMRXl4S1pYSmhjbkYxYVdFZ1JXNTBhWFJoZEhNZ1pHVWdRMlZ5ZEdsbWFXTmhZMmx2SUVOaA0KZEdGc1lXNWxjekVjTUJvR0ExVUVBeE1UVUZKRlVGSlBSRlZEUTBsUElFVkRMVUZEUTRJUWR3S1R0TTFFRVU5RkVQWFVZSGdnaERBZA0KQmdOVkhTVUVGakFVQmdnckJnRUZCUWNEQWdZSUt3WUJCUVVIQXdRd0VRWUpZSVpJQVliNFFnRUJCQVFEQWdXZ01EUUdDQ3NHQVFVRg0KQndFQkJDZ3dKakFrQmdnckJnRUZCUWN3QVlZWWFIUjBjSE02THk5dlkzTndMbU5oZEdObGNuUXVibVYwTUJnR0NDc0dBUVVGQndFRA0KQkF3d0NqQUlCZ1lFQUk1R0FRRXdnWVlHQTFVZEh3Ui9NSDB3UEtBNm9EaUdObWgwZEhBNkx5OWxjSE5qWkM1allYUmpaWEowTG01bA0KZEM5amNtd3ZjSEpsY0hKdlpIVmpZMmx2WDJWakxXbGtZMkYwTG1OeWJEQTlvRHVnT1lZM2FIUjBjRG92TDJWd2MyTmtNaTVqWVhSag0KWlhKMExtNWxkQzlqY213dmNISmxjSEp2WkhWalkybHZYMlZqTFdsa1kyRjBMbU55YkRDQjlnWURWUjBnQklIdU1JSHJNSUhvQmd3cg0KQmdFRUFmVjRBUU1CVmdFd2dkY3dMQVlJS3dZQkJRVUhBZ0VXSUdoMGRIQnpPaTh2ZDNkM0xtTmhkR05sY25RdWJtVjBMM1psY2tsRQ0KUTJGME1JR21CZ2dyQmdFRkJRY0NBakNCbVJxQmxrRnhkV1Z6ZENEdnY3MXpJSFZ1SUdObGNuUnBabWxqWVhRZ2NHVnljMjl1WVd3Zw0KU1VSRFFWUXNJSEpsWTI5dVpXZDFkQ0JrSjJsa1pXNTBhV1pwWTJGajc3KzlMQ0J6YVdkdVlYUjFjbUVnYVNCNGFXWnlZWFFnWkdVZw0KWTJ4aGMzTmxJRElnYVc1a2FYWnBaSFZoYkM0Z1ZtVm5aWFVnYUhSMGNITTZMeTkzZDNjdVkyRjBZMlZ5ZEM1dVpYUXZkbVZ5UkVOaA0KZERBdEJnTlZIUWtFSmpBa01CQUdDQ3NHQVFVRkJ3a0VNUVFUQWtWVE1CQUdDQ3NHQVFVRkJ3a0ZNUVFUQWtWVE1BMEdDU3FHU0liMw0KRFFFQkJRVUFBNElCQVFDcTc3ODBSR1FNTEIxZ2tkTk1mTFhuZ3FNb1JIR0taYnZ6a3JxSUFtVDhXQWQxRThyQXBoUjkveExKVXRwNQ0KbGJnMmZScjVibDJqOE9WREJLMlltRzQxaDhBRG40U1RJL0FwZU5JTlNmalpzNk5Sc25XekZ5ZlhYbVBDSFlGQi9YV3p5aW1DRXhndg0KdnR1SCszUUF3Y3dobjUwUExFdWh3NUM1dmxYN0x5NUs2ckxMTUZOVVVNYldWeTFoWmVsSy9DQlRjQWpJTzM4TlkrdllSQU1LU2Y0TQ0KL2daUXo0cUJlRlZKYTUyUjdOY0FxQ2ZyZkxmYVhwYkRTZzk4eG9CZU5zMmluR3p4OFVTZ0VyTFpqS0pzZG4vS2pURDlnUy9zVGRRNg0KUTdpZHFsZDJMRlZsTzIvYjk0Wk5aQmNTLzc4RU9EWGdkV2ZreVBDN1J3OHJlOW5JMy9qVDwvZHM6WDUwOUNlcnRpZmljYXRlPjwvZHM6WDUwOURhdGE+PC9kczpLZXlJbmZvPjxkczpPYmplY3QgRW5jb2Rpbmc9ImJhc2U2NCIgSWQ9Ik9iamVjdC05ODczM2NkZS04YmNjLTQ4YTAtOWI3Ny0wZTk5OTdiZGQwNTgiIE1pbWVUeXBlPSJhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW0iPlNHVnNiRzhnVjI5eWJHUT08L2RzOk9iamVjdD48ZHM6T2JqZWN0Pjx4YWRlczpRdWFsaWZ5aW5nUHJvcGVydGllcyB4bWxuczp4YWRlcz0iaHR0cDovL3VyaS5ldHNpLm9yZy8wMTkwMy92MS4zLjIjIiBJZD0iU2lnbmF0dXJlLThlYWJkMGE1LTY2MGQtNGFmZC05OTA1LTBhYmM3NTUzZDE5Mi1RdWFsaWZ5aW5nUHJvcGVydGllcyIgVGFyZ2V0PSIjU2lnbmF0dXJlLThlYWJkMGE1LTY2MGQtNGFmZC05OTA1LTBhYmM3NTUzZDE5Mi1TaWduYXR1cmUiPjx4YWRlczpTaWduZWRQcm9wZXJ0aWVzIElkPSJTaWduYXR1cmUtOGVhYmQwYTUtNjYwZC00YWZkLTk5MDUtMGFiYzc1NTNkMTkyLVNpZ25lZFByb3BlcnRpZXMiPjx4YWRlczpTaWduZWRTaWduYXR1cmVQcm9wZXJ0aWVzPjx4YWRlczpTaWduaW5nVGltZT4yMDExLTAzLTIxVDExOjQ0OjQyKzAxOjAwPC94YWRlczpTaWduaW5nVGltZT48eGFkZXM6U2lnbmluZ0NlcnRpZmljYXRlPjx4YWRlczpDZXJ0Pjx4YWRlczpDZXJ0RGlnZXN0PjxkczpEaWdlc3RNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwLzA5L3htbGRzaWcjc2hhMSIvPjxkczpEaWdlc3RWYWx1ZT4zbTZ3OTlUb3lTZDlKcEJsMWdCazhEei9iYlU9PC9kczpEaWdlc3RWYWx1ZT48L3hhZGVzOkNlcnREaWdlc3Q+PHhhZGVzOklzc3VlclNlcmlhbD48ZHM6WDUwOUlzc3Vlck5hbWU+Q049UFJFUFJPRFVDQ0lPIElEQ2F0LCBPVT1FbnRpdGF0IHB1YmxpY2EgZGUgY2VydGlmaWNhY2lvIGRlIGNpdXRhZGFucywgT1U9VmVnZXUgaHR0cHM6Ly93d3cuY2F0Y2VydC5uZXQvdmVyQ0lDLTIgKGMpMDMsIE9VPVNlcnZlaXMgUHVibGljcyBkZSBDZXJ0aWZpY2FjaW8gRUNWLTIsIEw9UGFzc2F0Z2UgZGUgbGEgQ29uY2VwY2lvIDExIDA4MDA4IEJhcmNlbG9uYSwgTz1BZ2VuY2lhIENhdGFsYW5hIGRlIENlcnRpZmljYWNpbyAoTklGIFEtMDgwMTE3Ni1JKSwgQz1FUzwvZHM6WDUwOUlzc3Vlck5hbWU+PGRzOlg1MDlTZXJpYWxOdW1iZXI+OTU1MDg8L2RzOlg1MDlTZXJpYWxOdW1iZXI+PC94YWRlczpJc3N1ZXJTZXJpYWw+PC94YWRlczpDZXJ0PjwveGFkZXM6U2lnbmluZ0NlcnRpZmljYXRlPjwveGFkZXM6U2lnbmVkU2lnbmF0dXJlUHJvcGVydGllcz48eGFkZXM6U2lnbmVkRGF0YU9iamVjdFByb3BlcnRpZXM+PHhhZGVzOkRhdGFPYmplY3RGb3JtYXQgT2JqZWN0UmVmZXJlbmNlPSIjUmVmZXJlbmNlLWJhYmE0ZDFhLWExN2UtNDJjNi05N2QyLWJlZWUxMzUwOTUwMyI+PHhhZGVzOk1pbWVUeXBlPmFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbTwveGFkZXM6TWltZVR5cGU+PHhhZGVzOkVuY29kaW5nPmJhc2U2NDwveGFkZXM6RW5jb2Rpbmc+PC94YWRlczpEYXRhT2JqZWN0Rm9ybWF0PjwveGFkZXM6U2lnbmVkRGF0YU9iamVjdFByb3BlcnRpZXM+PC94YWRlczpTaWduZWRQcm9wZXJ0aWVzPjwveGFkZXM6UXVhbGlmeWluZ1Byb3BlcnRpZXM+PC9kczpPYmplY3Q+PC9kczpTaWduYXR1cmU+ "; - - IPersonalAttributeList palist = new PersonalAttributeList(); - - PersonalAttribute signedDoc = new PersonalAttribute(); - signedDoc.setName("signedDoc"); - signedDoc.setIsRequired(false); - ArrayList signed = new ArrayList(); - signed.add(signedDocResponse); - signedDoc.setValue(signed); - palist.add(signedDoc); - - PersonalAttribute isAgeOver = new PersonalAttribute(); - isAgeOver.setName("isAgeOver"); - isAgeOver.setIsRequired(false); - ArrayList ages = new ArrayList(); - ages.add("16"); - ages.add("18"); - isAgeOver.setValue(ages); - palist.add(isAgeOver); - - authenRequest.setPersonalAttributeList(palist); - - final STORKAuthnResponse response = new STORKAuthnResponse(); - - response.setPersonalAttributeList(palist); - - final STORKAuthnResponse storkResponse = getEngine().generateSTORKAuthnResponse(authenRequest, response, ipAddress, isNotHashing); - - authResponse = storkResponse.getTokenSaml(); - authnResponse = getEngine().validateSTORKAuthnResponse(authResponse, ipAddress); - - assertTrue("SignedDoc response should be the same: ", authnResponse.getPersonalAttributeList().get("signedDoc").getValue().get(0).equals(signedDocResponse)); - - } -} diff --git a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/package-info.java b/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/package-info.java deleted file mode 100644 index 1c34e2ad5..000000000 --- a/id/server/stork2-saml-engine/src/test/java/eu/stork/peps/test/simple/package-info.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Licensed under the EUPL, Version 1.1 or – as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. You may - * obtain a copy of the Licence at: - * - * http://www.osor.eu/eupl/european-union-public-licence-eupl-v.1.1 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * Licence for the specific language governing permissions and limitations under - * the Licence. - */ - -/** - * Provides the classes necessary to create a SAML message. - * @since 1.0 - */ -package eu.stork.peps.test.simple; \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml b/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml deleted file mode 100644 index fadef82b2..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/SamlEngine.xml +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml deleted file mode 100644 index 295258bb2..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf0.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - SWModule sign with JKS. - C:\opt\keystores\storkDemoKeysTest.jks - local-demo - local-demo - CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml deleted file mode 100644 index ffd41cb61..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf1.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - SWModule sign with JKS. - C:\opt\keystores\storkDemoKeysTest.jks - local-demo - local-demo - CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml deleted file mode 100644 index 21b73d49d..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf2.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - SWModule sign with JKS. - C:\opt\keystores\keyStoreCountry2.jks - local-demo - local-demo - CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml deleted file mode 100644 index f9ebc85cc..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/SignModule_Conf3.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - SWModule sign with JKS. - C:\opt\keystores\keyStoreCountry3.jks - local-demo - local-demo - CN=local-demo, O=Indra, L=Madrid, ST=Spain, C=ES - 4BA89DB2 - JKS - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml b/id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml deleted file mode 100644 index 0e95da1f2..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/SignModule_P11.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - HWModule sign with interface PKCS11. - p11Conf.cfg - 12345 - CN=Test Certificate - 147d4b07db8 - PKCS11 - SignModule_Conf0.xml - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml deleted file mode 100644 index 2a266a975..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf0.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - SAML constants for AuthnRequests and Responses. - - - unspecified - - - obtained - - - entity - - - - HTTP-POST - - - - - - - - - - false - - - true - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - - - 300 - - - false - - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/placeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/textResidenceAddress - http://www.stork.gov.eu/1.0/canonicalResidenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/title - http://www.stork.gov.eu/1.0/residencePermit - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver - http://www.stork.gov.eu/1.0/signedDoc - http://www.stork.gov.eu/1.0/citizenQAALevel - http://www.stork.gov.eu/1.0/fiscalNumber - http://www.stork.gov.eu/1.0/unknown - http://www.stork.gov.eu/1.0/newAttribute1 - http://www.stork.gov.eu/1.0/newAttribute2 - http://www.stork.gov.eu/1.0/hasDegree - - http://www.stork.gov.eu/1.0/diplomaSupplement - http://www.stork.gov.eu/1.0/currentStudiesSupplement - http://www.stork.gov.eu/1.0/isStudent - http://www.stork.gov.eu/1.0/isAcademicStaff - http://www.stork.gov.eu/1.0/isTeacherOf - http://www.stork.gov.eu/1.0/isCourseCoordinator - http://www.stork.gov.eu/1.0/isAdminStaff - http://www.stork.gov.eu/1.0/habilitation - http://www.stork.gov.eu/1.0/Title - http://www.stork.gov.eu/1.0/hasDegree - http://www.stork.gov.eu/1.0/hasAccountInBank - http://www.stork.gov.eu/1.0/isHealthCareProfessional - - http://www.stork.gov.eu/1.0/eLPIdentifier - http://www.stork.gov.eu/1.0/legalName - http://www.stork.gov.eu/1.0/alternativeName - http://www.stork.gov.eu/1.0/type - http://www.stork.gov.eu/1.0/translatableType - http://www.stork.gov.eu/1.0/status - http://www.stork.gov.eu/1.0/activity - http://www.stork.gov.eu/1.0/registeredAddress - http://www.stork.gov.eu/1.0/registeredCanonicalAddress - http://www.stork.gov.eu/1.0/contactInformation - http://www.stork.gov.eu/1.0/LPFiscalNumber - http://www.stork.gov.eu/1.0/mandate - http://www.stork.gov.eu/1.0/docRequest - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf1.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf1.xml deleted file mode 100644 index a65717a05..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf1.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - - SAML constants for AuthnRequests and Responses. - - - unspecified - - - obtained - - - entity - - - - HTTP-POST - - - - - - - - - - false - - - true - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - - - 300 - - - false - - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/placeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/textResidenceAddress - http://www.stork.gov.eu/1.0/canonicalResidenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/title - http://www.stork.gov.eu/1.0/residencePermit - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver - http://www.stork.gov.eu/1.0/signedDoc - http://www.stork.gov.eu/1.0/citizenQAALevel - http://www.stork.gov.eu/1.0/fiscalNumber - http://www.stork.gov.eu/1.0/unknown - http://www.stork.gov.eu/1.0/newAttribute1 - http://www.stork.gov.eu/1.0/newAttribute2 - http://www.stork.gov.eu/1.0/hasDegree - - http://www.stork.gov.eu/1.0/diplomaSupplement - http://www.stork.gov.eu/1.0/currentStudiesSupplement - http://www.stork.gov.eu/1.0/isStudent - http://www.stork.gov.eu/1.0/isAcademicStaff - http://www.stork.gov.eu/1.0/isTeacherOf - http://www.stork.gov.eu/1.0/isCourseCoordinator - http://www.stork.gov.eu/1.0/isAdminStaff - http://www.stork.gov.eu/1.0/habilitation - http://www.stork.gov.eu/1.0/Title - http://www.stork.gov.eu/1.0/hasDegree - http://www.stork.gov.eu/1.0/hasAccountInBank - http://www.stork.gov.eu/1.0/isHealthCareProfessional - - http://www.stork.gov.eu/1.0/eLPIdentifier - http://www.stork.gov.eu/1.0/legalName - http://www.stork.gov.eu/1.0/alternativeName - http://www.stork.gov.eu/1.0/type - http://www.stork.gov.eu/1.0/translatableType - http://www.stork.gov.eu/1.0/status - http://www.stork.gov.eu/1.0/activity - http://www.stork.gov.eu/1.0/registeredAddress - http://www.stork.gov.eu/1.0/registeredCanonicalAddress - http://www.stork.gov.eu/1.0/contactInformation - http://www.stork.gov.eu/1.0/LPFiscalNumber - http://www.stork.gov.eu/1.0/mandate - http://www.stork.gov.eu/1.0/docRequest - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf2.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf2.xml deleted file mode 100644 index a0a5bea10..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf2.xml +++ /dev/null @@ -1,101 +0,0 @@ - - - - - SAML constants for AuthnRequests and Responses. - - - unspecified - - obtained - - - entity - - - - HTTP-POST - - false - false - false - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - - - 300 - - - false - - - false - - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/placeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/textResidenceAddress - http://www.stork.gov.eu/1.0/canonicalResidenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/title - http://www.stork.gov.eu/1.0/residencePermit - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver - http://www.stork.gov.eu/1.0/signedDoc - http://www.stork.gov.eu/1.0/citizenQAALevel - http://www.stork.gov.eu/1.0/fiscalNumber - http://www.stork.gov.eu/1.0/unknown - http://www.stork.gov.eu/1.0/newAttribute1 - http://www.stork.gov.eu/1.0/newAttribute2 - http://www.stork.gov.eu/1.0/hasDegree - - http://www.stork.gov.eu/1.0/diplomaSupplement - http://www.stork.gov.eu/1.0/currentStudiesSupplement - http://www.stork.gov.eu/1.0/isStudent - http://www.stork.gov.eu/1.0/isAcademicStaff - http://www.stork.gov.eu/1.0/isTeacherOf - http://www.stork.gov.eu/1.0/isCourseCoordinator - http://www.stork.gov.eu/1.0/isAdminStaff - http://www.stork.gov.eu/1.0/habilitation - http://www.stork.gov.eu/1.0/Title - http://www.stork.gov.eu/1.0/hasDegree - http://www.stork.gov.eu/1.0/hasAccountInBank - http://www.stork.gov.eu/1.0/isHealthCareProfessional - - http://www.stork.gov.eu/1.0/eLPIdentifier - http://www.stork.gov.eu/1.0/legalName - http://www.stork.gov.eu/1.0/alternativeName - http://www.stork.gov.eu/1.0/type - http://www.stork.gov.eu/1.0/translatableType - http://www.stork.gov.eu/1.0/status - http://www.stork.gov.eu/1.0/activity - http://www.stork.gov.eu/1.0/registeredAddress - http://www.stork.gov.eu/1.0/registeredCanonicalAddress - http://www.stork.gov.eu/1.0/contactInformation - http://www.stork.gov.eu/1.0/LPFiscalNumber - http://www.stork.gov.eu/1.0/mandate - http://www.stork.gov.eu/1.0/docRequest - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf3.xml b/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf3.xml deleted file mode 100644 index 61c6cd6d6..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/StorkSamlEngine_Conf3.xml +++ /dev/null @@ -1,97 +0,0 @@ - - - - - SAML constants for AuthnRequests and Responses. - - - unspecified - - obtained - - - entity - - - - HTTP-POST - - false - false - false - - - http://S-PEPS.gov.xx - - - http://C-PEPS.gov.xx - - - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - - - 300 - - - false - - - http://www.stork.gov.eu/1.0/eIdentifier - http://www.stork.gov.eu/1.0/givenName - http://www.stork.gov.eu/1.0/surname - http://www.stork.gov.eu/1.0/inheritedFamilyName - http://www.stork.gov.eu/1.0/adoptedFamilyName - http://www.stork.gov.eu/1.0/gender - http://www.stork.gov.eu/1.0/dateOfBirth - http://www.stork.gov.eu/1.0/countryCodeOfBirth - http://www.stork.gov.eu/1.0/placeOfBirth - http://www.stork.gov.eu/1.0/nationalityCode - http://www.stork.gov.eu/1.0/maritalStatus - http://www.stork.gov.eu/1.0/textResidenceAddress - http://www.stork.gov.eu/1.0/canonicalResidenceAddress - http://www.stork.gov.eu/1.0/eMail - http://www.stork.gov.eu/1.0/title - http://www.stork.gov.eu/1.0/residencePermit - http://www.stork.gov.eu/1.0/pseudonym - http://www.stork.gov.eu/1.0/age - http://www.stork.gov.eu/1.0/isAgeOver - http://www.stork.gov.eu/1.0/signedDoc - http://www.stork.gov.eu/1.0/citizenQAALevel - http://www.stork.gov.eu/1.0/fiscalNumber - http://www.stork.gov.eu/1.0/unknown - http://www.stork.gov.eu/1.0/newAttribute1 - http://www.stork.gov.eu/1.0/newAttribute2 - http://www.stork.gov.eu/1.0/hasDegree - - http://www.stork.gov.eu/1.0/diplomaSupplement - http://www.stork.gov.eu/1.0/currentStudiesSupplement - http://www.stork.gov.eu/1.0/isStudent - http://www.stork.gov.eu/1.0/isAcademicStaff - http://www.stork.gov.eu/1.0/isTeacherOf - http://www.stork.gov.eu/1.0/isCourseCoordinator - http://www.stork.gov.eu/1.0/isAdminStaff - http://www.stork.gov.eu/1.0/habilitation - http://www.stork.gov.eu/1.0/Title - http://www.stork.gov.eu/1.0/hasDegree - http://www.stork.gov.eu/1.0/hasAccountInBank - http://www.stork.gov.eu/1.0/isHealthCareProfessional - - http://www.stork.gov.eu/1.0/eLPIdentifier - http://www.stork.gov.eu/1.0/legalName - http://www.stork.gov.eu/1.0/alternativeName - http://www.stork.gov.eu/1.0/type - http://www.stork.gov.eu/1.0/translatableType - http://www.stork.gov.eu/1.0/status - http://www.stork.gov.eu/1.0/activity - http://www.stork.gov.eu/1.0/registeredAddress - http://www.stork.gov.eu/1.0/registeredCanonicalAddress - http://www.stork.gov.eu/1.0/contactInformation - http://www.stork.gov.eu/1.0/LPFiscalNumber - http://www.stork.gov.eu/1.0/mandate - http://www.stork.gov.eu/1.0/docRequest - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml deleted file mode 100644 index d4f6f89da..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequest.xml +++ /dev/null @@ -1,68 +0,0 @@ - - http://S-PEPS.gov.xx - - - - - - - - - - - - - NwBXMUys6XjoR7Ddbr6JI5gB+O8= - - - MFoAC5mncGKFyvZKygSIH7+9JrXWMJ18jolBHZ0WisxpIrDldS+K+Mf6uwOirL5mal2uktpIT2RRiT1Twk+fS5t94wnobaLpktpv+uoZCzd2BAqFpBBHnImwC/UEy7hCF9htsW8CCx97wRXHA4IGx5OX9Fg4f+ZJdPPFLrGpdfJ3bJXvQeQPwGLqhjWio/XnAYwJYQ8YGQvRywZDDodTZDWHsKMHAsrIdmNJz93wmMPceRtgcUceZdN4jDkPE8SPNrApe2ksd3dEKauyyJQ2DR5jryVQpGM7sJzQhP9Z57XIJta+c/nJ7bttw+M+QsZn/E+CLQpcI8MeuuhBb1+mGA== - - - MIIDIjCCAgqgAwIBAgIES6idsjANBgkqhkiG9w0BAQUFADBTMQswCQYDVQQGEwJFUzEOMAwGA1UE - CAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxvY2Fs - LWRlbW8wHhcNMTMwODI4MTY0NzM1WhcNMTUwODI4MTY0NzM1WjBTMQswCQYDVQQGEwJFUzEOMAwG - A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxv - Y2FsLWRlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx+7zEQUbt8Ot9dByR5TuY - NPmTwaKhECtnkxYAx9tl+Ga3kFiv+dOSeDoQOhxkICG1ZMaG0Gtk0EQWjscC1cLwDXpAOdhOm5xh - ndFHxa3V3Y3zomFZA7A3nwP8wt17wDrc1xi2Ye8VrwO7Vjb/F8Rgutlcrvq+LF4g9nQLoRiKUq8w - NFvDlvhBbLr8hMVBMY/jY7tSQ85qLqKUkWRcoDttJjgWZoO1vpBS4m+FywtYdOoHnN6fv4Dvf1r2 - rNLgebgBvSfwznxiulwW6FBLasYX0rYKP7RfwG8TJ+FumOgAjADj2LdwK25RZNg44XU2V1z1Fp37 - fNXhfo08LpdD1ueFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBADMRGTWOmadZyCoJNluV+M7LopjC - 9WpFUj76X0cAoNXmt12zYqYe8hjRmBr6l2V/FXT3/TyWET1nILG46zwwAxslw3b2LvkhU+9QcuB8 - yC8TCJJ0kgsTZ/EUZPSbwUG7Nn2jkMiyjlyKcjSCQOzEKQyR1xYwyZG40+BPeGbYjmRgm6kcmCxY - USWoPwNyfke9gNT80f0pUj7wJ9YwWbTIz1rhf/h7rxoMYypXo+JXwaXW/Ra8v1uDcwfKpE5ZgwAU - nubLXF4A+H7/N7ZvB5XDwJ4W+99nuPsKfwacD8m1sflTXcEPzzhOq6iQ9anJT94/pMctnp827zXA - y66jvDrin5I= - - - - - 3 - IS - false - false - false - - - ES/IS/1234567890 - - - Sveinbjorn - - - - fiscalNumber - - - 16 - 18 - - - LPFiscalNumber - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml deleted file mode 100644 index fadc86d14..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestSdoc.xml +++ /dev/null @@ -1,54 +0,0 @@ - - http://S-PEPS.gov.xx - - - - - - - - - - - - - 2WMvsIXoH1VpwqbNiXG8lWS2ZPc= - - - nMfUZiYHyHgSky4NHfDGch8a6UxWupS1Dhk2mu3L065Vq2eKLfDwWjgNkKPDoLcEkgAiDpNlLsS0+nDk8IexAMSq+T54Mlt4AhMRIrDP3SlWya5mqQ0VnxFENGlhi7kSKK2oIMfkiaeIBART7QBZggSZFnk0mw/BzmJM5bJ4Dipymndx7tv98BDlWFZEKH7iSc9uUuMpVygTNDxtEsdMcBKpqYiyVyTln8/xKsqXSL4RA10MYmqfvFsMZWUwQUgdl5tor910/XrAXHXJY50zH0CwekUXszOdvO7s3WvrG4lt3goqq2WDcaeDzizV93+Ih+lVl9PebTtMxCyO4fxw7Q== - - - MIIDIjCCAgqgAwIBAgIES6idsjANBgkqhkiG9w0BAQUFADBTMQswCQYDVQQGEwJFUzEOMAwGA1UE - CAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxvY2Fs - LWRlbW8wHhcNMTMwODI4MTY0NzM1WhcNMTUwODI4MTY0NzM1WjBTMQswCQYDVQQGEwJFUzEOMAwG - A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExEzARBgNVBAMMCmxv - Y2FsLWRlbW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCx+7zEQUbt8Ot9dByR5TuY - NPmTwaKhECtnkxYAx9tl+Ga3kFiv+dOSeDoQOhxkICG1ZMaG0Gtk0EQWjscC1cLwDXpAOdhOm5xh - ndFHxa3V3Y3zomFZA7A3nwP8wt17wDrc1xi2Ye8VrwO7Vjb/F8Rgutlcrvq+LF4g9nQLoRiKUq8w - NFvDlvhBbLr8hMVBMY/jY7tSQ85qLqKUkWRcoDttJjgWZoO1vpBS4m+FywtYdOoHnN6fv4Dvf1r2 - rNLgebgBvSfwznxiulwW6FBLasYX0rYKP7RfwG8TJ+FumOgAjADj2LdwK25RZNg44XU2V1z1Fp37 - fNXhfo08LpdD1ueFAgMBAAEwDQYJKoZIhvcNAQEFBQADggEBADMRGTWOmadZyCoJNluV+M7LopjC - 9WpFUj76X0cAoNXmt12zYqYe8hjRmBr6l2V/FXT3/TyWET1nILG46zwwAxslw3b2LvkhU+9QcuB8 - yC8TCJJ0kgsTZ/EUZPSbwUG7Nn2jkMiyjlyKcjSCQOzEKQyR1xYwyZG40+BPeGbYjmRgm6kcmCxY - USWoPwNyfke9gNT80f0pUj7wJ9YwWbTIz1rhf/h7rxoMYypXo+JXwaXW/Ra8v1uDcwfKpE5ZgwAU - nubLXF4A+H7/N7ZvB5XDwJ4W+99nuPsKfwacD8m1sflTXcEPzzhOq6iQ9anJT94/pMctnp827zXA - y66jvDrin5I= - - - - - 3 - IS - false - false - false - - - IS/IS/fbea6e68-0393-401b-b616-f767fff9418c - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml deleted file mode 100644 index 5c04f5c93..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryRequestTagDelete.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - http://S-PEPS.gov.xx - - hhQXDKNrJJ3Yy/pkZNZF4GlWrA/Xsx4CH9chgVa5HK4qZQvFXvZwegdw6U7rm7qv0zmI4xaLTv/bpmqJzEPfY3sIvrDRu9EouEKwtjbMbcvVQsx7I+j0yy7/cBcQJe3lRwQwyvazfYVbnSeGFxBN6WOHPqv6uInaQO/hXkicT3tBtm8o3UgUDY6c8wIMuD5A0hWTkL6z6f893AbdN85OQYAdHItNsQWeLOIeiGC918X7qqTfhFtBAB2oGVjlsSEqWox1jNqrPl1jjA0dP76m5SIVSqF8XcDR306ZB9GLJywOHKba0lxGLsXOAzJ+8u9jeixJ6VZKFqZg2Fhl/saKbg== - - - MIIDJzCCAg8CBEuonbIwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMCRVMxDjAMBgNVBAgMBVNw - YWluMQ8wDQYDVQQHDAZNYWRyaWQxDjAMBgNVBAoMBUluZHJhMRgwFgYDVQQDDA9sb2NhbC1kZW1v - LWNlcnQwHhcNMTAwMzIzMTA1MzM4WhcNMTAwNjAxMTA1MzM4WjBYMQswCQYDVQQGEwJFUzEOMAwG - A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExGDAWBgNVBAMMD2xv - Y2FsLWRlbW8tY2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJfdQ1/mkM9sqqab - ri8qqqX4s0J6UEEXyF+0AjLU8RC4WMeYFSZ5tfwnyLsoXY0/9bZLXnBxSibQYaf4SnpZJhlVA4sU - 0d8qyEWA2OvXGDCm7uspGHG3CRQa7fpHsmHmfIAqho9XDlwpwJdx5gK4Edc6aArcMQfjqMhy1s1n - 6Of1i1lMGGsGrERIRY7biIQu/8nITbHH18sUAZMG1u/Q0Avi9O3LWyswHXUouZ818fWwG6xru2N5 - y6vtVO/SL3doRSdqYkEms93TgxTtaKg8XNe24zhNTte6nvWLaKesi2KzZGC57HU47HBFEs8NWk7z - 9BDf8uLyPz9VDahwVKzMto8CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAgpuReXQ7Dsfdoe5zzy2F - 6kn1qqtMkRGsBPKnDFCI/GkIZpBiqlfwdh6sipnFKWfKEDlPKN1kEhbkDR2GA1Cp4F4ZSL/HumZM - pWabRhDxhTPvHIFbbShPDJY93+jw/yQeaWgMuhw3WzdH9TrVoRZH0Q7sG1pIJo5/6IogIZwFvJHT - /NDutKmurU6Lw8Vnde8PfnQd+FTEhz0SEGyKkWjAuhGbJfseBy/z3L+MJq1rdSQ9PF7wXDvWNzJq - yaNBUWWBV1TskvkNZXcaguroVPy2XhA1aixlAajWEXLk6Uuj5UYqalrV/reNYvDvY0BV2CIn51r7 - Ppm8IFVTk8mYfX8/jw== - - - - - 3 - false - false - false - - - - 16 - 18 - - - Sveinbjörn - - - ES/IS/1234567890 - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml deleted file mode 100644 index 79c59f5ed..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AttrQueryResponse.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - http://C-PEPS.gov.xx - - - - - - - - - - - - - yMOVS1T/yRiVh3L6IBM9rR9Ie3w= - - - d8e/RyNNPmnHRIzTIuRSnW6B60oWGBGxjRua/HvNxTuod0qSarYJxEedhY9Wl1Z9WYXlry28FuKjp3DA3HhzNaVd7A7QpFqNC4dnizSVWFjxlhmoE/Uv3Y/ha9P/fk6nbtHCSKW4kHSX7QfFLeggcLmUG0IULRF8UmRdQ0WerCl0aSZZeSp8J3LsFBPeWCRSwXgfiLn+RehggzZmQU6g0ssxrpnsYEAtjAiOli+YVQGuumsZGaJ8zHA/DgJ2FTGovNUyfuSUFLhd9nLlSqFs2Avnx0Ck7Q1dxDO5truOm6e285YLHqLaGdetFyPQAj/Z4w4RJ5u5X6d7rhBjTfRAAw== - - - MIIDJzCCAg8CBEuonbIwDQYJKoZIhvcNAQEFBQAwWDELMAkGA1UEBhMCRVMxDjAMBgNVBAgMBVNw - YWluMQ8wDQYDVQQHDAZNYWRyaWQxDjAMBgNVBAoMBUluZHJhMRgwFgYDVQQDDA9sb2NhbC1kZW1v - LWNlcnQwHhcNMTAwMzIzMTA1MzM4WhcNMTAwNjAxMTA1MzM4WjBYMQswCQYDVQQGEwJFUzEOMAwG - A1UECAwFU3BhaW4xDzANBgNVBAcMBk1hZHJpZDEOMAwGA1UECgwFSW5kcmExGDAWBgNVBAMMD2xv - Y2FsLWRlbW8tY2VydDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJfdQ1/mkM9sqqab - ri8qqqX4s0J6UEEXyF+0AjLU8RC4WMeYFSZ5tfwnyLsoXY0/9bZLXnBxSibQYaf4SnpZJhlVA4sU - 0d8qyEWA2OvXGDCm7uspGHG3CRQa7fpHsmHmfIAqho9XDlwpwJdx5gK4Edc6aArcMQfjqMhy1s1n - 6Of1i1lMGGsGrERIRY7biIQu/8nITbHH18sUAZMG1u/Q0Avi9O3LWyswHXUouZ818fWwG6xru2N5 - y6vtVO/SL3doRSdqYkEms93TgxTtaKg8XNe24zhNTte6nvWLaKesi2KzZGC57HU47HBFEs8NWk7z - 9BDf8uLyPz9VDahwVKzMto8CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAgpuReXQ7Dsfdoe5zzy2F - 6kn1qqtMkRGsBPKnDFCI/GkIZpBiqlfwdh6sipnFKWfKEDlPKN1kEhbkDR2GA1Cp4F4ZSL/HumZM - pWabRhDxhTPvHIFbbShPDJY93+jw/yQeaWgMuhw3WzdH9TrVoRZH0Q7sG1pIJo5/6IogIZwFvJHT - /NDutKmurU6Lw8Vnde8PfnQd+FTEhz0SEGyKkWjAuhGbJfseBy/z3L+MJq1rdSQ9PF7wXDvWNzJq - yaNBUWWBV1TskvkNZXcaguroVPy2XhA1aixlAajWEXLk6Uuj5UYqalrV/reNYvDvY0BV2CIn51r7 - Ppm8IFVTk8mYfX8/jw== - - - - - - urn:oasis:names:tc:SAML:2.0:status:Success - - - http://C-PEPS.gov.xx - - urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified - - - - - - - http://S-PEPS.gov.xx - - - - - - - - - - - - 16/12/2008 - - - - 105 - IS - 10 - Gudrunartun - Reykjavik - - - - - value3 - value4 - value1 - value2 - - - - 16 - 18 - - - 123456789IS - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml deleted file mode 100644 index 93e778113..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequest.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - http://S-PEPS.gov.xx - - - - - - - - - - - - - yzsqaxBNicOrixBUno5cL0CBOpE= - - - - Xycll1PF7hh3Xdykpr6nIr8Q6PQ6OxLIBBBugoGpAm/V4Hu7tKakHJp8TgtRWZ30jG5eolOXnJkC - wiaTVUFaQz7cNn27syRJkdA+eYlz9doiwUJ5eD1cAyddZYsNPpSeAj5UK45oN0qCH+/pI9mRw8Oi - YIN/BUEtXkoYTjPtkmA= - - - - MIIBmDCCAQECBEuWisIwDQYJKoZIhvcNAQEFBQAwEzERMA8GA1UEAxMIY291bnRyeTEwHhcNMTAw - MzA5MTc1MjAyWhcNMTAwNjA3MTc1MjAyWjATMREwDwYDVQQDEwhjb3VudHJ5MTCBnzANBgkqhkiG - 9w0BAQEFAAOBjQAwgYkCgYEAnb2gcchwxvJBclcsfCBWJnYefLJYQnDGCQ3RUtYZc26JznnLXclu - h1XfLJlWgYk/pFKz7B9KfJztal47c6mBfisnxjhdcLqcbXOuRIm7E8TZPzdbHEd60WHPDv20jr+r - /WkOQs12tKQMbgDX2wtBBcJODLYCDiYa1oQsnyhdOGkCAwEAATANBgkqhkiG9w0BAQUFAAOBgQBk - 3luVRc0EqEE1zZeYvRPi5a2yOZfI9H+/rXI1qNLwmICnuJX++ukUbqJHm/FV1iSPM9O9oqzifJ/K - eKL5EcUugJ76Tu5XO8za2FoJvYr+jIZDsEkCg+OSzcp/eljiWAIh2enZcQ/ON6QxWXeSNJPH0xOq - KAoZgbUK0Zld3Dsheg== - - - - - 3 - EDU001 - OXF001 - APP001 - EN - true - true - true - - - 16 - 18 - - - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml deleted file mode 100644 index cca0dbc27..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDelete.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - http://S-PEPS.gov.xx - - - S6nY97RSCUJXq3HZ5obSLCI341LvtAA3vHjR1FWxrIMDPACQMqlNWBYNnRP1RiZiJV6x0RieH+SR - Vkiy03jYyhr0XkwAE5Wd6Huf+zIbeTXjZkdQj7JpAXoB+ky4G/+L0deamvsP3eO7ZJ4grady4gmC - Xt8p8tK3EoMocZse2hw= - - - - MIIBkTCB+wIESpT8bTANBgkqhkiG9w0BAQUFADAQMQ4wDAYDVQQDEwVzdG9yazAeFw0wOTA4MjYw - OTEyMTNaFw0wOTExMjQwOTEyMTNaMBAxDjAMBgNVBAMTBXN0b3JrMIGfMA0GCSqGSIb3DQEBAQUA - A4GNADCBiQKBgQDK/QL8NuMd41I1lObObeRA6DaM8bjeYqIz5mg5WnnZv4jlcK7Gq89Lk6htXRFl - lAXpDYhI3zolMIMHEMZ3zQQPc7lgTV6Bbz9uD2YTJ9Kx55e8Y6Y49DO+TiiejGJxTzTFUcuBJHaK - ipuvLVd1a8N3RAnaGSUOozhrTqxba82mEwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFJgeS18nhUl - r7WnvSn9FlkI94U//Hk3iZLc3/cScTu7D7Y/J0eUq4TF8PsSzWX5khGuqrTkswNgfEtl2IpACQ2w - kB8+RxeRNdddQlGHlO4ZqnpvxXBwSouiy2yUeAo0y++vMFm6DO4sxfk8eTtimPDo5SzBtjtGtbqS - 3cyl/wz8 - - - - - 3 - false - false - false - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDeleteEncoded.xml b/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDeleteEncoded.xml deleted file mode 100644 index db606145c..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/data/eu/stork/STORKSAMLEngine/AuthnRequestTagDeleteEncoded.xml +++ /dev/null @@ -1,47 +0,0 @@ - - - http://S-PEPS.gov.xx - - - S6nY97RSCUJXq3HZ5obSLCI341LvtAA3vHjR1FWxrIMDPACQMqlNWBYNnRP1RiZiJV6x0RieH+SR - Vkiy03jYyhr0XkwAE5Wd6Huf+zIbeTXjZkdQj7JpAXoB+ky4G/+L0deamvsP3eO7ZJ4grady4gmC - Xt8p8tK3EoMocZse2hw= - - - - MIIBkTCB+wIESpT8bTANBgkqhkiG9w0BAQUFADAQMQ4wDAYDVQQDEwVzdG9yazAeFw0wOTA4MjYw - OTEyMTNaFw0wOTExMjQwOTEyMTNaMBAxDjAMBgNVBAMTBXN0b3JrMIGfMA0GCSqGSIb3DQEBAQUA - A4GNADCBiQKBgQDK/QL8NuMd41I1lObObeRA6DaM8bjeYqIz5mg5WnnZv4jlcK7Gq89Lk6htXRFl - lAXpDYhI3zolMIMHEMZ3zQQPc7lgTV6Bbz9uD2YTJ9Kx55e8Y6Y49DO+TiiejGJxTzTFUcuBJHaK - ipuvLVd1a8N3RAnaGSUOozhrTqxba82mEwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFJgeS18nhUl - r7WnvSn9FlkI94U//Hk3iZLc3/cScTu7D7Y/J0eUq4TF8PsSzWX5khGuqrTkswNgfEtl2IpACQ2w - kB8+RxeRNdddQlGHlO4ZqnpvxXBwSouiy2yUeAo0y++vMFm6DO4sxfk8eTtimPDo5SzBtjtGtbqS - 3cyl/wz8 - - - - - 3 - false - false - false - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/logback-test.xml b/id/server/stork2-saml-engine/src/test/resources/logback-test.xml deleted file mode 100644 index 84d48c00e..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/logback-test.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n - - - - - - - - - - - - - - \ No newline at end of file diff --git a/id/server/stork2-saml-engine/src/test/resources/p11Conf.cfg b/id/server/stork2-saml-engine/src/test/resources/p11Conf.cfg deleted file mode 100644 index 84f7050d1..000000000 --- a/id/server/stork2-saml-engine/src/test/resources/p11Conf.cfg +++ /dev/null @@ -1,18 +0,0 @@ -name=OpenDNSSEC -library = /usr/lib/softhsm/libsofthsm.so -slot = 0 -attributes(generate, *, *) = { - CKA_TOKEN = true -} -attributes(generate, CKO_CERTIFICATE, *) = { - CKA_PRIVATE = false -} -attributes(generate, CKO_PUBLIC_KEY, *) = { - CKA_PRIVATE = false -} -attributes(*,CKO_PUBLIC_KEY,CKK_RSA)={ - CKA_VERIFY=true -} -attributes(*,CKO_PRIVATE_KEY,CKK_RSA)={ - CKA_SIGN=true -} \ No newline at end of file -- cgit v1.2.3 From 9e00f47a158818617f951d0ed0812caae0e0099e Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 17 Mar 2016 17:14:20 +0100 Subject: fixed xmlenc version --- id/server/idserverlib/pom.xml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index 363ca9aad..23335290d 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -381,7 +381,12 @@ org.bouncycastle - + + + org.apache.santuario + xmlsec + 2.0.5 + + diff --git a/id/server/modules/moa-id-module-eIDAS/pom.xml b/id/server/modules/moa-id-module-eIDAS/pom.xml index 9e95301bd..addf086d8 100644 --- a/id/server/modules/moa-id-module-eIDAS/pom.xml +++ b/id/server/modules/moa-id-module-eIDAS/pom.xml @@ -77,12 +77,24 @@ eu.eidas eidas-configmodule ${eidas-configmodule.version} + + + log4j-over-slf4j + org.slf4j + + eu.eidas eidas-encryption ${eidas-encryption.version} + + + log4j-over-slf4j + org.slf4j + + -- cgit v1.2.3 From 55c0cdf35eeed3965ab875d1980fc0b2ba478744 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 18 Mar 2016 11:35:59 +0100 Subject: add new Card and handy-signature logos --- .../id/auth/frontend/StaticResourceConfiguration.java | 3 ++- .../src/main/resources/mainGUI/img/handy.gif | Bin 4460 -> 0 bytes .../main/resources/mainGUI/img/handy_deprecated.gif | Bin 0 -> 4460 bytes .../src/main/resources/mainGUI/img/handysign.png | Bin 0 -> 377212 bytes .../src/main/resources/mainGUI/img/karte.gif | Bin 3360 -> 0 bytes .../src/main/resources/mainGUI/img/karte.png | Bin 0 -> 21957 bytes .../main/resources/mainGUI/img/karte_deactivated.png | Bin 0 -> 20539 bytes .../main/resources/mainGUI/img/karte_deprecated.gif | Bin 0 -> 3360 bytes .../src/main/resources/mainGUI/img/mobile-bku.png | Bin 4602 -> 0 bytes .../resources/mainGUI/img/mobile-bku_deprecated.png | Bin 0 -> 4602 bytes .../resources/mainGUI/img/online-bku-deactivated.png | Bin 5382 -> 0 bytes .../mainGUI/img/online-bku-deactivated_deprecated.png | Bin 0 -> 5382 bytes .../src/main/resources/mainGUI/img/online-bku.png | Bin 6011 -> 0 bytes .../resources/mainGUI/img/online-bku_deprecated.png | Bin 0 -> 6011 bytes .../src/main/resources/templates/css_template.css | 2 +- .../main/resources/templates/javascript_tempalte.js | 2 +- .../src/main/resources/templates/loginFormFull.html | 4 ++-- .../src/main/resources/applicationContext.xml | 2 +- 18 files changed, 7 insertions(+), 6 deletions(-) delete mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handy.gif create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handy_deprecated.gif create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handysign.png delete mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte.gif create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte.png create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte_deactivated.png create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte_deprecated.gif delete mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/mobile-bku.png create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/mobile-bku_deprecated.png delete mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku-deactivated.png create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku-deactivated_deprecated.png delete mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku.png create mode 100644 id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku_deprecated.png (limited to 'id/server') diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/StaticResourceConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/StaticResourceConfiguration.java index bc71a9511..d7d99d3a7 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/StaticResourceConfiguration.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/StaticResourceConfiguration.java @@ -36,7 +36,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter public class StaticResourceConfiguration extends WebMvcConfigurerAdapter { private static final String[] CLASSPATH_RESOURCE_LOCATIONS = { - "classpath:/mainGUI/"}; + "classpath:/mainGUI/", + "/"}; @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handy.gif b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handy.gif deleted file mode 100644 index 5aeb542db..000000000 Binary files a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handy.gif and /dev/null differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handy_deprecated.gif b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handy_deprecated.gif new file mode 100644 index 000000000..5aeb542db Binary files /dev/null and b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handy_deprecated.gif differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handysign.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handysign.png new file mode 100644 index 000000000..2c3645774 Binary files /dev/null and b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/handysign.png differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte.gif b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte.gif deleted file mode 100644 index ee9ab7cad..000000000 Binary files a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte.gif and /dev/null differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte.png new file mode 100644 index 000000000..5dfa694ca Binary files /dev/null and b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte.png differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte_deactivated.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte_deactivated.png new file mode 100644 index 000000000..5775734f2 Binary files /dev/null and b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte_deactivated.png differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte_deprecated.gif b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte_deprecated.gif new file mode 100644 index 000000000..ee9ab7cad Binary files /dev/null and b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/karte_deprecated.gif differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/mobile-bku.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/mobile-bku.png deleted file mode 100644 index 697514273..000000000 Binary files a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/mobile-bku.png and /dev/null differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/mobile-bku_deprecated.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/mobile-bku_deprecated.png new file mode 100644 index 000000000..697514273 Binary files /dev/null and b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/mobile-bku_deprecated.png differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku-deactivated.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku-deactivated.png deleted file mode 100644 index c2145f12a..000000000 Binary files a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku-deactivated.png and /dev/null differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku-deactivated_deprecated.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku-deactivated_deprecated.png new file mode 100644 index 000000000..c2145f12a Binary files /dev/null and b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku-deactivated_deprecated.png differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku.png deleted file mode 100644 index d7d524999..000000000 Binary files a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku.png and /dev/null differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku_deprecated.png b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku_deprecated.png new file mode 100644 index 000000000..d7d524999 Binary files /dev/null and b/id/server/moa-id-frontend-resources/src/main/resources/mainGUI/img/online-bku_deprecated.png differ diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css index 32b9dee12..02ff9aba8 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css @@ -508,7 +508,7 @@ } .bkuimage { - width: 90%; + width: 70%; height: auto; } diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js b/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js index e4e05bace..076a43b10 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js @@ -142,7 +142,7 @@ function isIE() { var image = document.getElementById("bkuimage"); var srcatt = image.getAttribute("src"); var last = srcatt.substring(srcatt.lastIndexOf('/')+1); - srcatt = srcatt.replace(last,'online-bku-deactivated.png'); + srcatt = srcatt.replace(last,'karte_deactivated.png'); image.setAttribute("src",srcatt); diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html index 02b86472b..6c70b57b3 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/loginFormFull.html @@ -37,13 +37,13 @@
- OnlineBKU
- HandyBKU diff --git a/id/server/moa-id-spring-initializer/src/main/resources/applicationContext.xml b/id/server/moa-id-spring-initializer/src/main/resources/applicationContext.xml index 42325314c..ae38c836e 100644 --- a/id/server/moa-id-spring-initializer/src/main/resources/applicationContext.xml +++ b/id/server/moa-id-spring-initializer/src/main/resources/applicationContext.xml @@ -20,7 +20,7 @@ - + -- cgit v1.2.3 From 82cdd95b4d584c27198b3d7377c8926c5e24867f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 18 Mar 2016 12:21:51 +0100 Subject: fix problem with error message GUI --- .../src/main/resources/templates/css_template.css | 23 ++++++++++++++-------- .../resources/templates/javascript_tempalte.js | 6 +++--- 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'id/server') diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css index 02ff9aba8..a334b258d 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/css_template.css @@ -69,7 +69,10 @@ margin-bottom: 25px; margin-top: 25px; } - + #alert_area { + width: 500px; + padding-left: 80px; + } #leftcontent { /*float:left; */ width:250px; @@ -368,7 +371,16 @@ font-size: 0pt; visibility: hidden; } - + + #alert_area { + visibility: visible; + width: 250px; + } + #alert_area > p:first-child { + display: none; + visibility: hidden; + } + #leftcontent { visibility: visible; margin-bottom: 0px; @@ -562,6 +574,7 @@ } + .selectTextHeader{ } @@ -619,12 +632,6 @@ margin-left: 5px; margin-bottom: 5px; } - - #alert_area { - width: 500px; - padding-left: 80px; - } - #processInfoArea { margin-bottom: 15px; margin-top: 15px; diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js b/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js index 076a43b10..a463bae65 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/javascript_tempalte.js @@ -43,7 +43,7 @@ function isIE() { var iFrameURL = "$contextPath$submitEndpoint" + "?"; iFrameURL += "&pendingid=" + "$pendingReqID"; - iFrameURL += "bkuURI=" + "$bkuOnline"; + iFrameURL += "&bkuURI=" + "$bkuOnline"; iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; generateIFrame(iFrameURL); @@ -59,7 +59,7 @@ function isIE() { var iFrameURL = "$contextPath$submitEndpoint" + "?"; iFrameURL += "&pendingid=" + "$pendingReqID"; - iFrameURL += "bkuURI=" + "$bkuHandy"; + iFrameURL += "&bkuURI=" + "$bkuHandy"; iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; generateIFrame(iFrameURL); @@ -81,7 +81,7 @@ function isIE() { iFrameURL += "&pendingid=" + "$pendingReqID"; #if($bkuOnline) - iFrameURL += "bkuURI=" + "$bkuOnline"; + iFrameURL += "&bkuURI=" + "$bkuOnline"; #end iFrameURL += "&useMandate=" + document.getElementById("useMandate").value; -- cgit v1.2.3 From cf90af7e819c8844169a142d6f0f9641d6b3dbae Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Fri, 18 Mar 2016 15:15:53 +0100 Subject: add SPType to metadata --- .../moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java index 33b48c0a3..5075e3fe7 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java @@ -32,6 +32,7 @@ import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.EIDASEngineExcepti import at.gv.egovernment.moa.id.config.auth.AuthConfiguration; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import eu.eidas.auth.engine.EIDASSAMLEngine; +import eu.eidas.auth.engine.core.eidas.SPType; import eu.eidas.auth.engine.metadata.MetadataConfigParams; import eu.eidas.auth.engine.metadata.MetadataGenerator; import eu.eidas.engine.exceptions.SAMLEngineException; @@ -80,6 +81,7 @@ public class EidasMetaDataServlet extends HttpServlet { generator.setConfigParams(mcp); generator.initialize(engine); mcp.setEntityID(metadata_url); + mcp.setSpType(SPType.DEFAULT_VALUE); generator.addSPRole(); String returnUrl = sp_return_url; -- cgit v1.2.3 From a148ea688d20e43d737d531d33a35ef72f7ca53e Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 08:38:22 +0100 Subject: small CSS update for new card and mobile-sig logos --- id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css b/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css index 32b9dee12..aa1242371 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/css_template.css @@ -508,8 +508,9 @@ } .bkuimage { - width: 90%; + width: 60%; height: auto; + margin-bottom: 10%; } #mandate{ -- cgit v1.2.3 From 5621b6e6b1c6de0338573eb3c266d1cf5222304b Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 09:57:03 +0100 Subject: update IDP EntityID in default configuration --- .../data/deploy/conf/moa-id-configuration/moa-id-configtool.properties | 2 +- id/server/data/deploy/conf/moa-id-oa/oa.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id-configuration/moa-id-configtool.properties b/id/server/data/deploy/conf/moa-id-configuration/moa-id-configtool.properties index 825a9f138..8f7e0efaf 100644 --- a/id/server/data/deploy/conf/moa-id-configuration/moa-id-configtool.properties +++ b/id/server/data/deploy/conf/moa-id-configuration/moa-id-configtool.properties @@ -66,7 +66,7 @@ general.login.pvp2.isactive=true general.login.pvp2.idp.metadata.url=https://localhost:8443/moa-id-auth/pvp2/metadata general.login.pvp2.idp.metadata.certificate=$PATH_TO_CONFIG$/conf/moa-id-configuration/keys/moa_idp.crt -general.login.pvp2.idp.metadata.entityID=https://localhost:8443/moa-id-auth +general.login.pvp2.idp.metadata.entityID=https://localhost:8443/moa-id-auth/pvp2/metadata general.login.pvp2.idp.sso.logout.url=https://localhost:8443/moa-id-auth/LogOut?redirect= general.login.pvp2.metadata.entities.name=MOA-ID 2.x Configuration Tool diff --git a/id/server/data/deploy/conf/moa-id-oa/oa.properties b/id/server/data/deploy/conf/moa-id-oa/oa.properties index f247dcea6..ff5bd0c03 100644 --- a/id/server/data/deploy/conf/moa-id-oa/oa.properties +++ b/id/server/data/deploy/conf/moa-id-oa/oa.properties @@ -8,7 +8,7 @@ general.publicURLContext=https://localhost:8443/moa-id-oa general.login.pvp2.idp.metadata.url=https://localhost:8443/moa-id-auth/pvp2/metadata general.login.pvp2.idp.metadata.certificate=$PATH_TO_CONFIG$/conf/moa-id-oa/keys/moa_idp.crt -general.login.pvp2.idp.metadata.entityID=https://localhost:8443/moa-id-auth +general.login.pvp2.idp.metadata.entityID=https://localhost:8443/moa-id-auth/pvp2/metadata general.login.pvp2.OA.metadata.entities.name=MOA-ID 2.x Demo-Application -- cgit v1.2.3 From 58c2bcfcdc9bccb417dae80b0bfefc3713e2cd7c Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 10:03:12 +0100 Subject: fix wrong PVP redirect service-endpoint --- .../at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java | 2 +- .../egovernment/moa/id/protocols/pvp2x/binding/MOAURICompare.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java index eec1ccb78..3eaa332c7 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java @@ -243,7 +243,7 @@ public class PVP2XProtocol extends AbstractAuthProtocolModulController { //get POST-Binding decoder implementation InboundMessage msg = (InboundMessage) new RedirectBinding().decode( req, resp, MOAMetadataProvider.getInstance(), false, - new MOAURICompare(PVPConfiguration.getInstance().getIDPSSOPostService(pendingReq.getAuthURL()))); + new MOAURICompare(PVPConfiguration.getInstance().getIDPSSORedirectService(pendingReq.getAuthURL()))); pendingReq.setRequest(msg); //preProcess Message diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/MOAURICompare.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/MOAURICompare.java index 6080f8a33..7bb64a106 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/MOAURICompare.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/MOAURICompare.java @@ -24,6 +24,8 @@ package at.gv.egovernment.moa.id.protocols.pvp2x.binding; import org.opensaml.common.binding.decoding.URIComparator; +import at.gv.egovernment.moa.logging.Logger; + public class MOAURICompare implements URIComparator { /** @@ -40,8 +42,12 @@ public class MOAURICompare implements URIComparator { if (this.serviceURL.equals(uri1)) return true; - else + else { + Logger.warn("PVP request destination-endpoint: " + uri1 + + " does not match to IDP endpoint:" + serviceURL); return false; + + } } } -- cgit v1.2.3 From 9530f4dc07e8328a2f54d921d248e797dac54b6a Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 10:06:28 +0100 Subject: remove unused constans --- .../java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java | 5 ----- 1 file changed, 5 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java index 3eaa332c7..2cb62b993 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java @@ -114,12 +114,7 @@ public class PVP2XProtocol extends AbstractAuthProtocolModulController { public static final String METADATA = "Metadata"; public static final String ATTRIBUTEQUERY = "AttributeQuery"; public static final String SINGLELOGOUT = "SingleLogOut"; - - public static final String ENDPOINT_IDP = "idp"; - public static final String ENDPOINT_SP = "sp"; - public static final String PARAMETER_ENDPOINT = "endpointtype"; - public static final List DEFAULTREQUESTEDATTRFORINTERFEDERATION = Arrays.asList( new String[] { PVPConstants.EID_SECTOR_FOR_IDENTIFIER_NAME -- cgit v1.2.3 From 5ce6653606098ae346257cb477f67b9e204ab04f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 10:16:45 +0100 Subject: fix typo --- .../gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java index 7278c9c6c..279038967 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/binding/RedirectBinding.java @@ -183,7 +183,7 @@ public class RedirectBinding implements IDecoder, IEncoder { } if (metadataProvider instanceof IMOARefreshableMetadataProvider) { - Logger.debug("PVP2X message validation FAILED. Relead metadata for entityID: " + messageContext.getPeerEntityId()); + Logger.debug("PVP2X message validation FAILED. Reload metadata for entityID: " + messageContext.getInboundMessageIssuer()); if (!((IMOARefreshableMetadataProvider) metadataProvider).refreshMetadataProvider(messageContext.getInboundMessageIssuer())) throw e; -- cgit v1.2.3 From f6d265549193e3db5ce574d33425d06e738a025c Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 10:55:51 +0100 Subject: fix problem with entityID in single logout functionality --- .../moa/id/protocols/pvp2x/builder/SingleLogOutBuilder.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/SingleLogOutBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/SingleLogOutBuilder.java index c793b5dee..e5c897aa6 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/SingleLogOutBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/SingleLogOutBuilder.java @@ -77,6 +77,7 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.PVPTargetConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.binding.IEncoder; import at.gv.egovernment.moa.id.protocols.pvp2x.binding.PostBinding; import at.gv.egovernment.moa.id.protocols.pvp2x.binding.RedirectBinding; +import at.gv.egovernment.moa.id.protocols.pvp2x.config.PVPConfiguration; import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.BindingNotSupportedException; import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.NOSLOServiceDescriptorException; import at.gv.egovernment.moa.id.protocols.pvp2x.exceptions.NoMetadataInformationException; @@ -232,7 +233,7 @@ public class SingleLogOutBuilder { DateTime now = new DateTime(); Issuer issuer = SAML2Utils.createSAMLObject(Issuer.class); - issuer.setValue(sloInfo.getAuthURL()); + issuer.setValue(PVPConfiguration.getInstance().getIDPSSOMetadataService(sloInfo.getAuthURL())); issuer.setFormat(NameID.ENTITY); sloReq.setIssuer(issuer); sloReq.setIssueInstant(now); @@ -321,7 +322,8 @@ public class SingleLogOutBuilder { private LogoutResponse buildBasicResponse(SingleLogoutService sloService, PVPTargetConfiguration spRequest) throws ConfigurationException, MOAIDException { LogoutResponse sloResp = SAML2Utils.createSAMLObject(LogoutResponse.class); Issuer issuer = SAML2Utils.createSAMLObject(Issuer.class); - issuer.setValue(spRequest.getAuthURLWithOutSlash()); + issuer.setValue(PVPConfiguration.getInstance().getIDPSSOMetadataService( + spRequest.getAuthURLWithOutSlash())); issuer.setFormat(NameID.ENTITY); sloResp.setIssuer(issuer); sloResp.setIssueInstant(new DateTime()); -- cgit v1.2.3 From 20afefb3ffcfd9381c286653f310fbc3b989c512 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 10:56:30 +0100 Subject: fix some problems with logging and error codes --- id/server/doc/handbook/protocol/protocol.html | 8 ++++++++ .../moa/id/protocols/pvp2x/PVP2XProtocol.java | 17 +++++++++++++---- .../pvp2x/signer/AbstractCredentialProvider.java | 19 ++++++++++--------- .../signer/CredentialsNotAvailableException.java | 5 +++++ .../resources/properties/id_messages_de.properties | 3 +++ .../protocol_response_statuscodes_de.properties | 7 ++++++- .../tasks/ReceiveElgaMandateResponseTask.java | 14 +++++++++++--- 7 files changed, 56 insertions(+), 17 deletions(-) (limited to 'id/server') diff --git a/id/server/doc/handbook/protocol/protocol.html b/id/server/doc/handbook/protocol/protocol.html index 3b31dbfc0..8e0260a38 100644 --- a/id/server/doc/handbook/protocol/protocol.html +++ b/id/server/doc/handbook/protocol/protocol.html @@ -851,6 +851,14 @@ Redirect Binding 9007 Der SZR-Gateway Client konnte nicht initialisiert werden. + + 9008 + Fehler beim Verarbeiten eines Konfigurationsparameters. + + + 9099 + Allgemeiner Konfigurationsfehler +
1.3.4.2 Interne Fehler (91xxx)
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java index 2cb62b993..bca080ba6 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVP2XProtocol.java @@ -203,12 +203,15 @@ public class PVP2XProtocol extends AbstractAuthProtocolModulController { String samlRequest = req.getParameter("SAMLRequest"); Logger.warn("Receive INVALID protocol request: " + samlRequest, e); throw new InvalidProtocolRequestException("pvp2.22", new Object[] {e.getMessage()}); + + } catch (MOAIDException e) { + throw e; } catch (Throwable e) { String samlRequest = req.getParameter("SAMLRequest"); Logger.warn("Receive INVALID protocol request: " + samlRequest, e); - throw new MOAIDException(e.getMessage(), new Object[] {}); + throw new MOAIDException("pvp2.24", new Object[] {e.getMessage()}); } } @@ -254,11 +257,14 @@ public class PVP2XProtocol extends AbstractAuthProtocolModulController { Logger.warn("Receive INVALID protocol request: " + samlRequest, e); throw new InvalidProtocolRequestException("pvp2.22", new Object[] {e.getMessage()}); + } catch (MOAIDException e) { + throw e; + } catch (Throwable e) { String samlRequest = req.getParameter("SAMLRequest"); Logger.warn("Receive INVALID protocol request: " + samlRequest, e); - throw new MOAIDException(e.getMessage(), new Object[] {}); + throw new MOAIDException("pvp2.24", new Object[] {e.getMessage()}); } } @@ -304,12 +310,15 @@ public class PVP2XProtocol extends AbstractAuthProtocolModulController { String samlRequest = req.getParameter("SAMLRequest"); Logger.warn("Receive INVALID protocol request: " + samlRequest, e); throw new InvalidProtocolRequestException("pvp2.22", new Object[] {e.getMessage()}); - + + } catch (MOAIDException e) { + throw e; + } catch (Throwable e) { String samlRequest = req.getParameter("SAMLRequest"); Logger.warn("Receive INVALID protocol request: " + samlRequest, e); - throw new MOAIDException(e.getMessage(), new Object[] {}); + throw new MOAIDException("pvp2.24", new Object[] {e.getMessage()}); } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/AbstractCredentialProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/AbstractCredentialProvider.java index 4c9a1e59f..bf4cfd480 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/AbstractCredentialProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/AbstractCredentialProvider.java @@ -121,15 +121,15 @@ public abstract class AbstractCredentialProvider { credentials.setUsageType(UsageType.SIGNING); if (credentials.getPrivateKey() == null && credentials.getSecretKey() == null) { Logger.error(getFriendlyName() + " Metadata Signing credentials is not found or contains no PrivateKey."); - throw new CredentialsNotAvailableException(getFriendlyName() + " Assertion Signing credentials (Alias: " - + getMetadataKeyAlias() + ") is not found or contains no PrivateKey.", null); + throw new CredentialsNotAvailableException("config.27", new Object[]{getFriendlyName() + " Assertion Signing credentials (Alias: " + + getMetadataKeyAlias() + ") is not found or contains no PrivateKey."}); } return credentials; } catch (Exception e) { Logger.error("Failed to generate " + getFriendlyName() + " Metadata Signing credentials"); e.printStackTrace(); - throw new CredentialsNotAvailableException(e.getMessage(), null); + throw new CredentialsNotAvailableException("config.27", new Object[]{e.getMessage()}, e); } } @@ -146,8 +146,8 @@ public abstract class AbstractCredentialProvider { credentials.setUsageType(UsageType.SIGNING); if (credentials.getPrivateKey() == null && credentials.getSecretKey() == null) { Logger.error(getFriendlyName() + " Assertion Signing credentials is not found or contains no PrivateKey."); - throw new CredentialsNotAvailableException(getFriendlyName() + " Assertion Signing credentials (Alias: " - + getSignatureKeyAlias() + ") is not found or contains no PrivateKey.", null); + throw new CredentialsNotAvailableException("config.27", new Object[]{getFriendlyName() + " Assertion Signing credentials (Alias: " + + getSignatureKeyAlias() + ") is not found or contains no PrivateKey."}); } @@ -155,7 +155,7 @@ public abstract class AbstractCredentialProvider { } catch (Exception e) { Logger.error("Failed to generate " + getFriendlyName() + " Assertion Signing credentials"); e.printStackTrace(); - throw new CredentialsNotAvailableException(e.getMessage(), null); + throw new CredentialsNotAvailableException("config.27", new Object[]{e.getMessage()}, e); } } @@ -177,16 +177,17 @@ public abstract class AbstractCredentialProvider { if (credentials.getPrivateKey() == null && credentials.getSecretKey() == null) { Logger.error(getFriendlyName() + " Assertion Encryption credentials is not found or contains no PrivateKey."); - throw new CredentialsNotAvailableException(getFriendlyName() + " Assertion Encryption credentials (Alias: " - + getEncryptionKeyAlias() + ") is not found or contains no PrivateKey.", null); + throw new CredentialsNotAvailableException("config.27", new Object[]{getFriendlyName() + " Assertion Encryption credentials (Alias: " + + getEncryptionKeyAlias() + ") is not found or contains no PrivateKey."}); } return (X509Credential) credentials; + } catch (Exception e) { Logger.error("Failed to generate " + getFriendlyName() + " Assertion Encryption credentials"); e.printStackTrace(); - throw new CredentialsNotAvailableException(e.getMessage(), null); + throw new CredentialsNotAvailableException("config.27", new Object[]{e.getMessage()}, e); } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialsNotAvailableException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialsNotAvailableException.java index 1e1c37621..85de666c9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialsNotAvailableException.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/signer/CredentialsNotAvailableException.java @@ -31,6 +31,11 @@ public class CredentialsNotAvailableException extends MOAIDException { super(messageId, parameters); } + public CredentialsNotAvailableException(String messageId, + Object[] parameters, Throwable e) { + super(messageId, parameters, e); + } + /** * */ diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index c47ec2477..9986d5679 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -87,6 +87,7 @@ config.23=Fehler beim initialisieren von OpenSAML config.24=MOA-ID-Auth Configfile {1} does not start with {0} prefix. config.25=Der verwendete IDP PublicURLPrefix {0} ist nicht erlaubt. config.26=Federated IDP {0} contains no AttributeQuery URL. +config.27=Fehler beim Verarbeiten eines Konfigurationsparameters. Msg:{0} parser.00=Leichter Fehler beim Parsen: {0} parser.01=Fehler beim Parsen: {0} @@ -279,6 +280,7 @@ pvp2.20=F\u00FCr die im Request angegebene EntityID konnten keine g\u00FCltigen pvp2.21=Die Signature des Requests konnte nicht g\u00FCltig validiert werden. pvp2.22=Der Request konnte nicht g\u00FCltig validiert werden (Fehler\={0}). pvp2.23={0} ist keine gueltige AssertionConsumerServiceURL oder entspricht nicht den Metadaten. +pvp2.24=Der Request konnte nicht verarbeitet werden (Fehler\={0}). ##add status codes!!!! @@ -294,6 +296,7 @@ sp.pvp2.08=Receive invalid PVP Response from {0}. Response issuer {1} is not val sp.pvp2.09=Receive invalid PVP Response from {0} {1}. StatusCodes:{2} {3} Msg:{4} sp.pvp2.10=Receive invalid PVP Response from {0}. No valid assertion included. sp.pvp2.11=Receive invalid PVP Response from {0}. Assertion decryption FAILED. +sp.pvp2.12=Receive invalid PVP Response from {0}. Msg:{1} oauth20.01=Fehlerhafte redirect url oauth20.02=Fehlender oder ung\u00FCltiger Parameter "{0}" diff --git a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties index 581037a29..f97ebeeca 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties @@ -66,7 +66,8 @@ config.22=9008 config.23=9199 config.24=9199 config.25=9199 -config.26=TODO +config.26=9099 +config.27=9008 parser.00=1101 parser.01=1101 @@ -114,6 +115,7 @@ sp.pvp2.08=4502 sp.pvp2.09=4503 sp.pvp2.10=4502 sp.pvp2.11=4502 +sp.pvp2.12=4502 validator.00=1102 validator.01=1102 @@ -222,6 +224,9 @@ pvp2.17=6102 pvp2.20=6103 pvp2.21=6104 pvp2.22=6105 +pvp2.23=6105 +pvp2.24=6105 + oauth20.01=6200 oauth20.06=1000 diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java index f976793b8..c2ca69238 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java @@ -179,12 +179,20 @@ public class ReceiveElgaMandateResponseTask extends AbstractAuthServletTask { String samlRequest = request.getParameter("SAMLRequest"); Logger.warn("Receive INVALID PVP Response from ELGA mandate-service: " + samlRequest, e); revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_ERROR_RECEIVED); - throw new TaskExecutionException(pendingReq, "Receive INVALID PVP Response from ELGA mandate-service", e); + throw new TaskExecutionException(pendingReq, + "Receive INVALID PVP Response from ELGA mandate-service", + new AuthnResponseValidationException("sp.pvp2.12", + new Object[]{ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING, e.getMessage()}, + e)); } catch (IOException | MarshallingException | TransformerException e) { Logger.warn("Processing PVP response from ELGA mandate-service FAILED.", e); revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_ERROR_RECEIVED); - throw new TaskExecutionException(pendingReq, "Processing PVP response from ELGA mandate-service FAILED.", e); + throw new TaskExecutionException(pendingReq, + "Processing PVP response from ELGA mandate-service FAILED.", + new AuthnResponseValidationException("sp.pvp2.12", + new Object[]{ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING, e.getMessage()}, + e)); } catch (CredentialsNotAvailableException e) { Logger.error("ELGA mandate-service: PVP response decrytion FAILED. No credential found.", e); @@ -195,7 +203,7 @@ public class ReceiveElgaMandateResponseTask extends AbstractAuthServletTask { Logger.info("ELGA mandate-service: PVP response validation FAILED. Msg:" + e.getMessage()); revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_ERROR_RECEIVED, e.getMessageId()); throw new TaskExecutionException(pendingReq, "ELGA mandate-service: PVP response validation FAILED.", e); - + } catch (Exception e) { Logger.info("ELGA mandate-service: General Exception. Msg:" + e.getMessage()); revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_ERROR_RECEIVED); -- cgit v1.2.3 From 328c1dc9f22623f6e7cdf1c23dd104c10011ee91 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 12:00:33 +0100 Subject: add missing PVP attribute 'mandate-type-oid' --- .../attributes/MandateTypeOIDAttributeBuilder.java | 59 ++++++++++++++++++++++ .../moa/id/protocols/pvp2x/PVPConstants.java | 5 ++ ....protocols.builder.attributes.IAttributeBuilder | 1 + 3 files changed, 65 insertions(+) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java new file mode 100644 index 000000000..80d330172 --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + *******************************************************************************/ +package at.gv.egovernment.moa.id.protocols.builder.attributes; + +import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; +import at.gv.egovernment.moa.id.data.IAuthData; +import at.gv.egovernment.moa.id.protocols.pvp2x.builder.attributes.exceptions.AttributeException; +import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; + +public class MandateTypeOIDAttributeBuilder implements IPVPAttributeBuilder { + + public String getName() { + return MANDATE_TYPE_OID_NAME; + } + + public ATT build(IOAAuthParameters oaParam, IAuthData authData, + IAttributeGenerator g) throws AttributeException { + if (authData.isUseMandate()) { + //get PVP attribute directly, if exists + String mandateType = authData.getGenericData(MANDATE_TYPE_OID_NAME, String.class); + + if (MiscUtil.isEmpty(mandateType)) { + Logger.info("MIS Mandate does not include 'Mandate-Type OID'."); + return null; + + } + + return g.buildStringAttribute(MANDATE_TYPE_OID_FRIENDLY_NAME, MANDATE_TYPE_OID_NAME, mandateType); + } + return null; + + } + + public ATT buildEmpty(IAttributeGenerator g) { + return g.buildEmptyAttribute(MANDATE_TYPE_FRIENDLY_NAME, MANDATE_TYPE_NAME); + } + +} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java index c2b61aaa7..eaddd0789 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java @@ -190,6 +190,11 @@ public interface PVPConstants { public static final String MANDATE_TYPE_FRIENDLY_NAME = "MANDATE-TYPE"; public static final int MANDATE_TYPE_MAX_LENGTH = 256; + public static final String MANDATE_TYPE_OID_OID = "1.2.40.0.10.2.1.1.261.106"; + public static final String MANDATE_TYPE_OID_NAME = URN_OID_PREFIX + MANDATE_TYPE_OID_OID; + public static final String MANDATE_TYPE_OID_FRIENDLY_NAME = "MANDATE-TYPE-OID"; + public static final int MANDATE_TYPE_OID_MAX_LENGTH = 256; + public static final String MANDATE_NAT_PER_SOURCE_PIN_OID = "1.2.40.0.10.2.1.1.261.70"; public static final String MANDATE_NAT_PER_SOURCE_PIN_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_SOURCE_PIN_OID; public static final String MANDATE_NAT_PER_SOURCE_PIN_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-SOURCE-PIN"; diff --git a/id/server/idserverlib/src/main/resources/META-INF/services/at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder b/id/server/idserverlib/src/main/resources/META-INF/services/at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder index 8e5d6ee3c..d40be32f5 100644 --- a/id/server/idserverlib/src/main/resources/META-INF/services/at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder +++ b/id/server/idserverlib/src/main/resources/META-INF/services/at.gv.egovernment.moa.id.protocols.builder.attributes.IAttributeBuilder @@ -26,6 +26,7 @@ at.gv.egovernment.moa.id.protocols.builder.attributes.MandateProfRepDescAttribut at.gv.egovernment.moa.id.protocols.builder.attributes.MandateProfRepOIDAttributeBuilder at.gv.egovernment.moa.id.protocols.builder.attributes.MandateReferenceValueAttributeBuilder at.gv.egovernment.moa.id.protocols.builder.attributes.MandateTypeAttributeBuilder +at.gv.egovernment.moa.id.protocols.builder.attributes.MandateTypeOIDAttributeBuilder at.gv.egovernment.moa.id.protocols.builder.attributes.PrincipalNameAttributeBuilder at.gv.egovernment.moa.id.protocols.builder.attributes.PVPVersionAttributeBuilder at.gv.egovernment.moa.id.protocols.builder.attributes.HolderOfKey -- cgit v1.2.3 From 402cfcf7e5a8f3bb040ebe9fae5904c202e1e94f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 12:14:09 +0100 Subject: Change default PVP assertion encryption-algorithm to AES256-CBC --- .../java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java index eaddd0789..73d6e978e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/PVPConstants.java @@ -31,7 +31,7 @@ public interface PVPConstants { public static final String DEFAULT_SIGNING_METHODE = SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256; public static final String DEFAULT_DIGESTMETHODE = SignatureConstants.ALGO_ID_DIGEST_SHA256; - public static final String DEFAULT_SYM_ENCRYPTION_METHODE = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128; + public static final String DEFAULT_SYM_ENCRYPTION_METHODE = EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256; public static final String DEFAULT_ASYM_ENCRYPTION_METHODE = EncryptionConstants.ALGO_ID_KEYTRANSPORT_RSAOAEP; -- cgit v1.2.3 From f1c588836f613209984c15a761d65b20c66ca4e9 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 13:29:52 +0100 Subject: add missing error codes --- id/server/doc/handbook/protocol/protocol.html | 4 ++ .../auth/exception/MOAIllegalStateException.java | 46 +++++++++++++++++++ .../AbstractProcessEngineSignalController.java | 7 ++- .../resources/properties/id_messages_de.properties | 1 + .../protocol_response_statuscodes_de.properties | 1 + .../id/commons/api/exceptions/MOAIDException.java | 52 ---------------------- .../oauth20/exceptions/OAuth20Exception.java | 6 +-- 7 files changed, 60 insertions(+), 57 deletions(-) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/MOAIllegalStateException.java (limited to 'id/server') diff --git a/id/server/doc/handbook/protocol/protocol.html b/id/server/doc/handbook/protocol/protocol.html index 8e0260a38..ff7921ad5 100644 --- a/id/server/doc/handbook/protocol/protocol.html +++ b/id/server/doc/handbook/protocol/protocol.html @@ -886,6 +886,10 @@ Redirect Binding + + + + diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/MOAIllegalStateException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/MOAIllegalStateException.java new file mode 100644 index 000000000..bc19a3f39 --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/MOAIllegalStateException.java @@ -0,0 +1,46 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.exception; + +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; + +/** + * @author tlenz + * + */ +public class MOAIllegalStateException extends MOAIDException { + + /** + * + */ + private static final long serialVersionUID = 613582783125887683L; + + /** + * + */ + public MOAIllegalStateException(String code, Object[] params) { + super(code, params); + + } + +} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java index a23938f97..f22c82e95 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java @@ -9,6 +9,7 @@ import org.apache.commons.lang.StringEscapeUtils; import org.springframework.beans.factory.annotation.Autowired; import at.gv.egovernment.moa.id.advancedlogging.TransactionIDUtils; +import at.gv.egovernment.moa.id.auth.exception.MOAIllegalStateException; import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; @@ -30,7 +31,8 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont try { if (pendingRequestID == null) { - throw new IllegalStateException("Unable to determine MOA pending-request id."); + throw new MOAIllegalStateException("process.03", new Object[]{"Unable to determine MOA pending-request id."}); + } IRequest pendingReq = requestStorage.getPendingRequest(pendingRequestID); @@ -49,7 +51,8 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont // process instance is mandatory if (pendingReq.getProcessInstanceId() == null) { - throw new IllegalStateException("MOA session does not provide process instance id."); + throw new MOAIllegalStateException("process.03", new Object[]{"MOA session does not provide process instance id."}); + } // wake up next task diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index 9986d5679..a579dd80b 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -315,3 +315,4 @@ slo.02=Es wurde keine aktive SSO Session gefunden oder Sie sind bei keiner Onlin process.01=Fehler beim Ausf\u00FChren des Prozesses. process.02=Fehler beim Erstellen eines geeigneten Prozesses f\u00FCr die SessionID {0}. +process.03=Fehler beim Weiterführen es Prozesses. Msg:{0} diff --git a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties index f97ebeeca..653e073a2 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties @@ -102,6 +102,7 @@ service.10=4500 process.01=9104 process.02=9104 +process.03=9105 sp.pvp2.00=4501 sp.pvp2.01=4501 diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/MOAIDException.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/MOAIDException.java index 955b0f5ea..6841be92b 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/MOAIDException.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/api/exceptions/MOAIDException.java @@ -49,16 +49,7 @@ package at.gv.egovernment.moa.id.commons.api.exceptions; import java.io.PrintStream; import java.io.PrintWriter; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; - -import org.w3c.dom.DOMImplementation; -import org.w3c.dom.Document; -import org.w3c.dom.Element; - import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; -import at.gv.egovernment.moa.util.Constants; /** * Base class of technical MOA exceptions. @@ -176,47 +167,4 @@ public Object[] getParameters() { return parameters; } -/** - * Convert this MOAIDException to an ErrorResponse - * element from the MOA namespace. - * - * @return An ErrorResponse element, containing the subelements - * ErrorCode and Info required by the MOA schema. - */ - public Element toErrorResponse() { - DocumentBuilder builder; - DOMImplementation impl; - Document doc; - Element errorResponse; - Element errorCode; - Element info; - - // create a new document - try { - builder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - impl = builder.getDOMImplementation(); - } catch (ParserConfigurationException e) { - return null; - } - - // build the ErrorResponse element - doc = impl.createDocument(Constants.MOA_NS_URI, "ErrorResponse", null); - errorResponse = doc.getDocumentElement(); - - // add MOA namespace declaration - errorResponse.setAttributeNS( - Constants.XMLNS_NS_URI, - "xmlns", - Constants.MOA_NS_URI); - - // build the child elements - errorCode = doc.createElementNS(Constants.MOA_NS_URI, "ErrorCode"); - errorCode.appendChild(doc.createTextNode(messageId)); - info = doc.createElementNS(Constants.MOA_NS_URI, "Info"); - info.appendChild(doc.createTextNode(toString())); - errorResponse.appendChild(errorCode); - errorResponse.appendChild(info); - return errorResponse; - } - } diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/exceptions/OAuth20Exception.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/exceptions/OAuth20Exception.java index d7fecd1b5..5dc36868b 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/exceptions/OAuth20Exception.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/exceptions/OAuth20Exception.java @@ -22,9 +22,9 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.oauth20.exceptions; -import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; -public class OAuth20Exception extends RuntimeException { +public class OAuth20Exception extends MOAIDException { private static final long serialVersionUID = 1L; @@ -33,7 +33,7 @@ public class OAuth20Exception extends RuntimeException { private String errorCode; public OAuth20Exception(final String errorCode, final String messageId, final Object[] parameters) { - super(MOAIDMessageProvider.getInstance().getMessage(messageId, parameters)); + super(messageId, parameters); this.errorCode = errorCode; this.messageId = messageId; } -- cgit v1.2.3 From fa84a87f6ac2b1a69f11e24fcc941a36def33e1b Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 13:30:13 +0100 Subject: add truststore for metadata validation --- .../conf/moa-spss/SampleMOASPSSConfiguration.xml | 4 ++++ .../trustProfiles/PVP_metadata/eIDAS_test_node.crt | 26 ++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 id/server/data/deploy/conf/moa-spss/trustProfiles/PVP_metadata/eIDAS_test_node.crt (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml b/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml index ce5a21d57..d2facbd1a 100644 --- a/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml +++ b/id/server/data/deploy/conf/moa-spss/SampleMOASPSSConfiguration.xml @@ -51,6 +51,10 @@ eIDAS_metadata trustProfiles/eIDAS_metadata + + PVP_metadata + trustProfiles/PVP_metadata + true diff --git a/id/server/data/deploy/conf/moa-spss/trustProfiles/PVP_metadata/eIDAS_test_node.crt b/id/server/data/deploy/conf/moa-spss/trustProfiles/PVP_metadata/eIDAS_test_node.crt new file mode 100644 index 000000000..14e5e5cb5 --- /dev/null +++ b/id/server/data/deploy/conf/moa-spss/trustProfiles/PVP_metadata/eIDAS_test_node.crt @@ -0,0 +1,26 @@ +-----BEGIN CERTIFICATE----- +MIIFMTCCAxkCBFYbwMgwDQYJKoZIhvcNAQENBQAwXTELMAkGA1UEBhMCQkUxCzAJBgNVBAgMAkVV +MREwDwYDVQQHDAhCcnVzc2VsczELMAkGA1UECgwCRUMxDjAMBgNVBAsMBURJR0lUMREwDwYDVQQD +DAhtZXRhZGF0YTAeFw0xNTEwMTIxNDE2NDBaFw0xNjEwMTExNDE2NDBaMF0xCzAJBgNVBAYTAkJF +MQswCQYDVQQIDAJFVTERMA8GA1UEBwwIQnJ1c3NlbHMxCzAJBgNVBAoMAkVDMQ4wDAYDVQQLDAVE +SUdJVDERMA8GA1UEAwwIbWV0YWRhdGEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCN +5mYsOKzSJ9ksT9dHtFOztF1M8GIMeBLm6chIvtKHwXVLzO53RKhcOwt0j847VL6m5PcAAp57SutC +DeukA8p6UCUA905p+m7+dt7iEsUV3yje4M8dDFS/LwEF9GhFm3v471ZRYPDW769v14QkmnA9vxWB +WAj4WcMRMats9choHJdnRa1xUnVjx8yMojoVaPwt1tkG/rRnPev2o0g+VI63XkYd1pLKAU5Pt+n7 +LevLPJsvgkKLQhEB7bvMG1tZ1P4fJ0n3FOHmfLHJ/yEWA+hHXorX5T3G8Fq6GsI5O/c1zkZ7QMSw +WwzXDbq5qrfyzesdlTPfdsPnFIRddCgx8NuVwI+brlYDSdLGEm+byfM9W4WmfDN6SK1oGMSibuz7 +K49Xh0MFVKNyxT9hCz309UiV71RGnveZxdMGu4vdzP74Ll3G48IIgQ4ymFPMONYBesuorxDunSqs +R2F1+Th7k7UXL1xblFRaEyqdHlvhVrJqDP6sM9k3lM75aN4L4QMOyKRAqar+Q7f7NoUcx8cvHfqD +GLJUPcqn2msMa3mAXO5ihA2ERN41wmnmeJzsd/UiFkaqIvXUTZVwxUfQWn3D9uCg2lRAvOTHydkP +Cfwj4BtL0P9L3eSZ9NM8IGlTmlyApp2bPlzO92BsE8RE7feOmSLZESDKosqkQzZo2CMr/7V9XQID +AQABMA0GCSqGSIb3DQEBDQUAA4ICAQALfSi+sa90MbJkAeTIA/la1ibtRkPX6jIjHBvkeq8IYEZi +XxjJvI4CuQY6WSPMoDY0w9iJvKIygCxRlVi77CtFzu/otOLrXb8ozInopykRMIH4TyVmKYf//CoE +fkQ3vThaf1JLpKpLuhtqHwV03f7jwODaJBqvqdaBX3VHHMPDOeAWQTAd2abMoHgYRlUgB9TKcbJ1 +akWUyX7hnwZSCiKWbL4nrwsFJc0skFVkfjEQxlZUeRXj/bKgnb0BYUsPsFfxXKJIsIc8CmXGvxKz +B5TSpYIR79WliT9Fo8T1dJ9a/wr+bOXeM/aSUxLechCl+uDuP8yI2iRz9LT++/16HOrRSUuefHpo +7wJLJnALMABW21eMwS2XBInUBrBN9CVGAJUDF6GQWMbfxA8x0uh4oKoa/4stP5maaf/FBe52pNNv +Tacb7P3xJc0mS7jatuAHH0UfXy3+3D3z+SJY4Vy2a1cj5U1nUuxxwIRwsoRtWph0BER4RlOz4lXS +N8ZK9ahgmCsndm+eDvIJm706s7bd8m/X8Xc/lMK+eKhrK6uIIMmkwbdzbgsOS7Plj9IMGm0S4Kdb +rnAKhkhAXUi4zbd55aTx1kDodpid/dYPiqxSauyYmCXKbyFCAfY76Zw9SuFBRJClx4h5Mxb/EEpq +1WHM9IyZshufnuZ587WzqtGmJJubTA== +-----END CERTIFICATE----- \ No newline at end of file -- cgit v1.2.3 From f7361a2d7964c73873e699cfe9b971fe57704cb6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 13:37:59 +0100 Subject: fix compilation problem --- .../moa/id/auth/exception/InvalidProtocolRequestException.java | 3 +++ .../moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java | 2 +- .../moa/id/protocols/oauth20/protocol/OAuth20Protocol.java | 4 ++-- 3 files changed, 6 insertions(+), 3 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/InvalidProtocolRequestException.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/InvalidProtocolRequestException.java index 712d90fd8..c6b8a4b6e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/InvalidProtocolRequestException.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/exception/InvalidProtocolRequestException.java @@ -43,4 +43,7 @@ public class InvalidProtocolRequestException extends MOAIDException { super(messageId, parameters); } + public InvalidProtocolRequestException(String messageId, Object[] parameters, Throwable e) { + super(messageId, parameters, e); + } } diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java index 88669bd90..3ab283db5 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20BaseRequest.java @@ -94,7 +94,7 @@ abstract class OAuth20BaseRequest extends RequestImpl { this.checkAllowedParameters(request); } - private void checkAllowedParameters(final HttpServletRequest request) { + private void checkAllowedParameters(final HttpServletRequest request) throws OAuth20WrongParameterException { Logger.debug("Going to check for allowed parameters"); this.allowedParameters.add(OAuth20Constants.PARAM_MOA_ACTION); this.allowedParameters.add(OAuth20Constants.PARAM_MOA_MOD); diff --git a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java index 2f8c43e23..e6ccc67b7 100644 --- a/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java +++ b/id/server/modules/moa-id-module-openID/src/main/java/at/gv/egovernment/moa/id/protocols/oauth20/protocol/OAuth20Protocol.java @@ -81,7 +81,7 @@ public class OAuth20Protocol extends AbstractAuthProtocolModulController { } catch (OAuth20Exception e) { Logger.info("OpenID-Connect request has a validation error: " + e.getMessage()); - throw new InvalidProtocolRequestException(e.getMessage(), null); + throw new InvalidProtocolRequestException(e.getMessageId(), e.getParameters(), e); } @@ -115,7 +115,7 @@ public class OAuth20Protocol extends AbstractAuthProtocolModulController { } catch (OAuth20Exception e) { Logger.info("OpenID-Connect request has a validation error: " + e.getMessage()); - throw new InvalidProtocolRequestException(e.getMessage(), null); + throw new InvalidProtocolRequestException(e.getMessageId(), e.getParameters(), e); } -- cgit v1.2.3 From 8746e1a7e3e4a3d19922acf81a952bf27618989f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 13:55:13 +0100 Subject: update default revisions log entries --- .../moa/id/advancedlogging/MOAReversionLogger.java | 40 ++++++++++++++++++---- .../tasks/ReceiveElgaMandateResponseTask.java | 12 +++++++ 2 files changed, 45 insertions(+), 7 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java index 4620a5c6b..6fa07a098 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java @@ -49,6 +49,9 @@ public class MOAReversionLogger { @Autowired protected AuthConfiguration authConfig; + public static final String NAT_PERSON = "nat"; + public static final String JUR_PERSON = "jur"; + private static final List defaultEventCodes = Arrays.asList( MOAIDEventConstants.SESSION_CREATED, MOAIDEventConstants.SESSION_DESTROYED, @@ -60,6 +63,11 @@ public class MOAReversionLogger { MOAIDEventConstants.AUTHPROTOCOL_TYPE, MOAIDEventConstants.AUTHPROTOCOL_PVP_METADATA, + MOAIDEventConstants.AUTHPROCESS_SERVICEPROVIDER, + MOAIDEventConstants.AUTHPROCESS_INTERFEDERATION, + MOAIDEventConstants.AUTHPROCESS_STORK_REQUESTED, + MOAIDEventConstants.AUTHPROCESS_MANDATES_REQUESTED, + MOAIDEventConstants.AUTHPROCESS_START, MOAIDEventConstants.AUTHPROCESS_FINISHED, MOAIDEventConstants.AUTHPROCESS_BKU_URL, @@ -67,10 +75,28 @@ public class MOAReversionLogger { MOAIDEventConstants.AUTHPROCESS_IDL_VALIDATED, MOAIDEventConstants.AUTHPROCESS_CERTIFICATE_VALIDATED, MOAIDEventConstants.AUTHPROCESS_AUTHBLOCK_VALIDATED, + + MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_SERVICE_REQUESTED, + MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_ERROR_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_RECEIVED_IP, + + MOAIDEventConstants.AUTHPROCESS_FOREIGN_FOUND, + MOAIDEventConstants.AUTHPROCESS_FOREIGN_SZRGW_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_PEPS_REQUESTED, + MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_PEPS_IDL_RECEIVED, + + MOAIDEventConstants.AUTHPROCESS_MANDATE_SERVICE_REQUESTED, + MOAIDEventConstants.AUTHPROCESS_MANDATE_REDIRECT, + MOAIDEventConstants.AUTHPROCESS_MANDATE_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_SSO, - MOAIDEventConstants.AUTHPROCESS_INTERFEDERATION, - MOAIDEventConstants.AUTHPROCESS_STORK_REQUESTED, - MOAIDEventConstants.AUTHPROCESS_SERVICEPROVIDER + MOAIDEventConstants.AUTHPROCESS_SSO_ASK_USER_START, + MOAIDEventConstants.AUTHPROCESS_SSO_ASK_USER_FINISHED, + MOAIDEventConstants.AUTHPROCESS_SSO_INVALID + + ); public void logEvent(IOAAuthParameters oaConfig, @@ -159,7 +185,7 @@ public class MOAReversionLogger { if (jaxBMandate.getMandator().getCorporateBody() != null) { logEvent(pendingReq, MOAIDEventConstants.PERSONAL_INFORMATION_MANDATE_MANDATOR_TYPE, - "jur"); + JUR_PERSON); try { String jurBaseID = jaxBMandate.getMandator().getCorporateBody().getIdentification().get(0).getType() + "+" + jaxBMandate.getMandator().getCorporateBody().getIdentification().get(0).getId(); @@ -173,7 +199,7 @@ public class MOAReversionLogger { } else { logEvent(pendingReq, MOAIDEventConstants.PERSONAL_INFORMATION_MANDATE_MANDATOR_TYPE, - "nat"); + NAT_PERSON); logEvent(pendingReq, MOAIDEventConstants.PERSONAL_INFORMATION_MANDATE_MANDATOR_HASH, buildPersonInformationHash( jaxBMandate.getMandator().getPhysicalPerson().getName().getGivenName().get(0), @@ -182,7 +208,7 @@ public class MOAReversionLogger { } } } - + /** * @param pendingReq * @param identityLink @@ -209,7 +235,7 @@ public class MOAReversionLogger { return OASpecificEventCodes; } - private String buildPersonInformationHash(String givenName, String familyName, String dateofBirth) { + public String buildPersonInformationHash(String givenName, String familyName, String dateofBirth) { // {"hash":"hashvalue","salt":"testSalt"} // {"person":{"givenname":"value","familyname":"value","dateofbirth":"value"},"salt":"saltvalue"} diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java index c2ca69238..8960041f5 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java @@ -38,6 +38,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; +import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; import at.gv.egovernment.moa.id.auth.exception.InvalidProtocolRequestException; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; @@ -172,6 +173,17 @@ public class ReceiveElgaMandateResponseTask extends AbstractAuthServletTask { //write revisions log entry revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_RECEIVED); + + //write mandate info's to revisions log + revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.PERSONAL_INFORMATION_MANDATE_TYPE, + extractor.getSingleAttributeValue(PVPConstants.MANDATE_TYPE_NAME)); + revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.PERSONAL_INFORMATION_MANDATE_MANDATOR_TYPE, + MOAReversionLogger.NAT_PERSON); + revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.PERSONAL_INFORMATION_MANDATE_MANDATOR_HASH, + revisionsLogger.buildPersonInformationHash( + extractor.getSingleAttributeValue(PVPConstants.MANDATE_NAT_PER_GIVEN_NAME_NAME), + extractor.getSingleAttributeValue(PVPConstants.MANDATE_NAT_PER_FAMILY_NAME_NAME), + extractor.getSingleAttributeValue(PVPConstants.MANDATE_NAT_PER_BIRTHDATE_NAME))); Logger.info("Receive a valid assertion from ELGA mandate-service " + msg.getEntityID()); -- cgit v1.2.3 From 54a26c8e353069abacefe5232f8270bec6b3cc60 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 21 Mar 2016 15:49:24 +0100 Subject: update libs --- id/server/idserverlib/pom.xml | 4 +- .../moa/id/config/ConfigurationProviderImpl.java | 2 - .../moa/id/protocols/pvp2x/SingleLogOutAction.java | 3 +- .../storage/DBAuthenticationSessionStoreage.java | 29 +-- .../moa/id/util/AxisSecureSocketFactory.java | 258 --------------------- .../main/resources/moaid.configuration.beans.xml | 6 +- id/server/moa-id-commons/pom.xml | 8 +- .../id/commons/db/dao/session/AssertionStore.java | 4 +- .../db/dao/session/AuthenticatedSessionStore.java | 4 +- .../id/commons/db/dao/session/ExceptionStore.java | 125 ---------- .../dao/session/InterfederationSessionStore.java | 4 +- .../id/commons/db/dao/session/OASessionStore.java | 4 +- .../db/dao/session/OldSSOSessionIDStore.java | 4 +- .../id/commons/db/dao/statistic/StatisticLog.java | 4 +- .../src/main/resources/moaid.migration.beans.xml | 6 +- 15 files changed, 38 insertions(+), 427 deletions(-) delete mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java delete mode 100644 id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/ExceptionStore.java (limited to 'id/server') diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index 1c8d89fb4..b226f01b3 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -182,11 +182,11 @@ - + diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java index db6ff8d9b..395aeaadb 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java @@ -57,7 +57,6 @@ import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils; import at.gv.egovernment.moa.id.commons.db.StatisticLogDBUtils; import at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.AuthenticatedSessionStore; -import at.gv.egovernment.moa.id.commons.db.dao.session.ExceptionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.InterfederationSessionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.OASessionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.OldSSOSessionIDStore; @@ -221,7 +220,6 @@ public abstract class ConfigurationProviderImpl implements ConfigurationProvider config.addAnnotatedClass(AuthenticatedSessionStore.class); config.addAnnotatedClass(OASessionStore.class); config.addAnnotatedClass(OldSSOSessionIDStore.class); - config.addAnnotatedClass(ExceptionStore.class); config.addAnnotatedClass(InterfederationSessionStore.class); config.addAnnotatedClass(ProcessInstanceStore.class); config.addProperties(moaSessionProp); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/SingleLogOutAction.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/SingleLogOutAction.java index ae88f3ea4..dfe9ecb49 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/SingleLogOutAction.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/SingleLogOutAction.java @@ -34,6 +34,7 @@ import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; +import org.hibernate.resource.transaction.spi.TransactionStatus; import org.opensaml.saml2.core.LogoutRequest; import org.opensaml.saml2.core.LogoutResponse; import org.opensaml.saml2.metadata.SingleLogoutService; @@ -274,7 +275,7 @@ public class SingleLogOutAction implements IAction { throw new AuthenticationException("pvp2.13", new Object[]{}); } finally { - if (tx != null && !tx.wasCommitted()) { + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) { tx.commit(); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBAuthenticationSessionStoreage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBAuthenticationSessionStoreage.java index 43b4ecf17..094e25040 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBAuthenticationSessionStoreage.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBAuthenticationSessionStoreage.java @@ -32,6 +32,7 @@ import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.Transaction; +import org.hibernate.resource.transaction.spi.TransactionStatus; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -231,7 +232,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt } } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; @@ -321,7 +322,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt } } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; } @@ -371,7 +372,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt return result.get(0); } } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; } @@ -477,7 +478,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt } catch(HibernateException e) { Logger.warn("Error during database saveOrUpdate. Rollback.", e); - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw new AuthenticationException("SSO Session information can not be stored! --> SSO is deactivated", null); } @@ -504,7 +505,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt } catch (Exception e) { if (session != null && session.getTransaction() != null - && !session.getTransaction().wasCommitted()) { + && !session.getTransaction().getStatus().equals(TransactionStatus.COMMITTED)) { session.getTransaction().rollback(); throw e; @@ -534,7 +535,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt } catch (Exception e) { if (session != null && session.getTransaction() != null - && !session.getTransaction().wasCommitted()) { + && !session.getTransaction().getStatus().equals(TransactionStatus.COMMITTED)) { session.getTransaction().rollback(); throw e; @@ -583,7 +584,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt return null; } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; } @@ -626,7 +627,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt return result.get(0).getActiveOAsessions().get(0); } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; } @@ -665,7 +666,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt } catch (Throwable e) { Logger.warn("MOASession deserialization-exception by using MOASessionID=" + nameID); - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); return null; } @@ -702,7 +703,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt return result.get(0).getInderfederation().get(0); } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; } @@ -740,7 +741,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt return result.get(0).getInderfederation().get(0); } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; } @@ -856,7 +857,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt return result.get(0).getInderfederation().get(0); } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; } @@ -948,7 +949,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt } } catch (Exception e) { - if (tx != null && !tx.wasCommitted()) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED)) tx.rollback(); throw e; } @@ -1018,7 +1019,7 @@ public class DBAuthenticationSessionStoreage implements IAuthenticationSessionSt return (AuthenticatedSessionStore) result.get(0); } catch (Exception e) { - if (tx != null && !tx.wasCommitted() && commit) + if (tx != null && !tx.getStatus().equals(TransactionStatus.COMMITTED) && commit) tx.rollback(); throw e; } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java deleted file mode 100644 index fff5fac96..000000000 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/AxisSecureSocketFactory.java +++ /dev/null @@ -1,258 +0,0 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - ******************************************************************************/ -/* - * Copyright 2003 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - */ - - -package at.gv.egovernment.moa.id.util; - -import java.io.BufferedWriter; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.PrintWriter; -import java.net.Socket; -import java.security.GeneralSecurityException; -import java.util.Hashtable; - -import javax.net.ssl.SSLSocket; -import javax.net.ssl.SSLSocketFactory; - -import org.apache.axis.components.net.BooleanHolder; -import org.apache.axis.components.net.DefaultSocketFactory; -import org.apache.axis.components.net.SocketFactory; -import org.apache.axis.components.net.TransportClientProperties; -import org.apache.axis.components.net.TransportClientPropertiesFactory; -import org.apache.axis.utils.Messages; -import org.apache.axis.utils.XMLUtils; - -import at.gv.egovernment.moa.logging.Logger; - -/** - * Secure socket factory for Axis webs service clients of the MOA-ID component, - * which are the MOA-SP calls from MOA-ID Auth, - * and the MOA-ID Auth calls from MOA-ID Proxy. - *
Use this initialization code:
- * // ConnectionParameter connParam = ... get from ConfigurationProvider - * AxisSecureSocketFactory.initialize(connParam); - *
See the Apache Axis documentation on how to configure this class - * as the default secure socket factory to be used by Axis. - *
- * This code has been copied from JSSESocketFactory, the - * method initialize() has been added. - * - * - * @author Paul Ivancsics - * @version $Id$ - */ -public class AxisSecureSocketFactory - extends DefaultSocketFactory implements SocketFactory { - - /** Field sslFactory */ - private static SSLSocketFactory sslFactory; - - /** - * Constructor for AxisSecureSocketFactory. - * @param attributes ??? - */ - public AxisSecureSocketFactory(Hashtable attributes) { - super(attributes); - } - /** - * Initializes the factory by setting the connection parameters to be used for - * setting the secure socket factory, and by setting the system property - * axis.socketSecureFactory. - * @param ssf SSLSocketFactory to initialize with - */ - public static void initialize(SSLSocketFactory ssf) - throws IOException, GeneralSecurityException { - - Logger.debug("Initialize AxisSecureSocketFactory"); - sslFactory = ssf; - } - - /** - * creates a secure socket - * - * @param host - * @param port - * @param otherHeaders - * @param useFullURL - * - * @return Socket - * @throws Exception - */ - public Socket create( - String host, - int port, - StringBuffer otherHeaders, - BooleanHolder useFullURL) - throws Exception { - if (port == -1) { - port = 443; - } - - TransportClientProperties tcp = - TransportClientPropertiesFactory.create("https"); - - boolean hostInNonProxyList = - isHostInNonProxyList(host, tcp.getNonProxyHosts()); - - Socket sslSocket = null; - if (tcp.getProxyHost().length() == 0 || hostInNonProxyList) { - // direct SSL connection - sslSocket = sslFactory.createSocket(host, port); - } - else { - - // Default proxy port is 80, even for https - int tunnelPort = - (tcp.getProxyPort().length() != 0) - ? Integer.parseInt(tcp.getProxyPort()) - : 80; - if (tunnelPort < 0) - tunnelPort = 80; - - // Create the regular socket connection to the proxy - Socket tunnel = new Socket(tcp.getProxyHost(), tunnelPort); - - // The tunnel handshake method (condensed and made reflexive) - OutputStream tunnelOutputStream = tunnel.getOutputStream(); - PrintWriter out = - new PrintWriter( - new BufferedWriter(new OutputStreamWriter(tunnelOutputStream))); - - // More secure version... engage later? - // PasswordAuthentication pa = - // Authenticator.requestPasswordAuthentication( - // InetAddress.getByName(tunnelHost), - // tunnelPort, "SOCK", "Proxy","HTTP"); - // if(pa == null){ - // printDebug("No Authenticator set."); - // }else{ - // printDebug("Using Authenticator."); - // tunnelUser = pa.getUserName(); - // tunnelPassword = new String(pa.getPassword()); - // } - out.print( - "CONNECT " - + host - + ":" - + port - + " HTTP/1.0\r\n" - + "User-Agent: AxisClient"); - if (tcp.getProxyUser().length() != 0 - && tcp.getProxyPassword().length() != 0) { - - // add basic authentication header for the proxy - String encodedPassword = - XMLUtils.base64encode( - (tcp.getProxyUser() + ":" + tcp.getProxyPassword()).getBytes()); - - out.print("\nProxy-Authorization: Basic " + encodedPassword); - } - out.print("\nContent-Length: 0"); - out.print("\nPragma: no-cache"); - out.print("\r\n\r\n"); - out.flush(); - InputStream tunnelInputStream = tunnel.getInputStream(); - - if (log.isDebugEnabled()) { - log.debug( - Messages.getMessage( - "isNull00", - "tunnelInputStream", - "" + (tunnelInputStream == null))); - } - String replyStr = ""; - - // Make sure to read all the response from the proxy to prevent SSL negotiation failure - // Response message terminated by two sequential newlines - int newlinesSeen = 0; - boolean headerDone = false; /* Done on first newline */ - - while (newlinesSeen < 2) { - int i = tunnelInputStream.read(); - - if (i < 0) { - throw new IOException("Unexpected EOF from proxy"); - } - if (i == '\n') { - headerDone = true; - ++newlinesSeen; - } - else if (i != '\r') { - newlinesSeen = 0; - if (!headerDone) { - replyStr += String.valueOf((char) i); - } - } - } - if (!replyStr.startsWith("HTTP/1.0 200") - && !replyStr.startsWith("HTTP/1.1 200")) { - throw new IOException( - Messages.getMessage( - "cantTunnel00", - new String[] { tcp.getProxyHost(), "" + tunnelPort, replyStr })); - } - - // End of condensed reflective tunnel handshake method - sslSocket = sslFactory.createSocket(tunnel, host, port, true); - if (log.isDebugEnabled()) { - log.debug( - Messages.getMessage( - "setupTunnel00", - tcp.getProxyHost(), - "" + tunnelPort)); - } - } - - ((SSLSocket) sslSocket).startHandshake(); - if (log.isDebugEnabled()) { - log.debug(Messages.getMessage("createdSSL00")); - } - return sslSocket; - } - -} diff --git a/id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml b/id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml index 5855fc766..9c27ba581 100644 --- a/id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml +++ b/id/server/idserverlib/src/main/resources/moaid.configuration.beans.xml @@ -15,7 +15,7 @@ - + @@ -24,10 +24,10 @@ - + - + diff --git a/id/server/moa-id-commons/pom.xml b/id/server/moa-id-commons/pom.xml index d0cd08844..df38c8384 100644 --- a/id/server/moa-id-commons/pom.xml +++ b/id/server/moa-id-commons/pom.xml @@ -270,10 +270,16 @@ test
- + + + + org.apache.commons + commons-dbcp2 + 2.1.1 diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java index a49142d87..c2f5ec962 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AssertionStore.java @@ -27,8 +27,6 @@ import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.NamedQueries; @@ -52,7 +50,7 @@ public class AssertionStore implements Serializable{ private static final long serialVersionUID = 1L; @Id - @GeneratedValue(strategy = GenerationType.AUTO) + //@GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", unique=true, nullable=false) private long id; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java index a8cc1928e..6333451b9 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/AuthenticatedSessionStore.java @@ -31,8 +31,6 @@ import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Lob; import javax.persistence.NamedQueries; @@ -67,7 +65,7 @@ public class AuthenticatedSessionStore implements Serializable{ private static final long serialVersionUID = 1L; @Id - @GeneratedValue(strategy = GenerationType.AUTO) + //@GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", unique=true, nullable=false) private long id; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/ExceptionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/ExceptionStore.java deleted file mode 100644 index 0d56896ff..000000000 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/ExceptionStore.java +++ /dev/null @@ -1,125 +0,0 @@ -/******************************************************************************* - * Copyright 2014 Federal Chancellery Austria - * MOA-ID has been developed in a cooperation between BRZ, the Federal - * Chancellery Austria - ICT staff unit, and Graz University of Technology. - * - * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by - * the European Commission - subsequent versions of the EUPL (the "Licence"); - * You may not use this work except in compliance with the Licence. - * You may obtain a copy of the Licence at: - * http://www.osor.eu/eupl/ - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the Licence is distributed on an "AS IS" basis, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the Licence for the specific language governing permissions and - * limitations under the Licence. - * - * This product combines work with different licenses. See the "NOTICE" text - * file for details on the various modules and licenses. - * The "NOTICE" text file is part of the distribution. Any derivative works - * that you distribute must include a readable copy of the "NOTICE" text file. - *******************************************************************************/ -package at.gv.egovernment.moa.id.commons.db.dao.session; - -import java.io.Serializable; -import java.util.Date; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Lob; -import javax.persistence.NamedQueries; -import javax.persistence.NamedQuery; -import javax.persistence.Table; - -import org.hibernate.annotations.DynamicUpdate; - - - -@Entity -@DynamicUpdate(value=true) -@Table(name = "exceptionstore") -@NamedQueries({ - @NamedQuery(name="getExceptionWithID", query = "select exceptionstore from ExceptionStore exceptionstore where exceptionstore.exid = :id"), - @NamedQuery(name="getExceptionWithTimeOut", query = "select exceptionstore from ExceptionStore exceptionstore where exceptionstore.timestamp < :timeout") -}) - -public class ExceptionStore implements Serializable{ - - private static final long serialVersionUID = 1L; - - @Id - @GeneratedValue(strategy = GenerationType.AUTO) - @Column(name = "id", unique=true, nullable=false) - private long id; - - @Column(name = "exid", unique=true, nullable=false) - private String exid; - - @Column(name = "exception", nullable=false) - @Lob private byte [] exception; - - @Column(name = "timestamp", nullable=false) - private Date timestamp; - - /** - * @return the id - */ - public long getId() { - return id; - } - - /** - * @param id the id to set - */ - public void setId(long id) { - this.id = id; - } - - /** - * @return the exid - */ - public String getExid() { - return exid; - } - - /** - * @param exid the exid to set - */ - public void setExid(String exid) { - this.exid = exid; - } - - /** - * @return the exception - */ - public byte[] getException() { - return exception; - } - - /** - * @param exception the exception to set - */ - public void setException(byte[] exception) { - this.exception = exception; - } - - /** - * @return the timestamp - */ - public Date getTimestamp() { - return timestamp; - } - - /** - * @param timestamp the timestamp to set - */ - public void setTimestamp(Date timestamp) { - this.timestamp = timestamp; - } - - -} diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/InterfederationSessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/InterfederationSessionStore.java index 54216edc4..c62e8be32 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/InterfederationSessionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/InterfederationSessionStore.java @@ -28,8 +28,6 @@ import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @@ -46,7 +44,7 @@ public class InterfederationSessionStore implements Serializable{ private static final long serialVersionUID = 1L; @Id - @GeneratedValue(strategy = GenerationType.AUTO) + //@GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", unique=true, nullable=false) private long id; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java index 44ae43115..a11d94af4 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OASessionStore.java @@ -28,8 +28,6 @@ import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @@ -46,7 +44,7 @@ public class OASessionStore implements Serializable{ private static final long serialVersionUID = 1L; @Id - @GeneratedValue(strategy = GenerationType.AUTO) + //@GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "idOASession", unique=true, nullable=false) private long idOASession; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java index a85bdf2ca..195406a37 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/session/OldSSOSessionIDStore.java @@ -27,8 +27,6 @@ import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @@ -51,7 +49,7 @@ public class OldSSOSessionIDStore implements Serializable{ private static final long serialVersionUID = 1L; @Id - @GeneratedValue(strategy = GenerationType.AUTO) + //@GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "idOldSSOSession", unique=true, nullable=false) private long idOldSSOSession; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java index 97f26812f..6040d9870 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/dao/statistic/StatisticLog.java @@ -27,8 +27,6 @@ import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.NamedQueries; import javax.persistence.NamedQuery; @@ -50,7 +48,7 @@ public class StatisticLog implements Serializable{ private static final long serialVersionUID = 1L; @Id - @GeneratedValue(strategy = GenerationType.AUTO) + //@GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "id", unique=true, nullable=false) private long id; diff --git a/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml b/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml index c758e230e..fd16e8f96 100644 --- a/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml +++ b/id/server/moa-id-commons/src/main/resources/moaid.migration.beans.xml @@ -15,7 +15,7 @@ - + @@ -24,10 +24,10 @@ - + - + -- cgit v1.2.3 From 836a7cf93aca1a84f2827f78e849e012a1a368a3 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 22 Mar 2016 07:31:17 +0100 Subject: add revisions log entries --- .../java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java | 3 ++- .../moa/id/protocols/AbstractAuthProtocolModulController.java | 4 ++++ .../egovernment/moa/id/protocols/ProtocolFinalizationController.java | 5 ++++- .../protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java | 2 +- .../process/spring/test/SpringExpressionAwareProcessEngineTest.java | 2 -- .../at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java | 2 -- 6 files changed, 11 insertions(+), 7 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java index 5aceb8eec..e5c517da7 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java @@ -470,7 +470,8 @@ public class AuthenticationManager extends MOAIDAuthConstants { //terminate MOASession try { authenticatedSessionStore.destroySession(session.getSessionID()); - ssoManager.deleteSSOSessionID(httpReq, httpResp); + ssoManager.deleteSSOSessionID(httpReq, httpResp); + revisionsLogger.logEvent(MOAIDEventConstants.SESSION_DESTROYED, pvpReq.getUniqueSessionIdentifier()); Logger.debug("Active SSO Session on IDP is remove."); } catch (MOADatabaseException e) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java index 4e44f4043..79afba412 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/AbstractAuthProtocolModulController.java @@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; +import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.builder.AuthenticationDataBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; @@ -90,6 +91,9 @@ public abstract class AbstractAuthProtocolModulController extends AbstractContro //authenticated MOASession already exists --> protocol-specific postProcessing can start directly finalizeAuthenticationProcess(req, resp, pendingReq, moaSession); + //transaction is finished, log transaction finished event + revisionsLogger.logEvent(MOAIDEventConstants.TRANSACTION_DESTROYED, pendingReq.getUniqueTransactionIdentifier()); + } } else { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java index 302c60c5e..991c6a881 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java @@ -166,8 +166,11 @@ public class ProtocolFinalizationController extends AbstractAuthProtocolModulCon } //remove pending-request - if (pendingReq != null) + if (pendingReq != null) { requestStorage.removePendingRequest(pendingReq.getRequestID()); + revisionsLogger.logEvent(MOAIDEventConstants.TRANSACTION_DESTROYED, pendingReq.getUniqueTransactionIdentifier()); + + } } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java index 80d330172..b967ad42c 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/MandateTypeOIDAttributeBuilder.java @@ -53,7 +53,7 @@ public class MandateTypeOIDAttributeBuilder implements IPVPAttributeBuilder { } public ATT buildEmpty(IAttributeGenerator g) { - return g.buildEmptyAttribute(MANDATE_TYPE_FRIENDLY_NAME, MANDATE_TYPE_NAME); + return g.buildEmptyAttribute(MANDATE_TYPE_OID_FRIENDLY_NAME, MANDATE_TYPE_OID_NAME); } } diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java index 0732f1511..4574c831e 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java @@ -19,7 +19,6 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils; -import at.gv.egovernment.moa.id.commons.db.dao.session.InterfederationSessionStore; import at.gv.egovernment.moa.id.module.test.TestRequestImpl; import at.gv.egovernment.moa.id.process.ProcessDefinitionParserException; import at.gv.egovernment.moa.id.process.ProcessEngine; @@ -78,7 +77,6 @@ public class SpringExpressionAwareProcessEngineTest { Configuration config = new Configuration(); config.addProperties(props); config.addAnnotatedClass(ProcessInstanceStore.class); - config.addAnnotatedClass(InterfederationSessionStore.class); MOASessionDBUtils.initHibernate(config, props); } catch (Exception e) { e.printStackTrace(); diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java index 02fcaea4e..b659686c6 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java @@ -18,7 +18,6 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils; -import at.gv.egovernment.moa.id.commons.db.dao.session.InterfederationSessionStore; import at.gv.egovernment.moa.id.module.test.TestRequestImpl; import at.gv.egovernment.moa.id.process.ProcessDefinitionParser; import at.gv.egovernment.moa.id.process.ProcessDefinitionParserException; @@ -73,7 +72,6 @@ public class ProcessEngineTest { Configuration config = new Configuration(); config.addProperties(props); config.addAnnotatedClass(ProcessInstanceStore.class); - config.addAnnotatedClass(InterfederationSessionStore.class); MOASessionDBUtils.initHibernate(config, props); } catch (Exception e) { e.printStackTrace(); -- cgit v1.2.3 From 9b980ba714e6d59abcccb10df5036c0c318721c5 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 22 Mar 2016 08:49:17 +0100 Subject: fix nullpointer during IDP initiated Single LogOut --- .../gv/egovernment/moa/id/moduls/AuthenticationManager.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java index e5c517da7..1e064f24f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java @@ -469,9 +469,19 @@ public class AuthenticationManager extends MOAIDAuthConstants { //terminate MOASession try { + String uniqueSessionIdentifier = "notSet"; + AuthenticationSessionExtensions sessionExt = + authenticatedSessionStore.getAuthenticationSessionExtensions(session.getSessionID()); + if (sessionExt != null) + uniqueSessionIdentifier = sessionExt.getUniqueSessionId(); + authenticatedSessionStore.destroySession(session.getSessionID()); ssoManager.deleteSSOSessionID(httpReq, httpResp); - revisionsLogger.logEvent(MOAIDEventConstants.SESSION_DESTROYED, pvpReq.getUniqueSessionIdentifier()); + if (pvpReq != null) + revisionsLogger.logEvent(MOAIDEventConstants.SESSION_DESTROYED, pvpReq.getUniqueSessionIdentifier()); + else + revisionsLogger.logEvent(MOAIDEventConstants.SESSION_DESTROYED, uniqueSessionIdentifier); + Logger.debug("Active SSO Session on IDP is remove."); } catch (MOADatabaseException e) { -- cgit v1.2.3 From f5970e6aa4f621e870db8a9337fb00598cd85703 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 22 Mar 2016 08:49:49 +0100 Subject: update third party libs --- id/server/auth-edu/pom.xml | 5 +++++ id/server/idserverlib/pom.xml | 4 ++-- id/server/moa-id-commons/pom.xml | 10 ++-------- 3 files changed, 9 insertions(+), 10 deletions(-) (limited to 'id/server') diff --git a/id/server/auth-edu/pom.xml b/id/server/auth-edu/pom.xml index fc6b8fe23..090bb985b 100644 --- a/id/server/auth-edu/pom.xml +++ b/id/server/auth-edu/pom.xml @@ -206,6 +206,11 @@ ${moa-id-version} + + iaik.prod diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index b226f01b3..fcadf1f36 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -30,7 +30,7 @@ org.testng testng - 6.1.1 + 6.9.10 test @@ -312,7 +312,7 @@ com.h2database h2 - 1.4.178 + 1.4.191 test diff --git a/id/server/moa-id-commons/pom.xml b/id/server/moa-id-commons/pom.xml index df38c8384..ea9e06fd6 100644 --- a/id/server/moa-id-commons/pom.xml +++ b/id/server/moa-id-commons/pom.xml @@ -245,7 +245,7 @@ junit junit - 3.8.2 + ${junit.version} test @@ -266,16 +266,10 @@ com.h2database h2 - 1.4.178 + 1.4.191 test - - org.apache.commons commons-dbcp2 -- cgit v1.2.3 From 99e249a0f292bda3def5e5fbb4cc641c6dbbe26f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 22 Mar 2016 14:42:33 +0100 Subject: update SSO transfer module --- .../resources/templates/sso_transfer_template.html | 18 ++- .../modules/ssotransfer/SSOTransferConstants.java | 4 + .../ssotransfer/servlet/SSOTransferServlet.java | 61 ++-------- .../task/InitializeRestoreSSOSessionTask.java | 36 +++++- .../ssotransfer/task/RestoreSSOSessionTask.java | 125 +++++++++++++++------ .../auth/modules/ssotransfer/utils/GUIUtils.java | 42 ++++++- .../ssotransfer/utils/SSOContainerUtils.java | 75 +++++++++++-- 7 files changed, 258 insertions(+), 103 deletions(-) (limited to 'id/server') diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/sso_transfer_template.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/sso_transfer_template.html index e9c2fae76..c76e75d64 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/sso_transfer_template.html +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/sso_transfer_template.html @@ -3,17 +3,33 @@ - + + + #if($timeoutURL) + + #end Single Sign-On Session Transfer +#if($timeoutURL) + +#else +#end
diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/SSOTransferConstants.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/SSOTransferConstants.java index ce3a7856b..1ee715afa 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/SSOTransferConstants.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/SSOTransferConstants.java @@ -58,8 +58,12 @@ public class SSOTransferConstants { public static final String SSOCONTAINER_KEY_USERID = "userID"; public static final String SSOCONTAINER_KEY_SESSION = "session"; public static final String SSOCONTAINER_KEY_RESULTENDPOINT = "resultEndPoint"; + public static final String SSOCONTAINER_KEY_NONCE = "nonce"; public static final String FLAG_SSO_SESSION_RESTORED = "ssoRestoredFlag"; public static final long CERT_VALIDITY = 700; //2 years + + public static final String PENDINGREQ_DH = "dhparams"; + public static final String PENDINGREQ_NONCE = "nonce"; } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java index 2bb31f700..7cf7c914a 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java @@ -30,13 +30,9 @@ import java.io.PrintWriter; import java.math.BigInteger; import java.net.URL; import java.security.InvalidKeyException; -import java.security.KeyFactory; -import java.security.KeyPair; -import java.security.KeyPairGenerator; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.PrivateKey; -import java.security.PublicKey; import java.security.SecureRandom; import java.security.Security; import java.security.spec.InvalidKeySpecException; @@ -46,11 +42,9 @@ import java.util.Date; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; -import javax.crypto.KeyAgreement; import javax.crypto.NoSuchPaddingException; import javax.crypto.spec.DHParameterSpec; import javax.crypto.spec.DHPublicKeySpec; -import javax.crypto.spec.SecretKeySpec; import javax.security.cert.CertificateException; import javax.security.cert.X509Certificate; import javax.servlet.http.HttpServletRequest; @@ -467,7 +461,7 @@ public class SSOTransferServlet{ DHPublicKeySpec mobilePubKeySpec = new DHPublicKeySpec(mobilePubKey, container.getDhParams().getF().getP(), container.getDhParams().getF().getG()); - byte[] sharedSecret = getSecret(mobilePubKeySpec, container.getDhParams().getS()); + byte[] sharedSecret = ssoTransferUtils.getSecret(mobilePubKeySpec, container.getDhParams().getS()); //build ASE256 key MessageDigest digest = MessageDigest.getInstance("SHA-256"); @@ -479,7 +473,7 @@ public class SSOTransferServlet{ byte[] encryptedCSR = Base64Utils.decode(mobileCSRBase64, true); Logger.debug("EncCSR:" + Base64Utils.encode(encryptedCSR) + " | Key:" + Base64Utils.encode(hashedSecret)); - byte[] decryptedCSR = enOrDeCryptCSR(encryptedCSR, hashedSecret, Cipher.DECRYPT_MODE); + byte[] decryptedCSR = ssoTransferUtils.enOrDeCryptCSR(encryptedCSR, hashedSecret, Cipher.DECRYPT_MODE); Logger.debug("DecCSR:" + Base64Utils.encode(decryptedCSR)); Logger.debug("CSR decryption finished. --> Starting CSR validation and signing ..."); @@ -496,18 +490,16 @@ public class SSOTransferServlet{ Date now = new Date(); String personInformationToTransfer = ssoTransferUtils.generateSignedAndEncryptedSSOContainer( - container.getAuthURL(), moaSession, now); + container.getAuthURL(), moaSession, now, hashedSecret); Logger.debug("PersonData:" + personInformationToTransfer); //encrypt personal information Logger.debug("PersonData generation finished. --> Starting personData encryption ... "); - byte[] encPersonData = enOrDeCryptCSR(personInformationToTransfer.getBytes(), hashedSecret, Cipher.ENCRYPT_MODE); - String encAndEncodedPersonalData = Base64Utils.encode(encPersonData); Logger.debug("Encrypt personData finished. --> Send token to device."); resp.setContentType("text/html;charset=UTF-8"); PrintWriter out = new PrintWriter(resp.getOutputStream()); - out.print(encAndEncodedPersonalData); + out.print(personInformationToTransfer); out.flush(); return; @@ -539,7 +531,7 @@ public class SSOTransferServlet{ BigInteger generator = new BigInteger(Base64Utils.decode(SSOTransferConstants.DH_GENERATOR_BASE64, false)); DHParameterSpec dhSpec = new DHParameterSpec(prime, generator, 1024); - Pair dhKeyIDP = createSpecificKey(dhSpec.getP(), dhSpec.getG()); + Pair dhKeyIDP = ssoTransferUtils.createSpecificKey(dhSpec.getP(), dhSpec.getG()); container.setDhParams(dhKeyIDP); //store container @@ -575,17 +567,7 @@ public class SSOTransferServlet{ guiBuilder.build(resp, config, "SSO-Session Transfer-Module"); } - - public byte[] enOrDeCryptCSR(byte[] binBlob, byte[] binSecret, int mode) throws IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException { - byte[] decrypted = null; - SecretKeySpec skeySpec = new SecretKeySpec(binSecret, "AES"); - Cipher cipher = Cipher.getInstance("AES"); - cipher.init(mode, skeySpec); - decrypted = cipher.doFinal(binBlob); - - return decrypted; - } - + private X509Certificate signCSRWithMOAKey(byte[] inputCSR) throws IOException, OperatorCreationException, PKCSException, CredentialsNotAvailableException, CertificateException { PKCS10CertificationRequest csr = new PKCS10CertificationRequest(inputCSR); @@ -613,20 +595,7 @@ public class SSOTransferServlet{ } - - private static byte[] getSecret(DHPublicKeySpec kspectrans, PrivateKey privateKey) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException { - KeyAgreement aKeyAgree = KeyAgreement.getInstance("DiffieHellman"); - aKeyAgree.init(privateKey); - - KeyFactory kfactory = KeyFactory.getInstance("DiffieHellman"); - PublicKey pub = kfactory.generatePublic(kspectrans); - aKeyAgree.doPhase(pub, true); - - byte[] secretKey = aKeyAgree.generateSecret(); - return secretKey; - - } - + private JsonObject getJSONObjectFromPostMessage(HttpServletRequest req, boolean developmentMode) { //read POST request StringBuffer sb = new StringBuffer(); @@ -662,20 +631,4 @@ public class SSOTransferServlet{ } - private Pair createSpecificKey(BigInteger p, BigInteger g) throws Exception { - KeyPairGenerator kpg = KeyPairGenerator.getInstance("DiffieHellman"); - - DHParameterSpec param = new DHParameterSpec(p, g); - kpg.initialize(param); - KeyPair kp = kpg.generateKeyPair(); - - KeyFactory kfactory = KeyFactory.getInstance("DiffieHellman"); - - Pair pair = new Pair( - (DHPublicKeySpec) kfactory.getKeySpec(kp.getPublic(), DHPublicKeySpec.class), kp.getPrivate()); - return pair; - - } - - } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/InitializeRestoreSSOSessionTask.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/InitializeRestoreSSOSessionTask.java index e3c8efb50..be27de9a1 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/InitializeRestoreSSOSessionTask.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/InitializeRestoreSSOSessionTask.java @@ -22,6 +22,11 @@ */ package at.gv.egovernment.moa.id.auth.modules.ssotransfer.task; +import java.math.BigInteger; +import java.security.PrivateKey; + +import javax.crypto.spec.DHParameterSpec; +import javax.crypto.spec.DHPublicKeySpec; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -31,12 +36,18 @@ import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; +import at.gv.egovernment.moa.id.auth.modules.ssotransfer.SSOTransferConstants; +import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.Pair; +import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.SSOTransferContainer; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.GUIUtils; +import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.SSOContainerUtils; import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.id.process.api.ExecutionContext; import at.gv.egovernment.moa.id.util.HTTPUtils; +import at.gv.egovernment.moa.id.util.Random; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.Base64Utils; /** * @author tlenz @@ -46,6 +57,7 @@ import at.gv.egovernment.moa.logging.Logger; public class InitializeRestoreSSOSessionTask extends AbstractAuthServletTask { @Autowired IGUIFormBuilder guiBuilder; + @Autowired SSOContainerUtils ssoTransferUtils; /* (non-Javadoc) * @see at.gv.egovernment.moa.id.process.springweb.MoaIdTask#execute(at.gv.egovernment.moa.id.process.api.ExecutionContext, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse) @@ -64,10 +76,30 @@ public class InitializeRestoreSSOSessionTask extends AbstractAuthServletTask { response.sendError(500, "Requested URL is not allowed."); } - - GUIUtils.buildSSOTransferGUI(guiBuilder, response, authURL, pendingReq.getRequestID()); + + //use predefined parameters + BigInteger prime = new BigInteger(Base64Utils.decode(SSOTransferConstants.DH_PRIME_BASE64, false)); + BigInteger generator = new BigInteger(Base64Utils.decode(SSOTransferConstants.DH_GENERATOR_BASE64, false)); + DHParameterSpec dhSpec = new DHParameterSpec(prime, generator, 1024); + + Pair dhKeyIDP = ssoTransferUtils.createSpecificKey(dhSpec.getP(), dhSpec.getG()); + String nonce = Random.nextLongRandom(); + GUIUtils.buildSSOTransferGUI(guiBuilder, response, authURL, + pendingReq.getRequestID(), nonce, dhKeyIDP.getF()); + //store DH params and nonce to pending-request + SSOTransferContainer container = new SSOTransferContainer(); + container.setDhParams(dhKeyIDP); + pendingReq.setGenericDataToSession(SSOTransferConstants.PENDINGREQ_DH, container); + pendingReq.setGenericDataToSession(SSOTransferConstants.PENDINGREQ_NONCE, nonce); + + //store pending-request + requestStoreage.storePendingRequest(pendingReq); + + //set flag + executionContext.put("sessionRestoreFinished", false); + } catch (MOAIDException e) { throw new TaskExecutionException(pendingReq, e.getMessage(), e); diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java index 526f45be3..6d9b43e5b 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java @@ -24,12 +24,15 @@ package at.gv.egovernment.moa.id.auth.modules.ssotransfer.task; import java.io.BufferedReader; import java.io.IOException; +import java.math.BigInteger; +import java.security.MessageDigest; +import javax.crypto.Cipher; +import javax.crypto.spec.DHPublicKeySpec; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.BooleanUtils; -import org.apache.velocity.VelocityContext; import org.joda.time.DateTime; import org.opensaml.saml2.core.Response; import org.springframework.beans.factory.annotation.Autowired; @@ -42,16 +45,20 @@ import at.gv.egovernment.moa.id.auth.frontend.builder.IGUIFormBuilder; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.SSOTransferConstants; +import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.SSOTransferContainer; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.GUIUtils; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils.SSOContainerUtils; import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.id.process.api.ExecutionContext; -import at.gv.egovernment.moa.id.protocols.pvp2x.config.PVPConfiguration; +import at.gv.egovernment.moa.id.protocols.pvp2x.PVPConstants; +import at.gv.egovernment.moa.id.protocols.pvp2x.utils.AssertionAttributeExtractor; import at.gv.egovernment.moa.id.util.HTTPUtils; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.Base64Utils; import at.gv.egovernment.moa.util.MiscUtil; +import iaik.x509.X509Certificate; /** * @author tlenz @@ -100,6 +107,14 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { } + String nonce = pendingReq.getGenericData(SSOTransferConstants.PENDINGREQ_NONCE, String.class); + SSOTransferContainer container = pendingReq.getGenericData( + SSOTransferConstants.PENDINGREQ_DH, SSOTransferContainer.class); + if (container == null) { + throw new TaskExecutionException(pendingReq, "NO DH-Params in pending-request", null); + + } + if (MiscUtil.isNotEmpty(receivedPostMessage)) { Logger.debug("Receive POST-Message data. Start data-validation process ... "); @@ -109,40 +124,81 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { JsonObject reveivedSession = reveivedData.get("session").getAsJsonObject(); String validTo = reveivedSession.get("validTo").getAsString(); String entityID = reveivedSession.get("entityID").getAsString(); - String sessionBlob = reveivedSession.get("sessionBlob").getAsString(); + //String sessionBlob = reveivedSession.get("sessionBlob").getAsString(); + +// Logger.trace("Blob:" + sessionBlob + +// " | validTo:" + validTo + +// " | entityIS:" + entityID); + + + //TODO!!!! + String mobilePubKeyBase64 = reveivedSession.get( + SSOTransferConstants.SSOCONTAINER_KEY_DH_PUBKEY).getAsString(); + String encSessionBlobBase64 = new String(); - Logger.trace("Blob:" + sessionBlob + - " | validTo:" + validTo + - " | entityIS:" + entityID); + Logger.debug("Receive PubKey:" +mobilePubKeyBase64 + " | SessionBlob:" + encSessionBlobBase64); + + //finish DH key agreement + BigInteger mobilePubKey = new BigInteger(Base64Utils.decode(mobilePubKeyBase64, true)); + DHPublicKeySpec mobilePubKeySpec = new DHPublicKeySpec(mobilePubKey, + container.getDhParams().getF().getP(), + container.getDhParams().getF().getG()); + byte[] sharedSecret = ssoTransferUtils.getSecret(mobilePubKeySpec, container.getDhParams().getS()); + + //build ASE256 key + MessageDigest digest = MessageDigest.getInstance("SHA-256"); + digest.reset(); + byte[] hashedSecret = digest.digest(sharedSecret); + + //decrypt CSR + Logger.debug("Finished Diffie-Hellman key exchange. --> Starting SessionBlob decryption ..."); + byte[] encryptedSessionBlob = Base64Utils.decode(encSessionBlobBase64, true); + Logger.debug("EncSessionBlob:" + Base64Utils.encode(encryptedSessionBlob) + " | Key:" + Base64Utils.encode(hashedSecret)); + + byte[] sessionBlobArray = ssoTransferUtils.enOrDeCryptCSR(encryptedSessionBlob, hashedSecret, Cipher.DECRYPT_MODE); + String sessionBlob = new String(sessionBlobArray, "UTF-8"); + Logger.debug("DecSessionBlob:" + sessionBlob); - if (PVPConfiguration.getInstance().getIDPPublicPath().contains(entityID)) { - // stored SSO session data is from this IDP - start local session reconstruction - Response ssoInformation = ssoTransferUtils.validateReceivedSSOContainer(sessionBlob, entityID); - - //transfer SSO Assertion into MOA-Session - ssoTransferUtils.parseSSOContainerToMOASessionDataObject(pendingReq, moasession, ssoInformation); - - // store MOASession into database - try { - authenticatedSessionStorage.storeSession(moasession); - - } catch (MOADatabaseException e) { - Logger.error("Database Error! MOASession is not stored!"); - throw new MOAIDException("init.04", new Object[] { - moasession.getSessionID()}); - } - - executionContext.put(SSOTransferConstants.FLAG_SSO_SESSION_RESTORED, true); - executionContext.put("sessionRestoreFinished", false); - - } else { - Logger.info("Received SSO session-data is from IDP: " + entityID - + ". Start inderfederation process to restore SSO session ... "); - //change to inderfederated session reconstruction - - Logger.warn("Device Session Transfer with interfederation is not implemented, yet!!!!"); + //parse SAML2 assertion + Response ssoInformation = ssoTransferUtils.validateReceivedSSOContainer(sessionBlob); + + //validate signature + AssertionAttributeExtractor attributeExtractor = new AssertionAttributeExtractor(ssoInformation); + String holderOfKeyCertBase64 = attributeExtractor.getSingleAttributeValue(PVPConstants.PVP_HOLDEROFKEY_NAME); + byte[] holderOfKeyCertEncoded = Base64Utils.decode(holderOfKeyCertBase64, false); + X509Certificate holderOfKeyCert = new X509Certificate(holderOfKeyCertEncoded); + Logger.debug("Found HolderOfKey Certificate:" + holderOfKeyCert.getSubjectDN().toString()); + + + //TODO: implement Signature validation + + Logger.debug("MobileDevice is valid. --> Starting session reconstruction ..."); + + + //transfer SSO Assertion into MOA-Session + ssoTransferUtils.parseSSOContainerToMOASessionDataObject(pendingReq, moasession, attributeExtractor); + + // store MOASession into database + try { + authenticatedSessionStorage.storeSession(moasession); + + } catch (MOADatabaseException e) { + Logger.error("Database Error! MOASession is not stored!"); + throw new MOAIDException("init.04", new Object[] { + moasession.getSessionID()}); + } + + executionContext.put(SSOTransferConstants.FLAG_SSO_SESSION_RESTORED, true); + executionContext.put("sessionRestoreFinished", false); + + +// Logger.info("Received SSO session-data is from IDP: " + entityID +// + ". Start inderfederation process to restore SSO session ... "); +// //change to inderfederated session reconstruction +// +// Logger.warn("Device Session Transfer with interfederation is not implemented, yet!!!!"); - } + } catch (Exception e) { Logger.error("Parse reveived JSON data-object " + sb.toString() + " FAILED!", e); @@ -171,7 +227,6 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { Logger.debug("No restored SSO session found --> Wait a few minutes and check again."); executionContext.put("sessionRestoreFinished", false); - VelocityContext context; try { //create first step of SSO Transfer GUI authURL = HTTPUtils.extractAuthURLFromRequest(request); @@ -183,7 +238,7 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { } GUIUtils.buildSSOTransferGUI(guiBuilder, response, - authURL, pendingReq.getRequestID()); + authURL, pendingReq.getRequestID(), nonce, container.getDhParams().getF()); } catch (IOException | MOAIDException e) { throw new TaskExecutionException(pendingReq, e.getMessage(), e); diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java index b1446c4d2..13a278d1d 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/GUIUtils.java @@ -25,6 +25,7 @@ package at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils; import java.io.ByteArrayOutputStream; import java.io.IOException; +import javax.crypto.spec.DHPublicKeySpec; import javax.servlet.http.HttpServletResponse; import com.google.gson.JsonObject; @@ -37,6 +38,7 @@ import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Base64Utils; +import at.gv.egovernment.moa.util.MiscUtil; import net.glxn.qrgen.QRCode; import net.glxn.qrgen.image.ImageType; @@ -50,18 +52,50 @@ public class GUIUtils { public static void buildSSOTransferGUI( IGUIFormBuilder guiBuilder, HttpServletResponse httpResp, String authURL, String pendingReqID) throws ConfigurationException, IOException { + buildSSOTransferGUI(guiBuilder, httpResp, authURL, pendingReqID, null, null); + + } + + /** + * @param guiBuilder + * @param response + * @param authURL + * @param requestID + * @param nonce + * @param dhKeyIDP + * @throws ConfigurationException + * @throws IOException + */ + public static void buildSSOTransferGUI(IGUIFormBuilder guiBuilder, HttpServletResponse response, String authURL, + String requestID, String nonce, DHPublicKeySpec dhKeyIDP) throws ConfigurationException, IOException { try { String containerURL = authURL + SSOTransferConstants.SERVLET_SSOTRANSFER_FROM_SMARTPHONE - + "?" + MOAIDAuthConstants.PARAM_TARGET_PENDINGREQUESTID + "=" + pendingReqID; + + "?" + MOAIDAuthConstants.PARAM_TARGET_PENDINGREQUESTID + "=" + requestID; + + + JsonObject qrResult = new JsonObject(); qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_TYPE, SSOTransferConstants.SSOCONTAINER_VALUE_TYPE_TRANSER); qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_URL, containerURL); + + if (MiscUtil.isNotEmpty(nonce)) + qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_NONCE, nonce); + if (dhKeyIDP != null) { + qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_DH_PUBKEY, + Base64Utils.encode(dhKeyIDP.getY().toByteArray())); + qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_DH_PRIME, + Base64Utils.encode(dhKeyIDP.getP().toByteArray())); + qrResult.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_DH_GENERATOR, + Base64Utils.encode(dhKeyIDP.getG().toByteArray())); + + } + ByteArrayOutputStream qrStream = - QRCode.from(qrResult.toString()).to(ImageType.GIF).withSize(300, 300).stream(); + QRCode.from(qrResult.toString()).to(ImageType.GIF).withSize(350, 350).stream(); String base64EncodedImage = Base64Utils.encode(qrStream.toByteArray()); DefaultGUIFormBuilderConfiguration config = new DefaultGUIFormBuilderConfiguration( @@ -74,13 +108,13 @@ public class GUIUtils { config.putCustomParameter("timeoutURL", containerURL); config.putCustomParameter("timeout", REFESH_TIMEOUT); - guiBuilder.build(httpResp, config, "SSO-Transfer-Module"); + guiBuilder.build(response, config, "SSO-Transfer-Module"); } catch (GUIBuildException e) { Logger.warn("Can not build GUI:'BKU-Selection'. Msg:" + e.getMessage(), e); throw new ConfigurationException("builder.09", new Object[]{e.getMessage()}, e); } - + } } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java index 9683d5cb7..ab0aba6a7 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java @@ -25,14 +25,31 @@ package at.gv.egovernment.moa.id.auth.modules.ssotransfer.utils; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.StringWriter; +import java.math.BigInteger; +import java.security.InvalidKeyException; +import java.security.KeyFactory; +import java.security.KeyPair; +import java.security.KeyPairGenerator; import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.security.PublicKey; import java.security.cert.CertificateException; +import java.security.spec.InvalidKeySpecException; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.KeyAgreement; +import javax.crypto.NoSuchPaddingException; +import javax.crypto.spec.DHParameterSpec; +import javax.crypto.spec.DHPublicKeySpec; +import javax.crypto.spec.SecretKeySpec; import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -83,6 +100,7 @@ import com.google.gson.JsonObject; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.ParseException; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.SSOTransferConstants; +import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.Pair; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.SSOTransferAuthenticationData; import at.gv.egovernment.moa.id.auth.modules.ssotransfer.data.SSOTransferOnlineApplication; import at.gv.egovernment.moa.id.auth.parser.IdentityLinkAssertionParser; @@ -149,8 +167,8 @@ public class SSOContainerUtils { @Autowired SAMLVerificationEngineSP samlVerificationEngine; @Autowired AuthConfiguration authConfig; - public void parseSSOContainerToMOASessionDataObject(IRequest pendingReq, AuthenticationSession moasession, Response ssoInformation) throws AssertionAttributeExtractorExeption, ConfigurationException { - AssertionAttributeExtractor attributeExtractor = new AssertionAttributeExtractor(ssoInformation); + public void parseSSOContainerToMOASessionDataObject(IRequest pendingReq, AuthenticationSession moasession, AssertionAttributeExtractor attributeExtractor) throws AssertionAttributeExtractorExeption, ConfigurationException { +// AssertionAttributeExtractor attributeExtractor = new AssertionAttributeExtractor(ssoInformation); //TODO: maybe change to correct URL //set dummy BKU URLx @@ -251,7 +269,7 @@ public class SSOContainerUtils { } - public Response validateReceivedSSOContainer(String signedEncryptedContainer, String entityID) throws IOException, XMLParserException, UnmarshallingException, MOAIDException { + public Response validateReceivedSSOContainer(String signedEncryptedContainer) throws IOException, XMLParserException, UnmarshallingException, MOAIDException { byte[] base64decodedContainer = Base64Utils.decode(signedEncryptedContainer, false); final BasicParserPool ppMgr = new BasicParserPool(); @@ -298,7 +316,7 @@ public class SSOContainerUtils { //validate PVP 2.1 assertion samlVerificationEngine.validateAssertion(ssoContainer, false, credentials.getIDPAssertionEncryptionCredential(), - entityID, + ssoContainer.getIssuer().getValue(), "SSO-Session Transfer module" ); return ssoContainer; @@ -319,7 +337,7 @@ public class SSOContainerUtils { public String generateSignedAndEncryptedSSOContainer(String authURL, - AuthenticationSession authSession, Date date) { + AuthenticationSession authSession, Date date, byte[] hashedSecret) { try { String entityID = PVPConfiguration.getInstance().getIDPSSOMetadataService(authURL); AuthnContextClassRef authnContextClassRef = SAML2Utils @@ -363,25 +381,68 @@ public class SSOContainerUtils { String ssoDataBlob = buildSSOContainerObject(authURL, assertion, new DateTime(date.getTime())); + byte[] encPersonData = enOrDeCryptCSR(ssoDataBlob.getBytes(), hashedSecret, Cipher.ENCRYPT_MODE); + String encAndEncodedPersonalData = Base64Utils.encode(encPersonData); + + JsonObject container = new JsonObject(); container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_TYPE, SSOTransferConstants.SSOCONTAINER_VALUE_TYPE_SSO); container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_VALIDTO, subjectConfirmationData.getNotOnOrAfter().toString()); container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_ENTITYID, entityID); container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_USERID, authData.getGivenName() + " " + authData.getFamilyName()); - container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_SESSION, ssoDataBlob); + + container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_SESSION, encAndEncodedPersonalData); //TODO container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_RESULTENDPOINT, "https://demo.egiz.gv.at"); return container.toString(); - } catch (ConfigurationException | EncryptionException | CredentialsNotAvailableException | SecurityException | ParserConfigurationException | MarshallingException | SignatureException | TransformerFactoryConfigurationError | TransformerException | IOException e) { + } catch (ConfigurationException | EncryptionException | CredentialsNotAvailableException | SecurityException | ParserConfigurationException | MarshallingException | SignatureException | TransformerFactoryConfigurationError | TransformerException | IOException | InvalidKeyException | IllegalBlockSizeException | BadPaddingException | NoSuchAlgorithmException | NoSuchPaddingException e) { Logger.warn("SSO container generation FAILED.", e); } return null; } + public byte[] enOrDeCryptCSR(byte[] binBlob, byte[] binSecret, int mode) throws IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchPaddingException, InvalidKeyException { + byte[] decrypted = null; + SecretKeySpec skeySpec = new SecretKeySpec(binSecret, "AES"); + Cipher cipher = Cipher.getInstance("AES"); + cipher.init(mode, skeySpec); + decrypted = cipher.doFinal(binBlob); + + return decrypted; + } + + public Pair createSpecificKey(BigInteger p, BigInteger g) throws Exception { + KeyPairGenerator kpg = KeyPairGenerator.getInstance("DiffieHellman"); + + DHParameterSpec param = new DHParameterSpec(p, g); + kpg.initialize(param); + KeyPair kp = kpg.generateKeyPair(); + + KeyFactory kfactory = KeyFactory.getInstance("DiffieHellman"); + + Pair pair = new Pair( + (DHPublicKeySpec) kfactory.getKeySpec(kp.getPublic(), DHPublicKeySpec.class), kp.getPrivate()); + return pair; + + } + + public byte[] getSecret(DHPublicKeySpec kspectrans, PrivateKey privateKey) throws NoSuchAlgorithmException, InvalidKeySpecException, InvalidKeyException { + KeyAgreement aKeyAgree = KeyAgreement.getInstance("DiffieHellman"); + aKeyAgree.init(privateKey); + + KeyFactory kfactory = KeyFactory.getInstance("DiffieHellman"); + PublicKey pub = kfactory.generatePublic(kspectrans); + aKeyAgree.doPhase(pub, true); + + byte[] secretKey = aKeyAgree.generateSecret(); + return secretKey; + + } + private String buildSSOContainerObject(String authURL, Assertion assertion, DateTime date) throws ConfigurationException, EncryptionException, CredentialsNotAvailableException, SecurityException, ParserConfigurationException, MarshallingException, SignatureException, TransformerFactoryConfigurationError, TransformerException, IOException { Response authResponse = SAML2Utils.createSAMLObject(Response.class); -- cgit v1.2.3 From b29150526d95af2f1c30f4543c88d35c2965dfe6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 22 Mar 2016 14:43:22 +0100 Subject: add revisionslog info's to eIDAS and SLO methods --- id/server/doc/handbook/additional/additional.html | 45 +++++++++++++++++ .../id/advancedlogging/MOAIDEventConstants.java | 15 ++++-- .../moa/id/advancedlogging/MOAReversionLogger.java | 14 ++++-- .../moa/id/data/ISLOInformationContainer.java | 7 ++- .../moa/id/data/SLOInformationContainer.java | 37 +++++++++++++- .../moa/id/moduls/AuthenticationManager.java | 56 +++++++++++++++------- .../moa/id/protocols/pvp2x/SingleLogOutAction.java | 15 ++++-- .../eidas/tasks/GenerateAuthnRequestTask.java | 11 +++++ .../eidas/tasks/ReceiveAuthnResponseTask.java | 9 ++++ 9 files changed, 178 insertions(+), 31 deletions(-) (limited to 'id/server') diff --git a/id/server/doc/handbook/additional/additional.html b/id/server/doc/handbook/additional/additional.html index cbf4a50c9..58990567c 100644 --- a/id/server/doc/handbook/additional/additional.html +++ b/id/server/doc/handbook/additional/additional.html @@ -485,6 +485,26 @@
+ + + + + + + + + + + + + + + + + + + + @@ -545,6 +565,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + +
9104 Fehler bei der Auswahl oder Initialisierung des gewünschten Anmeldeprozesses
9105Fehler bei der Fortführung des Anmeldeprozesses
9199 Allgemeiner interner Fehler

 

Vollmacht vom Online-Vollmachten Service erhalten

4400 IDP initiated Single LogOut Request erhalten
4401 Single LogOut Process gestartet
4402 Single LogOut Process erfolgreich beendet
4403 Unvollständiger Single LogOut Prozess

5000

bPK

IP Adresse IP Adresse mit der das externe Vollmachten Service die Vollmacht ausgeliefert hat
6100EntityIDeIDAS Node ausgewählt
6101RequestIDeIDAS Node kontaktiert
6102ResponseIDGültige Response von eIDAS Node erhalten
6103 Ungültige Response oder Fehlercode von eIDAS Node erhalten
6104 Personenbindung für Authentifizierung über eIDAS Node erstellt

 

Einzelne Events werden um einen Transaktionsparameter ergänzt, welcher in der Spalte Wert beschrieben ist.
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 054543c3e..9d26cc05f 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 @@ -47,7 +47,12 @@ public interface MOAIDEventConstants extends EventConstants { public static final int AUTHPROTOCOL_OPENIDCONNECT_TOKENREQUEST = 3201; public static final int AUTHPROTOCOL_SAML1_AUTHNREQUEST = 3300; - + + public static final int AUTHPROCESS_IDP_SLO_REQUESTED = 4400; + public static final int AUTHPROCESS_SLO_STARTED = 4401; + public static final int AUTHPROCESS_SLO_ALL_VALID = 4402; + public static final int AUTHPROCESS_SLO_NOT_ALL_VALID = 4403; + //authentication process information public static final int AUTHPROCESS_START = 4000; public static final int AUTHPROCESS_FINISHED = 4001; @@ -78,9 +83,11 @@ public interface MOAIDEventConstants extends EventConstants { public static final int AUTHPROCESS_MANDATE_REDIRECT = 4301; public static final int AUTHPROCESS_MANDATE_RECEIVED = 4302; - public static final int AUTHPROCESS_PEPS_REQUESTED = 4400; - public static final int AUTHPROCESS_PEPS_RECEIVED = 4401; - public static final int AUTHPROCESS_PEPS_IDL_RECEIVED = 4402; + public static final int AUTHPROCESS_PEPS_SELECTED = 6100; + public static final int AUTHPROCESS_PEPS_REQUESTED = 6101; + public static final int AUTHPROCESS_PEPS_RECEIVED = 6102; + public static final int AUTHPROCESS_PEPS_RECEIVED_ERROR = 6103; + public static final int AUTHPROCESS_PEPS_IDL_RECEIVED = 6104; //person information public static final int PERSONAL_INFORMATION_PROF_REPRESENTATIVE_BPK = 5000; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java index 6fa07a098..4a5cbd55f 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/advancedlogging/MOAReversionLogger.java @@ -75,18 +75,26 @@ public class MOAReversionLogger { MOAIDEventConstants.AUTHPROCESS_IDL_VALIDATED, MOAIDEventConstants.AUTHPROCESS_CERTIFICATE_VALIDATED, MOAIDEventConstants.AUTHPROCESS_AUTHBLOCK_VALIDATED, - + + MOAIDEventConstants.AUTHPROCESS_IDP_SLO_REQUESTED, + MOAIDEventConstants.AUTHPROCESS_SLO_STARTED, + MOAIDEventConstants.AUTHPROCESS_SLO_ALL_VALID, + MOAIDEventConstants.AUTHPROCESS_SLO_NOT_ALL_VALID, + MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_SERVICE_REQUESTED, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_ERROR_RECEIVED, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_RECEIVED, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_RECEIVED_IP, - MOAIDEventConstants.AUTHPROCESS_FOREIGN_FOUND, - MOAIDEventConstants.AUTHPROCESS_FOREIGN_SZRGW_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_PEPS_SELECTED, MOAIDEventConstants.AUTHPROCESS_PEPS_REQUESTED, MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR, MOAIDEventConstants.AUTHPROCESS_PEPS_IDL_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_FOREIGN_FOUND, + MOAIDEventConstants.AUTHPROCESS_FOREIGN_SZRGW_RECEIVED, + MOAIDEventConstants.AUTHPROCESS_MANDATE_SERVICE_REQUESTED, MOAIDEventConstants.AUTHPROCESS_MANDATE_REDIRECT, MOAIDEventConstants.AUTHPROCESS_MANDATE_RECEIVED, diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ISLOInformationContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ISLOInformationContainer.java index 18ffc5c6d..38f6948d3 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ISLOInformationContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ISLOInformationContainer.java @@ -24,8 +24,8 @@ package at.gv.egovernment.moa.id.data; import java.util.Iterator; import java.util.List; -import java.util.Set; import java.util.Map.Entry; +import java.util.Set; import at.gv.egovernment.moa.id.protocols.pvp2x.PVPTargetConfiguration; @@ -63,5 +63,8 @@ public interface ISLOInformationContainer { List getSloFailedOAs(); void putFailedOA(String oaID); - + + public String getTransactionID(); + + public String getSessionID(); } \ No newline at end of file diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/SLOInformationContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/SLOInformationContainer.java index fd1749129..20588ad0b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/SLOInformationContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/SLOInformationContainer.java @@ -44,6 +44,8 @@ public class SLOInformationContainer implements Serializable, ISLOInformationCon private LinkedHashMap activeFrontChannalOAs; private LinkedHashMap activeBackChannelOAs; private List sloFailedOAs = null; + private String transactionID = null; + private String sessionID = null; /** * @@ -146,6 +148,7 @@ public class SLOInformationContainer implements Serializable, ISLOInformationCon @Override public void setSloRequest(PVPTargetConfiguration sloRequest) { this.sloRequest = sloRequest; + } /* (non-Javadoc) @@ -164,5 +167,37 @@ public class SLOInformationContainer implements Serializable, ISLOInformationCon if (sloFailedOAs == null) sloFailedOAs = new ArrayList(); sloFailedOAs.add(oaID); - } + } + + + /** + * @return the transactionID + */ + public String getTransactionID() { + return transactionID; + } + + + /** + * @param transactionID the transactionID to set + */ + public void setTransactionID(String transactionID) { + this.transactionID = transactionID; + } + + public String getSessionID() { + return this.sessionID; + + } + + + /** + * @param sessionID the sessionID to set + */ + public void setSessionID(String sessionID) { + this.sessionID = sessionID; + } + + + } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java index 1e064f24f..a1f2c6558 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/moduls/AuthenticationManager.java @@ -443,6 +443,8 @@ public class AuthenticationManager extends MOAIDAuthConstants { HttpServletResponse httpResp, AuthenticationSession session, PVPTargetConfiguration pvpReq, String authURL) throws MOAIDException { String pvpSLOIssuer = null; String inboundRelayState = null; + String uniqueSessionIdentifier = "notSet"; + String uniqueTransactionIdentifier = "notSet"; Logger.debug("Start technical Single LogOut process ... "); @@ -451,14 +453,33 @@ public class AuthenticationManager extends MOAIDAuthConstants { LogoutRequest logOutReq = (LogoutRequest) samlReq.getSamlRequest(); pvpSLOIssuer = logOutReq.getIssuer().getValue(); inboundRelayState = samlReq.getRelayState(); + uniqueSessionIdentifier = pvpReq.getUniqueSessionIdentifier(); + uniqueTransactionIdentifier = pvpReq.getUniqueTransactionIdentifier(); + } else { + AuthenticationSessionExtensions sessionExt; + try { + sessionExt = authenticatedSessionStore.getAuthenticationSessionExtensions(session.getSessionID()); + if (sessionExt != null) + uniqueSessionIdentifier = sessionExt.getUniqueSessionId(); + + } catch (MOADatabaseException e) { + Logger.error("Error during database communication. Can not evaluate 'uniqueSessionIdentifier'", e); + + } + uniqueTransactionIdentifier = Random.nextLongRandom(); + revisionsLogger.logEvent(uniqueSessionIdentifier, uniqueTransactionIdentifier, MOAIDEventConstants.AUTHPROCESS_IDP_SLO_REQUESTED); + } //store active OAs to SLOContaine List dbOAs = authenticatedSessionStore.getAllActiveOAFromMOASession(session); List dbIDPs = authenticatedSessionStore.getAllActiveIDPsFromMOASession(session); - SLOInformationContainer sloContainer = new SLOInformationContainer(); - sloContainer.setSloRequest(pvpReq); + SLOInformationContainer sloContainer = new SLOInformationContainer(); + sloContainer.setTransactionID(uniqueTransactionIdentifier); + sloContainer.setSessionID(uniqueSessionIdentifier); + sloContainer.setSloRequest(pvpReq); + sloBuilder.parseActiveIDPs(sloContainer, dbIDPs, pvpSLOIssuer); sloBuilder.parseActiveOAs(sloContainer, dbOAs, pvpSLOIssuer); @@ -468,19 +489,10 @@ public class AuthenticationManager extends MOAIDAuthConstants { + " NO_SLO_Support:" + sloContainer.getSloFailedOAs().size()); //terminate MOASession - try { - String uniqueSessionIdentifier = "notSet"; - AuthenticationSessionExtensions sessionExt = - authenticatedSessionStore.getAuthenticationSessionExtensions(session.getSessionID()); - if (sessionExt != null) - uniqueSessionIdentifier = sessionExt.getUniqueSessionId(); - + try { authenticatedSessionStore.destroySession(session.getSessionID()); ssoManager.deleteSSOSessionID(httpReq, httpResp); - if (pvpReq != null) - revisionsLogger.logEvent(MOAIDEventConstants.SESSION_DESTROYED, pvpReq.getUniqueSessionIdentifier()); - else - revisionsLogger.logEvent(MOAIDEventConstants.SESSION_DESTROYED, uniqueSessionIdentifier); + revisionsLogger.logEvent(MOAIDEventConstants.SESSION_DESTROYED, uniqueSessionIdentifier); Logger.debug("Active SSO Session on IDP is remove."); @@ -490,8 +502,9 @@ public class AuthenticationManager extends MOAIDAuthConstants { } - Logger.trace("Starting Service-Provider logout process ... "); - //start service provider back channel logout process + Logger.trace("Starting Service-Provider logout process ... "); + revisionsLogger.logEvent(uniqueSessionIdentifier, uniqueTransactionIdentifier, MOAIDEventConstants.AUTHPROCESS_SLO_STARTED); + //start service provider back channel logout process Iterator nextOAInterator = sloContainer.getNextBackChannelOA(); while (nextOAInterator.hasNext()) { SLOInformationImpl sloDescr = sloContainer.getBackChannelOASessionDescripten(nextOAInterator.next()); @@ -592,13 +605,17 @@ public class AuthenticationManager extends MOAIDAuthConstants { null); if (sloContainer.getSloFailedOAs() == null || - sloContainer.getSloFailedOAs().size() == 0) + sloContainer.getSloFailedOAs().size() == 0) { + revisionsLogger.logEvent(uniqueSessionIdentifier, uniqueTransactionIdentifier, MOAIDEventConstants.AUTHPROCESS_SLO_ALL_VALID); config.putCustomParameter("successMsg", MOAIDMessageProvider.getInstance().getMessage("slo.00", null)); - else + + } else { + revisionsLogger.logEvent(uniqueSessionIdentifier, uniqueTransactionIdentifier, MOAIDEventConstants.AUTHPROCESS_SLO_NOT_ALL_VALID); config.putCustomParameter("errorMsg", MOAIDMessageProvider.getInstance().getMessage("slo.01", null)); - + + } guiBuilder.build(httpResp, config, "Single-LogOut GUI"); } @@ -615,6 +632,8 @@ public class AuthenticationManager extends MOAIDAuthConstants { SingleLogoutService sloService = sloBuilder.getResponseSLODescriptor(pvpReq); LogoutResponse message = sloBuilder.buildSLOErrorResponse(sloService, pvpReq, StatusCode.RESPONDER_URI); sloBuilder.sendFrontChannelSLOMessage(sloService, message, httpReq, httpResp, inboundRelayState); + + revisionsLogger.logEvent(uniqueSessionIdentifier, uniqueTransactionIdentifier, MOAIDEventConstants.AUTHPROCESS_SLO_NOT_ALL_VALID); }else { //print SLO information directly @@ -623,6 +642,7 @@ public class AuthenticationManager extends MOAIDAuthConstants { DefaultGUIFormBuilderConfiguration.VIEW_SINGLELOGOUT, null); + revisionsLogger.logEvent(uniqueSessionIdentifier, uniqueTransactionIdentifier, MOAIDEventConstants.AUTHPROCESS_SLO_NOT_ALL_VALID); config.putCustomParameter("errorMsg", MOAIDMessageProvider.getInstance().getMessage("slo.01", null)); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/SingleLogOutAction.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/SingleLogOutAction.java index dfe9ecb49..af6c79140 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/SingleLogOutAction.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/SingleLogOutAction.java @@ -41,6 +41,8 @@ import org.opensaml.saml2.metadata.SingleLogoutService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; +import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.servlet.RedirectServlet; @@ -80,6 +82,7 @@ public class SingleLogOutAction implements IAction { @Autowired private IAuthenticationSessionStoreage authenticationSessionStorage; @Autowired private ITransactionStorage transactionStorage; @Autowired private SingleLogOutBuilder sloBuilder; + @Autowired private MOAReversionLogger revisionsLogger; /* (non-Javadoc) @@ -240,11 +243,17 @@ public class SingleLogOutAction implements IAction { String statusCode = null; if (sloContainer.getSloFailedOAs() == null || - sloContainer.getSloFailedOAs().size() == 0) + sloContainer.getSloFailedOAs().size() == 0) { statusCode = MOAIDAuthConstants.SLOSTATUS_SUCCESS; - else + revisionsLogger.logEvent(sloContainer.getSessionID(), sloContainer.getTransactionID(), + MOAIDEventConstants.AUTHPROCESS_SLO_ALL_VALID); + + } else { + revisionsLogger.logEvent(sloContainer.getSessionID(), sloContainer.getTransactionID(), + MOAIDEventConstants.AUTHPROCESS_SLO_NOT_ALL_VALID); statusCode = MOAIDAuthConstants.SLOSTATUS_ERROR; - + + } transactionStorage.put(artifact, statusCode); redirectURL = addURLParameter(redirectURL, MOAIDAuthConstants.PARAM_SLOSTATUS, artifact); diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java index 6de446e01..7f3c4bddc 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java @@ -36,6 +36,7 @@ import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.springframework.stereotype.Component; +import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.frontend.velocity.VelocityProvider; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; @@ -97,6 +98,12 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { String destination = cpeps.getPepsURL().toString().split(";")[1].trim(); // FIXME convenience for metadata url and assertion destination String metadataUrl = cpeps.getPepsURL().toString().split(";")[0].trim(); + + //TODO: switch to entityID + revisionsLogger.logEvent(oaConfig, pendingReq, + MOAIDEventConstants.AUTHPROCESS_PEPS_SELECTED, + metadataUrl); + // assemble requested attributes Collection attributesFromConfig = oaConfig.getRequestedSTORKAttributes(); @@ -169,6 +176,10 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { response.setContentType("text/html;charset=UTF-8"); response.getOutputStream().write(writer.getBuffer().toString().getBytes("UTF-8")); + revisionsLogger.logEvent(oaConfig, pendingReq, + MOAIDEventConstants.AUTHPROCESS_PEPS_REQUESTED, + authnRequest.getSamlId()); + } catch (IOException e) { Logger.error("Velocity IO error: " + e.getMessage()); throw new MOAIDException("stork.15", null); // TODO diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java index 082fdbbbf..5d1b7fb6f 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java @@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.stereotype.Component; +import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionStorageConstants; import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; @@ -79,12 +80,20 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { //store MOA-session to database authenticatedSessionStorage.storeSession(moasession); + revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, + MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED, + samlResp.getSamlId()); + }catch (EIDASSAMLEngineException e) { Logger.error("eIDAS AuthnRequest generation FAILED.", e); + revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, + MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR); throw new TaskExecutionException(pendingReq, "eIDAS Response processing FAILED.", new EIDASEngineException("Could not validate eIDAS response", e)); } catch (EIDASEngineException | MOAIDException | MOADatabaseException e) { + revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, + MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR); throw new TaskExecutionException(pendingReq, "eIDAS Response processing FAILED.", e); } -- cgit v1.2.3 From 1bef953a8baed149db2bf234687c9d0eebb85524 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 22 Mar 2016 14:44:04 +0100 Subject: move ProcessInstanzDAO into transactionstorage --- .../moa/id/process/dao/ProcessInstanceStore.java | 4 +- .../process/dao/ProcessInstanceStoreDAOImpl.java | 67 ++++++++++++---------- 2 files changed, 40 insertions(+), 31 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java index d690c37bf..3620f2950 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStore.java @@ -17,7 +17,9 @@ import at.gv.egovernment.moa.id.process.ProcessInstanceState; @Entity @Table(name = "processinstance") -public class ProcessInstanceStore { +public class ProcessInstanceStore implements Serializable{ + + private static final long serialVersionUID = -6147519767313903808L; /** * A process instance identifier qualifies as natural primary key by satisfying these requirements diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAOImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAOImpl.java index 577e971db..a9a9322ad 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAOImpl.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/process/dao/ProcessInstanceStoreDAOImpl.java @@ -1,15 +1,12 @@ package at.gv.egovernment.moa.id.process.dao; -import org.hibernate.Criteria; -import org.hibernate.Session; -import org.hibernate.Transaction; -import org.hibernate.criterion.Restrictions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; +import at.gv.egovernment.moa.id.storage.ITransactionStorage; /** * Database backed implementation of the {@link ProcessInstanceStoreDAO} @@ -20,10 +17,14 @@ public class ProcessInstanceStoreDAOImpl implements ProcessInstanceStoreDAO { private Logger log = LoggerFactory.getLogger(getClass()); + @Autowired ITransactionStorage transactionStorage; + @Override public void saveOrUpdate(ProcessInstanceStore pIStore) throws MOADatabaseException { try { - MOASessionDBUtils.saveOrUpdate(pIStore); + transactionStorage.put(pIStore.getProcessInstanceId(), pIStore); + +// MOASessionDBUtils.saveOrUpdate(pIStore); log.debug("Store process instance with='{}' in the database.", pIStore.getProcessInstanceId()); } catch (MOADatabaseException e) { log.warn("ProcessInstanceStore could not be persisted to the database."); @@ -35,31 +36,35 @@ public class ProcessInstanceStoreDAOImpl implements ProcessInstanceStoreDAO { public ProcessInstanceStore load(String processInstanceId) throws MOADatabaseException { log.debug("Retrieve the ProcessInstanceStore for id='{}' from the database.", processInstanceId); - Session session = MOASessionDBUtils.getCurrentSession(); - + + +// Session session = MOASessionDBUtils.getCurrentSession(); +// ProcessInstanceStore result = null; - Transaction tx = null; - synchronized (session) { +// Transaction tx = null; +// synchronized (session) { try { - tx = session.beginTransaction(); - // select all where processInstanceId equals processInstanceId - Criteria criteria = session.createCriteria(ProcessInstanceStore.class); - criteria.add(Restrictions.eq("processInstanceId", processInstanceId)); - result = (ProcessInstanceStore) criteria.uniqueResult(); - tx.commit(); - + result = transactionStorage.get(processInstanceId, ProcessInstanceStore.class); + +// tx = session.beginTransaction(); +// // select all where processInstanceId equals processInstanceId +// Criteria criteria = session.createCriteria(ProcessInstanceStore.class); +// criteria.add(Restrictions.eq("processInstanceId", processInstanceId)); +// result = (ProcessInstanceStore) criteria.uniqueResult(); +// tx.commit(); +// } catch (Exception e) { log.error("There are multiple persisted processes with the same process instance id '{}'", - processInstanceId); - if (tx != null) { - tx.rollback(); - } + processInstanceId); +// if (tx != null) { +// tx.rollback(); +// } throw e; } finally { //MOASessionDBUtils.closeSession(); } - } +// } if (result != null) { log.debug("Found process instance store for instance '{}'.", processInstanceId); } else { @@ -71,14 +76,16 @@ public class ProcessInstanceStoreDAOImpl implements ProcessInstanceStoreDAO { @Override public void remove(String processInstanceId) throws MOADatabaseException { - log.debug("Delete the ProcessInstanceStore for id='{}' from the database.", processInstanceId); - ProcessInstanceStore toBeDeleted = load(processInstanceId); - if (toBeDeleted != null) { - if (!MOASessionDBUtils.delete(toBeDeleted)) { - log.warn("Could not delete the ProcessInstanceStore with process instance id '{}'", processInstanceId); - throw new MOADatabaseException("Could not delete the ProcessInstanceStore with process instance id '" - + processInstanceId + "'."); - } + log.debug("Delete the ProcessInstanceStore for id='{}' from the database.", processInstanceId); + //ProcessInstanceStore toBeDeleted = load(processInstanceId); + + if (transactionStorage.containsKey(processInstanceId)) { + transactionStorage.remove(processInstanceId); +// if (!MOASessionDBUtils.delete(toBeDeleted)) { +// log.warn("Could not delete the ProcessInstanceStore with process instance id '{}'", processInstanceId); +// throw new MOADatabaseException("Could not delete the ProcessInstanceStore with process instance id '" +// + processInstanceId + "'."); +// } } else log.trace("ProcessInstanceStore for id='{}' was not found and could therefore not be deleted.", processInstanceId); } -- cgit v1.2.3 From fcf068ba38d2bd44976b49ee0ecef44e7182b8c5 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 22 Mar 2016 14:46:42 +0100 Subject: remove ProcessInstanceStore from Hibernate DB config --- .../at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java index 395aeaadb..5c2f86732 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/ConfigurationProviderImpl.java @@ -62,7 +62,6 @@ import at.gv.egovernment.moa.id.commons.db.dao.session.OASessionStore; import at.gv.egovernment.moa.id.commons.db.dao.session.OldSSOSessionIDStore; import at.gv.egovernment.moa.id.commons.db.dao.statistic.StatisticLog; import at.gv.egovernment.moa.id.data.IssuerAndSerial; -import at.gv.egovernment.moa.id.process.dao.ProcessInstanceStore; import at.gv.egovernment.moa.id.protocols.pvp2x.config.MOADefaultBootstrap; import at.gv.egovernment.moa.logging.Logger; import at.gv.util.config.EgovUtilPropertiesConfiguration; @@ -221,7 +220,7 @@ public abstract class ConfigurationProviderImpl implements ConfigurationProvider config.addAnnotatedClass(OASessionStore.class); config.addAnnotatedClass(OldSSOSessionIDStore.class); config.addAnnotatedClass(InterfederationSessionStore.class); - config.addAnnotatedClass(ProcessInstanceStore.class); + //config.addAnnotatedClass(ProcessInstanceStore.class); config.addProperties(moaSessionProp); MOASessionDBUtils.initHibernate(config, moaSessionProp); -- cgit v1.2.3 From db45dc6d84c43aae59764633e91dc7f48a46de5a Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 22 Mar 2016 15:09:21 +0100 Subject: fix junit tests --- .../process/spring/test/SpringExpressionAwareProcessEngineTest.java | 5 +++-- .../at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java | 5 +++-- .../spring/test/SpringExpressionAwareProcessEngineTest-context.xml | 3 +++ .../id/process/spring/test/SpringExpressionEvaluatorTest-context.xml | 2 ++ 4 files changed, 11 insertions(+), 4 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java index 4574c831e..2cb2a3278 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest.java @@ -19,6 +19,7 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils; +import at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore; import at.gv.egovernment.moa.id.module.test.TestRequestImpl; import at.gv.egovernment.moa.id.process.ProcessDefinitionParserException; import at.gv.egovernment.moa.id.process.ProcessEngine; @@ -26,7 +27,6 @@ import at.gv.egovernment.moa.id.process.ProcessEngineImpl; import at.gv.egovernment.moa.id.process.ProcessExecutionException; import at.gv.egovernment.moa.id.process.ProcessInstance; import at.gv.egovernment.moa.id.process.api.ExecutionContext; -import at.gv.egovernment.moa.id.process.dao.ProcessInstanceStore; import at.gv.egovernment.moa.id.process.spring.SpringExpressionEvaluator; /** @@ -76,7 +76,8 @@ public class SpringExpressionAwareProcessEngineTest { //ConfigurationDBUtils.initHibernate(props); Configuration config = new Configuration(); config.addProperties(props); - config.addAnnotatedClass(ProcessInstanceStore.class); + //config.addAnnotatedClass(ProcessInstanceStore.class); + config.addAnnotatedClass(AssertionStore.class); MOASessionDBUtils.initHibernate(config, props); } catch (Exception e) { e.printStackTrace(); diff --git a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java index b659686c6..a7e351e25 100644 --- a/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java +++ b/id/server/idserverlib/src/test/java/at/gv/egovernment/moa/id/process/test/ProcessEngineTest.java @@ -18,6 +18,7 @@ import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import at.gv.egovernment.moa.id.commons.db.MOASessionDBUtils; +import at.gv.egovernment.moa.id.commons.db.dao.session.AssertionStore; import at.gv.egovernment.moa.id.module.test.TestRequestImpl; import at.gv.egovernment.moa.id.process.ProcessDefinitionParser; import at.gv.egovernment.moa.id.process.ProcessDefinitionParserException; @@ -25,7 +26,6 @@ import at.gv.egovernment.moa.id.process.ProcessEngine; import at.gv.egovernment.moa.id.process.ProcessEngineImpl; import at.gv.egovernment.moa.id.process.ProcessExecutionException; import at.gv.egovernment.moa.id.process.ProcessInstance; -import at.gv.egovernment.moa.id.process.dao.ProcessInstanceStore; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest-context.xml") @@ -71,7 +71,8 @@ public class ProcessEngineTest { //ConfigurationDBUtils.initHibernate(props); Configuration config = new Configuration(); config.addProperties(props); - config.addAnnotatedClass(ProcessInstanceStore.class); + //config.addAnnotatedClass(ProcessInstanceStore.class); + config.addAnnotatedClass(AssertionStore.class); MOASessionDBUtils.initHibernate(config, props); } catch (Exception e) { e.printStackTrace(); diff --git a/id/server/idserverlib/src/test/resources/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest-context.xml b/id/server/idserverlib/src/test/resources/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest-context.xml index decdfe6b0..bf47c0445 100644 --- a/id/server/idserverlib/src/test/resources/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest-context.xml +++ b/id/server/idserverlib/src/test/resources/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionAwareProcessEngineTest-context.xml @@ -11,6 +11,9 @@ + + diff --git a/id/server/idserverlib/src/test/resources/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionEvaluatorTest-context.xml b/id/server/idserverlib/src/test/resources/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionEvaluatorTest-context.xml index 95b88ca1a..51554bed4 100644 --- a/id/server/idserverlib/src/test/resources/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionEvaluatorTest-context.xml +++ b/id/server/idserverlib/src/test/resources/at/gv/egovernment/moa/id/process/spring/test/SpringExpressionEvaluatorTest-context.xml @@ -11,4 +11,6 @@ + -- cgit v1.2.3 From ab82ea5362dbc6f93e755451e69bd4709017209c Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 22 Mar 2016 15:31:14 +0100 Subject: fixed missing relay state forwarding --- .../id/protocols/eidas/AuthenticationRequest.java | 4 +++- .../moa/id/protocols/eidas/EIDASData.java | 20 ++++++++++++++++++++ .../moa/id/protocols/eidas/EIDASProtocol.java | 4 ++++ 3 files changed, 27 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java index 68ff0425a..967231110 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/AuthenticationRequest.java @@ -141,7 +141,9 @@ public class AuthenticationRequest implements IAction { VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); Template template = velocityEngine.getTemplate("/resources/templates/stork2_postbinding_template.html"); VelocityContext context = new VelocityContext(); - + + context.put("RelayState", eidasRequest.getRemoteRelayState()); + context.put("SAMLResponse", token); Logger.debug("SAMLResponse original: " + token); diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java index 0bedf0432..38a4d8757 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASData.java @@ -22,6 +22,8 @@ public class EIDASData extends RequestImpl { /** The ip address of the requester. */ private String remoteIPAddress; + private String remoteRelayState; + @Override public List getRequestedAttributes() { // TODO Auto-generated method stub @@ -81,4 +83,22 @@ public class EIDASData extends RequestImpl { public void setRemoteAddress(String remoteIP) { remoteIPAddress = remoteIP; } + + /** + * Gets the remote relay state. + * + * @return the remote relay state + */ + public String getRemoteRelayState() { + return remoteRelayState; + } + + /** + * Sets the remote relay state. + * + * @param relayState the new remote relay state + */ + public void setRemoteRelayState(String relayState) { + remoteRelayState = relayState; + } } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java index a94e136b4..072f1661a 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java @@ -107,6 +107,10 @@ public class EIDASProtocol extends MOAIDAuthConstants implements IModulInfo { // - memorize remote ip result.setRemoteAddress(request.getRemoteAddr()); + // - memorize relaystate + String relayState = request.getParameter("RelayState"); + result.setRemoteRelayState(relayState); + // - memorize country code of target country result.setTarget(samlReq.getCountry()); -- cgit v1.2.3 From a6b1b3ba3bcc9edbfc3fe073e119335ea868c74a Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Tue, 22 Mar 2016 15:33:25 +0100 Subject: removed misleading warn statement --- .../moa/id/auth/modules/eidas/eIDASSignalServlet.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java index 49f0451cb..6a0cf6dfa 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java @@ -64,12 +64,13 @@ public class eIDASSignalServlet extends ProcessEngineSignalServlet { // use SAML2 relayState if (sessionId == null) { sessionId = StringEscapeUtils.escapeHtml(request.getParameter("RelayState")); - } + } else + Logger.warn("No parameter 'SAMLResponse'. Unable to retrieve MOA session id."); // take from InResponseTo attribute of SAMLResponse - if (sessionId == null) { - String base64SamlToken = request.getParameter("SAMLResponse"); - if (base64SamlToken != null && false) { +// if (sessionId == null) { +// String base64SamlToken = request.getParameter("SAMLResponse"); +// if (base64SamlToken != null && false) { // byte[] samlToken = Base64Utils.decode(base64SamlToken, false); // Document samlResponse = parseDocument(new ByteArrayInputStream(samlToken)); // @@ -80,10 +81,10 @@ public class eIDASSignalServlet extends ProcessEngineSignalServlet { // XPathExpression expression = xPath.compile("string(/saml2p:Response/@InResponseTo)"); // sessionId = (String) expression.evaluate(samlResponse, XPathConstants.STRING); // sessionId = StringEscapeUtils.escapeHtml(StringUtils.trimToNull(sessionId)); - } else { - Logger.warn("No parameter 'SAMLResponse'. Unable to retrieve MOA session id."); - } - } +// } else { +// Logger.warn("No parameter 'SAMLResponse'. Unable to retrieve MOA session id."); +// } +// } } catch (Exception e) { Logger.warn("Unable to retrieve moa session id.", e); -- cgit v1.2.3 From b107abdc2655e62c5d11219f2b90a8e0a85bda91 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 23 Mar 2016 09:48:23 +0100 Subject: update Session-Transfer-Module --- .../moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java index ab0aba6a7..bf1c7f773 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java @@ -518,7 +518,7 @@ public class SSOContainerUtils { transformer.transform(source, sr); sw.close(); - return Base64Utils.encode(sw.toString().getBytes()); + return sw.toString(); } -- cgit v1.2.3 From db813d7524890a60bbd13f60c9c448dc1ef6cfd6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 23 Mar 2016 15:16:19 +0100 Subject: add additional parameters to ELGA mandate-service client implementation --- .../pvp2x/builder/PVPAuthnRequestBuilder.java | 16 ++++ .../pvp2x/builder/PVPMetadataBuilder.java | 6 +- .../pvp2x/config/IDPPVPMetadataConfiguration.java | 16 ++++ .../IPVPAuthnRequestBuilderConfiguruation.java | 18 +++- .../config/IPVPMetadataBuilderConfiguration.java | 14 +++ .../id/protocols/eidas/EidasMetaDataRequest.java | 9 +- .../elgamandates/ELGAMandatesAuthConstants.java | 7 ++ .../config/ELGAMandatesMetadataConfiguration.java | 26 +++++- .../ELGAMandatesRequestBuilderConfiguration.java | 103 +++++++++++++++++++-- .../elgamandates/tasks/RequestELGAMandateTask.java | 16 +++- .../config/FederatedAuthMetadataConfiguration.java | 19 +++- .../FederatedAuthnRequestBuilderConfiguration.java | 17 ++++ 12 files changed, 245 insertions(+), 22 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPAuthnRequestBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPAuthnRequestBuilder.java index ba5c19de7..01ef4a43d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPAuthnRequestBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPAuthnRequestBuilder.java @@ -38,6 +38,8 @@ import org.opensaml.saml2.core.NameIDPolicy; import org.opensaml.saml2.core.NameIDType; import org.opensaml.saml2.core.RequestedAuthnContext; import org.opensaml.saml2.core.Subject; +import org.opensaml.saml2.core.SubjectConfirmation; +import org.opensaml.saml2.core.SubjectConfirmationData; import org.opensaml.saml2.metadata.EntityDescriptor; import org.opensaml.saml2.metadata.SingleSignOnService; import org.opensaml.ws.message.encoder.MessageEncodingException; @@ -175,6 +177,20 @@ public class PVPAuthnRequestBuilder { subjectNameID.setFormat(NameID.TRANSIENT); reqSubject.setNameID(subjectNameID); + + if (config.getSubjectConformationDate() != null) { + SubjectConfirmation subjectConformation = SAML2Utils.createSAMLObject(SubjectConfirmation.class); + SubjectConfirmationData subjectConformDate = SAML2Utils.createSAMLObject(SubjectConfirmationData.class); + subjectConformation.setSubjectConfirmationData(subjectConformDate); + reqSubject.getSubjectConfirmations().add(subjectConformation ); + + if (config.getSubjectConformationMethode() != null) + subjectConformation.setMethod(config.getSubjectConformationMethode()); + + subjectConformDate.setDOM(config.getSubjectConformationDate()); + + } + authReq.setSubject(reqSubject ); } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java index 62e3b9620..ab96e4df7 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java @@ -214,8 +214,8 @@ public class PVPMetadataBuilder { private RoleDescriptor generateSPMetadata(IPVPMetadataBuilderConfiguration config) throws CredentialsNotAvailableException, SecurityException, ConfigurationException { SPSSODescriptor spSSODescriptor = SAML2Utils.createSAMLObject(SPSSODescriptor.class); spSSODescriptor.addSupportedProtocol(SAMLConstants.SAML20P_NS); - spSSODescriptor.setAuthnRequestsSigned(true); - spSSODescriptor.setWantAssertionsSigned(false); + spSSODescriptor.setAuthnRequestsSigned(config.wantAuthnRequestSigned()); + spSSODescriptor.setWantAssertionsSigned(config.wantAssertionSigned()); KeyInfoGenerator keyInfoGenerator = keyInfoFactory.newInstance(); @@ -367,7 +367,7 @@ public class PVPMetadataBuilder { idpSSODescriptor.addSupportedProtocol(SAMLConstants.SAML20P_NS); //set ass default value, because PVP 2.x specification defines this feature as MUST - idpSSODescriptor.setWantAuthnRequestsSigned(true); + idpSSODescriptor.setWantAuthnRequestsSigned(config.wantAuthnRequestSigned()); // add WebSSO descriptor for POST-Binding if (MiscUtil.isNotEmpty(config.getIDPWebSSOPostBindingURL())) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IDPPVPMetadataConfiguration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IDPPVPMetadataConfiguration.java index 5bb1131a6..c0fb5bf5b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IDPPVPMetadataConfiguration.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IDPPVPMetadataConfiguration.java @@ -300,4 +300,20 @@ public class IDPPVPMetadataConfiguration implements IPVPMetadataBuilderConfigura return "MOA-ID-Auth"; } + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration#wantAssertionSigned() + */ + @Override + public boolean wantAssertionSigned() { + return false; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration#wantAuthnRequestSigned() + */ + @Override + public boolean wantAuthnRequestSigned() { + return true; + } + } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IPVPAuthnRequestBuilderConfiguruation.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IPVPAuthnRequestBuilderConfiguruation.java index 6e1798ed1..814a2387d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IPVPAuthnRequestBuilderConfiguruation.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IPVPAuthnRequestBuilderConfiguruation.java @@ -25,6 +25,7 @@ package at.gv.egovernment.moa.id.protocols.pvp2x.config; import org.opensaml.saml2.core.AuthnContextComparisonTypeEnumeration; import org.opensaml.saml2.metadata.EntityDescriptor; import org.opensaml.xml.security.credential.Credential; +import org.w3c.dom.Element; /** * @author tlenz @@ -136,11 +137,26 @@ public interface IPVPAuthnRequestBuilderConfiguruation { public String getSubjectNameIDFormat(); /** - * Define a SP specific SAMK2 requestID + * Define a SP specific SAML2 requestID * * @return requestID, or null if the requestID should be generated automatically */ public String getRequestID(); + /** + * Defines the 'method' attribute in 'SubjectConformation' element + * + * @return method, or null if no method should set + */ + public String getSubjectConformationMethode(); + + /** + * Define the information, which should be added as 'subjectConformationDate' + * in 'SubjectConformation' element + * + * @return subjectConformation information or null if no subjectConformation should be set + */ + public Element getSubjectConformationDate(); + } diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IPVPMetadataBuilderConfiguration.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IPVPMetadataBuilderConfiguration.java index 56274535b..3a8404cae 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IPVPMetadataBuilderConfiguration.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/config/IPVPMetadataBuilderConfiguration.java @@ -221,4 +221,18 @@ public interface IPVPMetadataBuilderConfiguration { * @return a List of SAML2 nameID types */ public List getSPAllowedNameITTypes(); + + /** + * Set the 'wantAssertionSigned' attribute in SP metadata + * + * @return + */ + public boolean wantAssertionSigned(); + + /** + * Set the 'wantAuthnRequestSigned' attribute + * + * @return + */ + public boolean wantAuthnRequestSigned(); } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java index 55f4f44d4..557b83487 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java @@ -104,13 +104,14 @@ public class EidasMetaDataRequest implements IAction { generator.setConfigParams(mcp); generator.initialize(engine); mcp.setEntityID(metadata_url); - - generator.addSPRole(); + String returnUrl = sp_return_url; mcp.setAssertionConsumerUrl(returnUrl); - - generator.addIDPRole(); mcp.setAssuranceLevel("http://eidas.europa.eu/LoA/substantial"); // TODO make configurable + + generator.addSPRole(); + generator.addIDPRole(); + metadata = generator.generateMetadata(); return metadata; diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthConstants.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthConstants.java index 60dd95338..7ca4590bb 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthConstants.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/ELGAMandatesAuthConstants.java @@ -98,6 +98,13 @@ public class ELGAMandatesAuthConstants { public static final String CONFIG_DEFAULT_QAA_STORK_LEVEL = "http://www.stork.gov.eu/1.0/citizenQAALevel/4"; public static final String CONFIG_DEFAULT_QAA_SECCLASS_LEVEL = "http://www.ref.gv.at/ns/names/agiz/pvp/secclass/0-3"; + public static final String SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE = "rc"; + public static final String SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE_URI = "http://egiz.gv.at/namespace/subjectconformationdate/elga"; + public static final String SUBJECTCONFORMATIONDATE_ELEMENT_ROOT = SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE + ":Representative"; + public static final String SUBJECTCONFORMATIONDATE_ELEMENT_FAMILYNAME = SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE + ":FamilyName"; + public static final String SUBJECTCONFORMATIONDATE_ELEMENT_GIVENNAME = SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE + ":GivenName"; + public static final String SUBJECTCONFORMATIONDATE_ELEMENT_DATEOFBIRTH = SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE + ":DateOfBirth"; + public static List getRequiredAttributeNames() { List list = new ArrayList(); for (Pair el : REQUIRED_PVP_ATTRIBUTES) diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesMetadataConfiguration.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesMetadataConfiguration.java index 22cb22c6d..5743590f9 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesMetadataConfiguration.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesMetadataConfiguration.java @@ -223,7 +223,8 @@ public class ELGAMandatesMetadataConfiguration implements IPVPMetadataBuilderCon */ @Override public String getSPSLOPostBindingURL() { - return authURL + ELGAMandatesAuthConstants.ENDPOINT_POST; + //return authURL + ELGAMandatesAuthConstants.ENDPOINT_POST; + return null; } /* (non-Javadoc) @@ -231,7 +232,8 @@ public class ELGAMandatesMetadataConfiguration implements IPVPMetadataBuilderCon */ @Override public String getSPSLORedirectBindingURL() { - return authURL + ELGAMandatesAuthConstants.ENDPOINT_REDIRECT; + //return authURL + ELGAMandatesAuthConstants.ENDPOINT_REDIRECT; + return null; } /* (non-Javadoc) @@ -288,4 +290,24 @@ public class ELGAMandatesMetadataConfiguration implements IPVPMetadataBuilderCon public String getSPNameForLogging() { return ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING; } + + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration#wantAssertionSigned() + */ + @Override + public boolean wantAssertionSigned() { + return true; + + } + + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration#wantAuthnRequestSigned() + */ + @Override + public boolean wantAuthnRequestSigned() { + return true; + + } } diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesRequestBuilderConfiguration.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesRequestBuilderConfiguration.java index 320c4fdc6..60025075f 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesRequestBuilderConfiguration.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesRequestBuilderConfiguration.java @@ -22,13 +22,26 @@ */ package at.gv.egovernment.moa.id.auth.modules.elgamandates.config; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; + +import org.opensaml.Configuration; import org.opensaml.saml2.core.AuthnContextComparisonTypeEnumeration; import org.opensaml.saml2.core.NameID; +import org.opensaml.saml2.core.SubjectConfirmation; +import org.opensaml.saml2.core.SubjectConfirmationData; import org.opensaml.saml2.metadata.EntityDescriptor; +import org.opensaml.xml.io.Marshaller; +import org.opensaml.xml.io.MarshallingException; import org.opensaml.xml.security.credential.Credential; +import org.w3c.dom.Document; +import org.w3c.dom.Element; import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; import at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPAuthnRequestBuilderConfiguruation; +import at.gv.egovernment.moa.id.protocols.pvp2x.utils.SAML2Utils; +import at.gv.egovernment.moa.logging.Logger; /** * @author tlenz @@ -36,14 +49,15 @@ import at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPAuthnRequestBuilderCo */ public class ELGAMandatesRequestBuilderConfiguration implements IPVPAuthnRequestBuilderConfiguruation { - private boolean isPassive; - private String SPEntityID; - private String QAA_Level; - private EntityDescriptor idpEntity; - private Credential signCred; - private String subjectNameID; - private String subjectNameIDQualifier; - private String requestID; + private boolean isPassive = false; + private String SPEntityID = null; + private String QAA_Level = null; + private EntityDescriptor idpEntity = null; + private Credential signCred = null; + private String subjectNameID = null; + private String subjectNameIDQualifier = null; + private String requestID = null; + private Element subjectConformationDate = null; /* (non-Javadoc) @@ -216,8 +230,77 @@ public class ELGAMandatesRequestBuilderConfiguration implements IPVPAuthnRequest public void setSubjectNameIDQualifier(String subjectNameIDQualifier) { this.subjectNameIDQualifier = subjectNameIDQualifier; } - - + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPAuthnRequestBuilderConfiguruation#getSubjectConformationMethode() + */ + @Override + public String getSubjectConformationMethode() { + return SubjectConfirmation.METHOD_BEARER; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPAuthnRequestBuilderConfiguruation#getSubjectConformationDate() + */ + @Override + public Element getSubjectConformationDate() { + return subjectConformationDate; + } + + /** + * @param subjectConformationDate the subjectConformationDate to set + */ + public void setSubjectConformationDate(String givenName, String familyName, String dateOfBirth) { + try { + SubjectConfirmationData subjectConformDate = SAML2Utils.createSAMLObject(SubjectConfirmationData.class); + + DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); + dbf.setNamespaceAware(true); + DocumentBuilder builder = dbf.newDocumentBuilder(); + Document doc = builder.newDocument(); + + Marshaller out = Configuration.getMarshallerFactory() + .getMarshaller(subjectConformDate); + out.marshall(subjectConformDate, doc); + + //build root element + Element rootDom = doc.createElementNS( + ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE_URI, + ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_ROOT); + rootDom.setPrefix(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE); + rootDom.setAttributeNS("http://www.w3.org/2000/xmlns/", + "xmlns:" + ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE, + ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE_URI); + + //build personal information + Element familyNameDom = doc.createElement(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_FAMILYNAME); + //familyNameDom.setPrefix(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE); + familyNameDom.setTextContent(familyName); + + Element givenNameDom = doc.createElement(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_GIVENNAME); + //givenNameDom.setPrefix(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE); + givenNameDom.setTextContent(givenName); + + Element dateOfBirthDom = doc.createElement(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_DATEOFBIRTH); + //dateOfBirthDom.setPrefix(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE); + dateOfBirthDom.setTextContent(dateOfBirth); + + //add information to root element + doc.getFirstChild().appendChild(rootDom); + rootDom.appendChild(givenNameDom); + rootDom.appendChild(familyNameDom); + rootDom.appendChild(dateOfBirthDom); + + this.subjectConformationDate = doc.getDocumentElement(); + + } catch (ParserConfigurationException | MarshallingException e) { + Logger.error("Can not generate 'SubjectConformationDate' for " + + ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING); + + } + + + } + } diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java index 5d98eb46e..6a7858575 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java @@ -122,7 +122,15 @@ public class RequestELGAMandateTask extends AbstractAuthServletTask { } } - + + //check if identityLink exists in moaSession DAO + if (moasession.getIdentityLink() == null) { + Logger.error("Connect ELGA Mandate-Service FAILED -> NO identityLink in moaSession DAO"); + throw new MOAIDException("service.10", + new Object[]{ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING, "NO identityLink in moaSession DAO."}); + + } + String sourcePinType = moasession.getIdentityLink().getIdentificationType(); String sourcePinValue = moasession.getIdentityLink().getIdentificationValue(); if (sourcePinType.startsWith(Constants.URN_PREFIX_BASEID)) { @@ -152,6 +160,12 @@ public class RequestELGAMandateTask extends AbstractAuthServletTask { PVPTargetConfiguration.DATAID_INTERFEDERATION_REQUESTID, authnReqConfig.getRequestID()); + //set SubjectConformationDate + authnReqConfig.setSubjectConformationDate( + moasession.getIdentityLink().getGivenName(), + moasession.getIdentityLink().getFamilyName(), + moasession.getIdentityLink().getDateOfBirth()); + //store pending-request requestStoreage.storePendingRequest(pendingReq); diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthMetadataConfiguration.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthMetadataConfiguration.java index 0cee2dde3..c3d5e8032 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthMetadataConfiguration.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthMetadataConfiguration.java @@ -263,7 +263,6 @@ public class FederatedAuthMetadataConfiguration implements IPVPMetadataBuilderCo */ @Override public List getSPRequiredAttributes() { - // TODO Auto-generated method stub return null; } @@ -287,4 +286,22 @@ public class FederatedAuthMetadataConfiguration implements IPVPMetadataBuilderCo return FederatedAuthConstants.MODULE_NAME_FOR_LOGGING; } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration#wantAssertionSigned() + */ + @Override + public boolean wantAssertionSigned() { + return false; + } + + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPMetadataBuilderConfiguration#wantAuthnRequestSigned() + */ + @Override + public boolean wantAuthnRequestSigned() { + return true; + } + } diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthnRequestBuilderConfiguration.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthnRequestBuilderConfiguration.java index 19eae06d7..000590923 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthnRequestBuilderConfiguration.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/config/FederatedAuthnRequestBuilderConfiguration.java @@ -26,6 +26,7 @@ import org.opensaml.saml2.core.AuthnContextComparisonTypeEnumeration; import org.opensaml.saml2.core.NameID; import org.opensaml.saml2.metadata.EntityDescriptor; import org.opensaml.xml.security.credential.Credential; +import org.w3c.dom.Element; import at.gv.egovernment.moa.id.auth.modules.federatedauth.FederatedAuthConstants; import at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPAuthnRequestBuilderConfiguruation; @@ -190,5 +191,21 @@ public class FederatedAuthnRequestBuilderConfiguration implements IPVPAuthnReque return null; } + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPAuthnRequestBuilderConfiguruation#getSubjectConformationMethode() + */ + @Override + public String getSubjectConformationMethode() { + return null; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.protocols.pvp2x.config.IPVPAuthnRequestBuilderConfiguruation#getSubjectConformationDate() + */ + @Override + public Element getSubjectConformationDate() { + return null; + } + } -- cgit v1.2.3 From 2360a1be1c26b360af0ef66e0c2d0b126b26719b Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 24 Mar 2016 09:02:56 +0100 Subject: add log messages to SSO transfer modul --- .../moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java index bf1c7f773..753da96de 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java @@ -379,12 +379,16 @@ public class SSOContainerUtils { sessionIndex, subjectConfirmationData.getNotOnOrAfter()); - String ssoDataBlob = buildSSOContainerObject(authURL, assertion, new DateTime(date.getTime())); + //build blob with signed session information + String ssoDataBlob = buildSSOContainerObject(authURL, assertion, new DateTime(date.getTime())); + Logger.debug("Unencrypted SessionBlob:" + ssoDataBlob); + //encrypt session information with ephemeral key byte[] encPersonData = enOrDeCryptCSR(ssoDataBlob.getBytes(), hashedSecret, Cipher.ENCRYPT_MODE); String encAndEncodedPersonalData = Base64Utils.encode(encPersonData); - + Logger.debug("Encrypted SessionBlob:" + encAndEncodedPersonalData); + //build JSON response JsonObject container = new JsonObject(); container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_TYPE, SSOTransferConstants.SSOCONTAINER_VALUE_TYPE_SSO); container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_VALIDTO, subjectConfirmationData.getNotOnOrAfter().toString()); -- cgit v1.2.3 From 859d7b200e1efa6caa1c72e32f22e61660b1b2ef Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 24 Mar 2016 10:43:55 +0100 Subject: update ELGA Mandate-Service client modul --- id/server/doc/handbook/additional/additional.html | 250 ++++++++++----------- .../ELGAMandatesRequestBuilderConfiguration.java | 19 +- .../tasks/ReceiveElgaMandateResponseTask.java | 4 +- 3 files changed, 136 insertions(+), 137 deletions(-) (limited to 'id/server') diff --git a/id/server/doc/handbook/additional/additional.html b/id/server/doc/handbook/additional/additional.html index 58990567c..00b36c4cd 100644 --- a/id/server/doc/handbook/additional/additional.html +++ b/id/server/doc/handbook/additional/additional.html @@ -311,104 +311,104 @@

 

- - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -416,74 +416,74 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -506,39 +506,39 @@ - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + - - - + + + @@ -547,12 +547,12 @@ - + - + diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesRequestBuilderConfiguration.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesRequestBuilderConfiguration.java index 60025075f..b67d263fc 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesRequestBuilderConfiguration.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/config/ELGAMandatesRequestBuilderConfiguration.java @@ -252,8 +252,9 @@ public class ELGAMandatesRequestBuilderConfiguration implements IPVPAuthnRequest */ public void setSubjectConformationDate(String givenName, String familyName, String dateOfBirth) { try { - SubjectConfirmationData subjectConformDate = SAML2Utils.createSAMLObject(SubjectConfirmationData.class); - + Logger.trace("Build 'SubjectConfirmationData' for ELGA Mandate-Service request ..."); + //build empty 'SubjectConfirmationData' element + SubjectConfirmationData subjectConformDate = SAML2Utils.createSAMLObject(SubjectConfirmationData.class); DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance(); dbf.setNamespaceAware(true); DocumentBuilder builder = dbf.newDocumentBuilder(); @@ -263,7 +264,7 @@ public class ELGAMandatesRequestBuilderConfiguration implements IPVPAuthnRequest .getMarshaller(subjectConformDate); out.marshall(subjectConformDate, doc); - //build root element + //build root element for personal information Element rootDom = doc.createElementNS( ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE_URI, ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_ROOT); @@ -274,24 +275,20 @@ public class ELGAMandatesRequestBuilderConfiguration implements IPVPAuthnRequest //build personal information Element familyNameDom = doc.createElement(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_FAMILYNAME); - //familyNameDom.setPrefix(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE); - familyNameDom.setTextContent(familyName); - Element givenNameDom = doc.createElement(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_GIVENNAME); - //givenNameDom.setPrefix(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE); - givenNameDom.setTextContent(givenName); - Element dateOfBirthDom = doc.createElement(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_DATEOFBIRTH); - //dateOfBirthDom.setPrefix(ELGAMandatesAuthConstants.SUBJECTCONFORMATIONDATE_ELEMENT_NAMESPACE); + familyNameDom.setTextContent(familyName); + givenNameDom.setTextContent(givenName); dateOfBirthDom.setTextContent(dateOfBirth); - //add information to root element + //add personal information to 'SubjectConfirmationData' element doc.getFirstChild().appendChild(rootDom); rootDom.appendChild(givenNameDom); rootDom.appendChild(familyNameDom); rootDom.appendChild(dateOfBirthDom); this.subjectConformationDate = doc.getDocumentElement(); + Logger.trace("'SubjectConfirmationData' for ELGA Mandate-Service is complete"); } catch (ParserConfigurationException | MarshallingException e) { Logger.error("Can not generate 'SubjectConformationDate' for " diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java index 8960041f5..5604b7640 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java @@ -150,6 +150,7 @@ public class ReceiveElgaMandateResponseTask extends AbstractAuthServletTask { defaultTaskInitialization(request, executionContext); //validate receive mandate reference-value + //TODO: update if ReferenceValue Discussion is finished String responseRefValue = extractor.getSingleAttributeValue(PVPConstants.MANDATE_REFERENCE_VALUE_NAME); if (!moasession.getMandateReferenceValue().equals(responseRefValue)) { Logger.warn("PVP Response from ELGA mandate-service contains a not valid MandateReferenceValue."); @@ -172,7 +173,8 @@ public class ReceiveElgaMandateResponseTask extends AbstractAuthServletTask { authenticatedSessionStorage.storeSession(moasession); //write revisions log entry - revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_RECEIVED); + revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.AUTHPROCESS_ELGA_MANDATE_RECEIVED, + extractor.getSingleAttributeValue(PVPConstants.MANDATE_REFERENCE_VALUE_NAME)); //write mandate info's to revisions log revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.PERSONAL_INFORMATION_MANDATE_TYPE, -- cgit v1.2.3 From b819b1f8cd82383fd2b2ed63dc71f6ac23fa9731 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 24 Mar 2016 13:25:04 +0100 Subject: fix problem in moa-id-configuration with duplicate entries and delete operation --- .../moa/id/commons/db/NewConfigurationDBRead.java | 43 ++++++++++++++++------ 1 file changed, 31 insertions(+), 12 deletions(-) (limited to 'id/server') diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java index 28c705c71..e2f793edf 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/db/NewConfigurationDBRead.java @@ -248,30 +248,49 @@ public class NewConfigurationDBRead { * @param id * @return */ - public OnlineApplication getOnlineApplication(String id) { + public List getOnlineApplications(String id) { Logger.trace("Getting OnlineApplication with ID " + id + " from database."); // select onlineapplication from OnlineApplication onlineapplication // where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) - OnlineApplication result = null; + List result = new ArrayList(); List allOAs = getAllOnlineApplications(); for (OnlineApplication oa : nullGuard(allOAs)) { - String publicUrlPrefix = oa.getPublicURLPrefix(); - if (publicUrlPrefix != null && publicUrlPrefix.length() <= id.length()) { - if (id.substring(0, publicUrlPrefix.length()).equals(publicUrlPrefix)) { - if (result != null) { - Logger.warn("OAIdentifier match to more then one DB-entry!"); - return null; - } else { - result = oa; - } - } + String publicUrlPrefix = oa.getPublicURLPrefix(); + if (publicUrlPrefix != null && publicUrlPrefix.length() <= id.length()) { + if (id.substring(0, publicUrlPrefix.length()).equals(publicUrlPrefix)) + result.add(oa); + } } return result; } + + /** + * + * @param id + * @return + */ + public OnlineApplication getOnlineApplication(String id) { + Logger.trace("Getting OnlineApplication with ID " + id + " from database."); + + // select onlineapplication from OnlineApplication onlineapplication + // where onlineapplication.publicURLPrefix = SUBSTRING(:id, 1, LENGTH(onlineapplication.publicURLPrefix)) + List result = getOnlineApplications(id); + + if (result != null && result.size() == 1) + return result.get(0); + + else if (result != null && result.size() > 1) + Logger.warn("OAIdentifier match to more then one DB-entry!"); + + else + Logger.warn("no OA with OAIdentifier: "+ id); + + return null; + } /** * -- cgit v1.2.3 From 1bad771fdccff20e21b79f88266d194ea71a0df1 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 24 Mar 2016 14:55:02 +0100 Subject: fix empty attribute problem --- .../builder/attributes/EIDIssuingNationAttributeBuilder.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/EIDIssuingNationAttributeBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/EIDIssuingNationAttributeBuilder.java index ab41b1229..fc80ad7fe 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/EIDIssuingNationAttributeBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/builder/attributes/EIDIssuingNationAttributeBuilder.java @@ -23,9 +23,9 @@ package at.gv.egovernment.moa.id.protocols.builder.attributes; import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; -import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.protocols.pvp2x.builder.attributes.exceptions.AttributeException; +import at.gv.egovernment.moa.util.MiscUtil; public class EIDIssuingNationAttributeBuilder implements IPVPAttributeBuilder { @@ -36,9 +36,12 @@ public class EIDIssuingNationAttributeBuilder implements IPVPAttributeBuilder { public ATT build(IOAAuthParameters oaParam, IAuthData authData, IAttributeGenerator g) throws AttributeException { String countryCode = authData.getCcc(); - - return g.buildStringAttribute(EID_ISSUING_NATION_FRIENDLY_NAME, - EID_ISSUING_NATION_NAME, countryCode); + if (MiscUtil.isNotEmpty(countryCode)) + return g.buildStringAttribute(EID_ISSUING_NATION_FRIENDLY_NAME, + EID_ISSUING_NATION_NAME, countryCode); + + else + return null; } public ATT buildEmpty(IAttributeGenerator g) { -- cgit v1.2.3 From 98bc3e020f01a00d8a686c9c6005a71133cbd2a4 Mon Sep 17 00:00:00 2001 From: Florian Reimair Date: Thu, 24 Mar 2016 15:43:47 +0100 Subject: changed metadata contenttype from text/xml to app/xml --- .../moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java index 5075e3fe7..a625de74e 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/EidasMetaDataServlet.java @@ -63,7 +63,7 @@ public class EidasMetaDataServlet extends HttpServlet { logger.trace(metaData); - response.setContentType(MediaType.TEXT_XML.getType()); + response.setContentType(MediaType.APPLICATION_XML.getType()); response.getWriter().print(metaData); response.flushBuffer(); } catch (Exception e) { -- cgit v1.2.3 From 5b1f6e34fa4c9fd6c992efd347127db863fb1031 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 24 Mar 2016 15:46:48 +0100 Subject: fix possible NullPointer in error handling --- .../at/gv/egovernment/moa/id/auth/servlet/AbstractController.java | 4 ++++ .../moa/id/auth/servlet/AbstractProcessEngineSignalController.java | 1 + 2 files changed, 5 insertions(+) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java index 1a029a9fa..e51f3e6c9 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java @@ -111,6 +111,10 @@ public abstract class AbstractController extends MOAIDAuthConstants { //set original exception loggedException = ((TaskExecutionException) extractedException).getOriginalException(); + //use TaskExecutionException directly, if no Original Exeception is included + if (loggedException == null) + loggedException = exceptionThrown; + //set pending-request ID if it is set String reqID = ((TaskExecutionException) extractedException).getPendingRequestID(); if (MiscUtil.isNotEmpty(reqID)) diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java index f22c82e95..7a4ee35fa 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java @@ -44,6 +44,7 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont //change pending-request ID requestStorage.changePendingRequestID(pendingReq); + pendingRequestID = pendingReq.getRequestID(); //add transactionID and unique sessionID to Logger TransactionIDUtils.setSessionId(pendingReq.getUniqueSessionIdentifier()); -- cgit v1.2.3 From 5848cd0057ad9f607e8c117c18481f5caebfd357 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 24 Mar 2016 17:03:22 +0100 Subject: update Session-Transfer-Module to restore session --- .../verification/SAMLVerificationEngineSP.java | 14 ++- .../modules/ssotransfer/SSOTransferConstants.java | 7 ++ .../ssotransfer/servlet/SSOTransferServlet.java | 2 +- .../ssotransfer/task/RestoreSSOSessionTask.java | 117 +++++++++++++++------ .../ssotransfer/utils/SSOContainerUtils.java | 25 ++--- .../src/test/java/at/gv/egiz/tests/Tests.java | 17 +++ 6 files changed, 134 insertions(+), 48 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/SAMLVerificationEngineSP.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/SAMLVerificationEngineSP.java index d9bc7daaf..385fe90fb 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/SAMLVerificationEngineSP.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/SAMLVerificationEngineSP.java @@ -62,7 +62,7 @@ import at.gv.egovernment.moa.logging.Logger; public class SAMLVerificationEngineSP extends SAMLVerificationEngine { @Autowired AuthConfiguration authConfig; - + /** * Validate a PVP response and all included assertions * @@ -74,6 +74,13 @@ public class SAMLVerificationEngineSP extends SAMLVerificationEngine { * @throws AssertionValidationExeption */ public void validateAssertion(Response samlResp, boolean validateDestination, Credential assertionDecryption, String spEntityID, String loggerSPName) throws AssertionValidationExeption { + validateAssertion(samlResp, validateDestination, assertionDecryption, spEntityID, loggerSPName, true); + + } + + + public void validateAssertion(Response samlResp, boolean validateDestination, Credential assertionDecryption, String spEntityID, String loggerSPName, + boolean validateDateTime) throws AssertionValidationExeption { try { if (samlResp.getStatus().getStatusCode().getValue().equals(StatusCode.SUCCESS_URI)) { List saml2assertions = new ArrayList(); @@ -102,7 +109,7 @@ public class SAMLVerificationEngineSP extends SAMLVerificationEngine { throw new AssertionValidationExeption("sp.pvp2.07", new Object[]{loggerSPName, "'IssueInstant' attribute is not included"}); } - if (issueInstant.minusMinutes(MOAIDAuthConstants.TIME_JITTER).isAfterNow()) { + if (validateDateTime && issueInstant.minusMinutes(MOAIDAuthConstants.TIME_JITTER).isAfterNow()) { Logger.warn("PVP response: IssueInstant DateTime is not valid anymore."); throw new AssertionValidationExeption("sp.pvp2.07", new Object[]{loggerSPName, "'IssueInstant' Time is not valid any more"}); @@ -150,7 +157,8 @@ public class SAMLVerificationEngineSP extends SAMLVerificationEngine { if (conditions != null) { DateTime notbefore = conditions.getNotBefore().minusMinutes(5); DateTime notafter = conditions.getNotOnOrAfter(); - if ( notbefore.isAfterNow() || notafter.isBeforeNow() ) { + if (validateDateTime && + (notbefore.isAfterNow() || notafter.isBeforeNow()) ) { isAssertionValid = false; Logger.info("Assertion:" + saml2assertion.getID() + " is out of Date. " diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/SSOTransferConstants.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/SSOTransferConstants.java index 1ee715afa..1a4356653 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/SSOTransferConstants.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/SSOTransferConstants.java @@ -59,11 +59,18 @@ public class SSOTransferConstants { public static final String SSOCONTAINER_KEY_SESSION = "session"; public static final String SSOCONTAINER_KEY_RESULTENDPOINT = "resultEndPoint"; public static final String SSOCONTAINER_KEY_NONCE = "nonce"; + public static final String SSOCONTAINER_KEY_BLOB = "blob"; + public static final String SSOCONTAINER_KEY_SIGNATURE = "signature"; + public static final String SSOCONTAINER_KEY_UNIQUEUSERID = "bPK"; + + public static final String SSOCONTAINER_KEY_STATUS = "status"; public static final String FLAG_SSO_SESSION_RESTORED = "ssoRestoredFlag"; public static final long CERT_VALIDITY = 700; //2 years public static final String PENDINGREQ_DH = "dhparams"; public static final String PENDINGREQ_NONCE = "nonce"; + + } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java index 7cf7c914a..b18425839 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferServlet.java @@ -278,7 +278,7 @@ public class SSOTransferServlet{ @RequestMapping(value = { "/TransmitSSOSession" }, - method = {RequestMethod.GET}) + method = {RequestMethod.GET, RequestMethod.POST}) public void transferToPhone(HttpServletRequest req, HttpServletResponse resp) throws IOException { Logger.debug("Receive " + this.getClass().getName() + " request"); diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java index 6d9b43e5b..dd133e4fb 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java @@ -24,6 +24,7 @@ package at.gv.egovernment.moa.id.auth.modules.ssotransfer.task; import java.io.BufferedReader; import java.io.IOException; +import java.io.PrintWriter; import java.math.BigInteger; import java.security.MessageDigest; @@ -96,48 +97,57 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { Logger.warn("Received POST-message produce an ERROR.", e); } - - //session is valid --> load MOASession object - try { - defaultTaskInitialization(request, executionContext); - - } catch (MOAIDException | MOADatabaseException e1) { - Logger.error("Database Error! MOASession is not stored!"); - throw new TaskExecutionException(pendingReq, "Load MOASession FAILED.", e1); - - } - + String nonce = pendingReq.getGenericData(SSOTransferConstants.PENDINGREQ_NONCE, String.class); SSOTransferContainer container = pendingReq.getGenericData( SSOTransferConstants.PENDINGREQ_DH, SSOTransferContainer.class); if (container == null) { - throw new TaskExecutionException(pendingReq, "NO DH-Params in pending-request", null); + throw new TaskExecutionException(pendingReq, "NO DH-Params in pending-request", + new MOAIDException("NO DH-Params in pending-request", null)); } if (MiscUtil.isNotEmpty(receivedPostMessage)) { Logger.debug("Receive POST-Message data. Start data-validation process ... "); + JsonObject responseMsg = new JsonObject(); try { + Logger.debug("Unformated Msg:" + receivedPostMessage); + JsonParser parser = new JsonParser(); - JsonObject reveivedData = (JsonObject) parser.parse(sb.toString()); - JsonObject reveivedSession = reveivedData.get("session").getAsJsonObject(); - String validTo = reveivedSession.get("validTo").getAsString(); - String entityID = reveivedSession.get("entityID").getAsString(); - //String sessionBlob = reveivedSession.get("sessionBlob").getAsString(); - -// Logger.trace("Blob:" + sessionBlob + -// " | validTo:" + validTo + -// " | entityIS:" + entityID); - - - //TODO!!!! - String mobilePubKeyBase64 = reveivedSession.get( + JsonObject receivedData = (JsonObject) parser.parse(sb.toString()); + + JsonObject receivedSession = receivedData.get( + SSOTransferConstants.SSOCONTAINER_KEY_SESSION).getAsJsonObject(); + + Logger.debug("Received Session-Object:"+ receivedSession.toString()); + + String signature = receivedData.get( + SSOTransferConstants.SSOCONTAINER_KEY_SIGNATURE).getAsString(); + String mobilePubKeyBase64 = receivedData.get( SSOTransferConstants.SSOCONTAINER_KEY_DH_PUBKEY).getAsString(); - String encSessionBlobBase64 = new String(); + + String respNonce = receivedSession.get( + SSOTransferConstants.PENDINGREQ_NONCE).getAsString(); + String encSessionBlobBase64 = receivedSession.get( + SSOTransferConstants.SSOCONTAINER_KEY_BLOB).getAsString(); - Logger.debug("Receive PubKey:" +mobilePubKeyBase64 + " | SessionBlob:" + encSessionBlobBase64); + Logger.debug("Receive PubKey:" +mobilePubKeyBase64 + + " | SessionBlob:" + encSessionBlobBase64 + + " | Nonce:" + respNonce + + " | Signature:" + signature + + " | SignedData:" + receivedSession.toString()); + if (MiscUtil.isEmpty(respNonce) || !respNonce.equals(nonce)) { + Logger.warn("Received 'nonce':" + respNonce + + " does not match to stored 'nonce':" + nonce); + throw new TaskExecutionException(pendingReq, "Received 'nonce':" + respNonce + + " does not match to stored 'nonce':" + nonce, + new MOAIDException("Received 'nonce':" + respNonce + " does not match to stored 'nonce':" + nonce, null)); + + } + + //finish DH key agreement BigInteger mobilePubKey = new BigInteger(Base64Utils.decode(mobilePubKeyBase64, true)); DHPublicKeySpec mobilePubKeySpec = new DHPublicKeySpec(mobilePubKey, @@ -175,6 +185,16 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { Logger.debug("MobileDevice is valid. --> Starting session reconstruction ..."); + //session is valid --> load MOASession object + try { + defaultTaskInitialization(request, executionContext); + + } catch (MOAIDException | MOADatabaseException e1) { + Logger.error("Database Error! MOASession is not stored!"); + throw new TaskExecutionException(pendingReq, "Load MOASession FAILED.", e1); + + } + //transfer SSO Assertion into MOA-Session ssoTransferUtils.parseSSOContainerToMOASessionDataObject(pendingReq, moasession, attributeExtractor); @@ -190,8 +210,18 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { executionContext.put(SSOTransferConstants.FLAG_SSO_SESSION_RESTORED, true); executionContext.put("sessionRestoreFinished", false); - + + + responseMsg.addProperty( + SSOTransferConstants.SSOCONTAINER_KEY_STATUS, + "OK"); + response.setStatus(HttpServletResponse.SC_OK); + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = new PrintWriter(response.getOutputStream()); + out.print(responseMsg.toString()); + out.flush(); + // Logger.info("Received SSO session-data is from IDP: " + entityID // + ". Start inderfederation process to restore SSO session ... "); // //change to inderfederated session reconstruction @@ -202,8 +232,20 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { } catch (Exception e) { Logger.error("Parse reveived JSON data-object " + sb.toString() + " FAILED!", e); - throw new TaskExecutionException(pendingReq, "JSON data is not parseable.", e); - + //throw new TaskExecutionException(pendingReq, "JSON data is not parseable.", e); + try { + responseMsg.addProperty( + SSOTransferConstants.SSOCONTAINER_KEY_STATUS, + "FAILED"); + response.setStatus(HttpServletResponse.SC_OK); + response.setContentType("text/html;charset=UTF-8"); + PrintWriter out = new PrintWriter(response.getOutputStream()); + out.print(responseMsg.toString()); + out.flush(); + } catch (IOException e1) { + e1.printStackTrace(); + + } } } else { @@ -218,10 +260,21 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { executionContext.put("sessionRestoreFinished", true); } else { + //session is valid --> load MOASession object + try { + defaultTaskInitialization(request, executionContext); + + } catch (MOAIDException | MOADatabaseException e1) { + Logger.error("Database Error! MOASession is not stored!"); + throw new TaskExecutionException(pendingReq, "Load MOASession FAILED.", e1); + + } + DateTime moaSessionCreated = new DateTime(moasession.getSessionCreated().getTime()); - if (moaSessionCreated.plusMinutes(3).isBeforeNow()) { + if (moaSessionCreated.plusMinutes(1).isBeforeNow()) { Logger.warn("No SSO session-container received. Stop authentication process after time-out."); - throw new TaskExecutionException(pendingReq, "No SSO container received from smartphone app.", null); + throw new TaskExecutionException(pendingReq, "No SSO container received from smartphone app.", + new MOAIDException("No SSO container received from smartphone app.", null)); } else { Logger.debug("No restored SSO session found --> Wait a few minutes and check again."); diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java index 753da96de..0785f767b 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/utils/SSOContainerUtils.java @@ -129,6 +129,7 @@ import at.gv.egovernment.moa.id.util.Random; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Base64Utils; import at.gv.egovernment.moa.util.MiscUtil; +import at.gv.util.BpkUtil; import iaik.x509.X509Certificate; /** @@ -269,16 +270,14 @@ public class SSOContainerUtils { } - public Response validateReceivedSSOContainer(String signedEncryptedContainer) throws IOException, XMLParserException, UnmarshallingException, MOAIDException { - byte[] base64decodedContainer = Base64Utils.decode(signedEncryptedContainer, false); - + public Response validateReceivedSSOContainer(String signedEncryptedContainer) throws IOException, XMLParserException, UnmarshallingException, MOAIDException { final BasicParserPool ppMgr = new BasicParserPool(); final HashMap features = new HashMap(); features.put(XMLConstants.FEATURE_SECURE_PROCESSING, Boolean.TRUE); ppMgr.setBuilderFeatures(features); ppMgr.setNamespaceAware(true); - Document document = ppMgr.parse(new ByteArrayInputStream(base64decodedContainer)); + Document document = ppMgr.parse(new ByteArrayInputStream(signedEncryptedContainer.getBytes())); Element domElement = document.getDocumentElement(); UnmarshallerFactory saml2UnmarshallerFactory = Configuration.getUnmarshallerFactory(); @@ -317,8 +316,8 @@ public class SSOContainerUtils { samlVerificationEngine.validateAssertion(ssoContainer, false, credentials.getIDPAssertionEncryptionCredential(), ssoContainer.getIssuer().getValue(), - "SSO-Session Transfer module" - ); + "SSO-Session Transfer module", + false); return ssoContainer; } else { @@ -369,7 +368,7 @@ public class SSOContainerUtils { IAuthData authData = new SSOTransferAuthenticationData(authConfig, authSession); Assertion assertion = PVP2AssertionBuilder.buildGenericAssertion( - authURL, + entityID, entityID, new DateTime(date.getTime()), authnContextClassRef, @@ -380,7 +379,7 @@ public class SSOContainerUtils { subjectConfirmationData.getNotOnOrAfter()); //build blob with signed session information - String ssoDataBlob = buildSSOContainerObject(authURL, assertion, new DateTime(date.getTime())); + String ssoDataBlob = buildSSOContainerObject(entityID, assertion, new DateTime(date.getTime())); Logger.debug("Unencrypted SessionBlob:" + ssoDataBlob); //encrypt session information with ephemeral key @@ -394,8 +393,10 @@ public class SSOContainerUtils { container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_VALIDTO, subjectConfirmationData.getNotOnOrAfter().toString()); container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_ENTITYID, entityID); container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_USERID, authData.getGivenName() + " " + authData.getFamilyName()); - + container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_SESSION, encAndEncodedPersonalData); + container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_UNIQUEUSERID, + BpkUtil.calcBPK(authData.getIdentificationValue(), "AB")); //TODO container.addProperty(SSOTransferConstants.SSOCONTAINER_KEY_RESULTENDPOINT, "https://demo.egiz.gv.at"); @@ -447,13 +448,13 @@ public class SSOContainerUtils { } - private String buildSSOContainerObject(String authURL, Assertion assertion, DateTime date) throws ConfigurationException, EncryptionException, CredentialsNotAvailableException, SecurityException, ParserConfigurationException, MarshallingException, SignatureException, TransformerFactoryConfigurationError, TransformerException, IOException { + private String buildSSOContainerObject(String entityID, Assertion assertion, DateTime date) throws ConfigurationException, EncryptionException, CredentialsNotAvailableException, SecurityException, ParserConfigurationException, MarshallingException, SignatureException, TransformerFactoryConfigurationError, TransformerException, IOException { Response authResponse = SAML2Utils.createSAMLObject(Response.class); Issuer nissuer = SAML2Utils.createSAMLObject(Issuer.class); //change to entity value from entity name to IDP EntityID (URL) - nissuer.setValue(authURL); + nissuer.setValue(entityID); nissuer.setFormat(NameID.ENTITY); authResponse.setIssuer(nissuer); @@ -541,7 +542,7 @@ public class SSOContainerUtils { Logger.info("SSO-Transfer attribute " + el + " is empty!"); } catch (Exception e) { - Logger.warn("Build SSO-Transfer attribute " + el + " FAILED.", e); + Logger.info("Build SSO-Transfer attribute " + el + " FAILED:" + e.getMessage()); } } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java b/id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java index 57f4d11ad..0eb71ec92 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/test/java/at/gv/egiz/tests/Tests.java @@ -22,6 +22,10 @@ */ package at.gv.egiz.tests; +import com.google.gson.JsonObject; + +import at.gv.egovernment.moa.id.auth.modules.ssotransfer.SSOTransferConstants; + /** * @author tlenz * @@ -53,6 +57,19 @@ public class Tests { + JsonObject responseMsg = new JsonObject(); + responseMsg.addProperty( + SSOTransferConstants.SSOCONTAINER_KEY_STATUS, + "OK"); + + + JsonObject levelTwo = new JsonObject(); + levelTwo.addProperty("test", "12345"); + + responseMsg.add("levelTwo", levelTwo ); + + + System.out.println(responseMsg.toString()); // } catch (IOException e) { // // TODO Auto-generated catch block -- cgit v1.2.3 From d945e481a418fcfedba616915cc77eb45ae62827 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 29 Mar 2016 14:04:59 +0200 Subject: fix missing ID in SP metadata --- .../egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java index ab96e4df7..567faf1d8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java @@ -186,6 +186,8 @@ public class PVPMetadataBuilder { entityDescriptor.setValidUntil(date.plusHours(config.getMetadataValidUntil())); entityDescriptor.setSignature(signature); + entityDescriptor.setID(SAML2Utils.getSecureIdentifier()); + //marshall document Marshaller out = Configuration.getMarshallerFactory() -- cgit v1.2.3 From c6edd632f9422a3873a85cd8b38b7e763a4bb5aa Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 29 Mar 2016 14:05:21 +0200 Subject: fix problem in default templates --- .../deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html | 2 +- .../data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html index b0be4a475..7fb0dd881 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/mandate-service-selection.html @@ -3,7 +3,7 @@ - + Anmeldung an Online-Applikation diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html index a9f0c4238..7ae4b3f92 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/sendAssertionFormFull.html @@ -3,7 +3,7 @@ - + Anmeldung an Online-Applikation -- cgit v1.2.3 From bd53025fa776091cd82d0fca57a28a5404fb4f37 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 30 Mar 2016 08:36:03 +0200 Subject: fix problem with XML parser and additional features options --- .../metadata/MOASPMetadataSignatureFilter.java | 26 +++--- .../moa/id/util/ParamValidatorUtils.java | 30 +++++-- .../java/at/gv/egovernment/moa/util/DOMUtils.java | 97 ++++++++++++++++++++-- .../java/test/at/gv/egovernment/moa/AllTests.java | 8 +- .../test/at/gv/egovernment/moa/MOATestCase.java | 23 +++-- .../at/gv/egovernment/moa/util/DOMUtilsTest.java | 8 +- .../parser/CreateXMLSignatureResponseParser.java | 14 +++- .../id/auth/parser/InfoboxReadResponseParser.java | 16 +++- 8 files changed, 174 insertions(+), 48 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MOASPMetadataSignatureFilter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MOASPMetadataSignatureFilter.java index a4ab92f58..3d69b0380 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MOASPMetadataSignatureFilter.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/verification/metadata/MOASPMetadataSignatureFilter.java @@ -23,14 +23,9 @@ package at.gv.egovernment.moa.id.protocols.pvp2x.verification.metadata; import java.io.IOException; -import java.io.StringWriter; -import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; import javax.xml.transform.TransformerFactoryConfigurationError; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; import org.opensaml.saml2.metadata.EntityDescriptor; import org.opensaml.saml2.metadata.provider.FilterException; @@ -41,6 +36,7 @@ import at.gv.egovernment.moa.id.auth.builder.SignatureVerificationUtils; import at.gv.egovernment.moa.id.auth.data.VerifyXMLSignatureResponse; import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.DOMUtils; /** * @author tlenz @@ -69,19 +65,21 @@ public class MOASPMetadataSignatureFilter implements MetadataFilter { EntityDescriptor entityDes = (EntityDescriptor) metadata; //check signature; try { - Transformer transformer = TransformerFactory.newInstance() - .newTransformer(); - StringWriter sw = new StringWriter(); - StreamResult sr = new StreamResult(sw); - DOMSource source = new DOMSource(metadata.getDOM()); - transformer.transform(source, sr); - sw.close(); - String metadataXML = sw.toString(); + byte[] serialized = DOMUtils.serializeNode(metadata.getDOM(), "UTF-8"); + +// Transformer transformer = TransformerFactory.newInstance() +// .newTransformer(); +// StringWriter sw = new StringWriter(); +// StreamResult sr = new StreamResult(sw); +// DOMSource source = new DOMSource(metadata.getDOM()); +// transformer.transform(source, sr); +// sw.close(); +// String metadataXML = sw.toString(); SignatureVerificationUtils sigVerify = new SignatureVerificationUtils(); VerifyXMLSignatureResponse result = sigVerify.verify( - metadataXML.getBytes(), trustProfileID); + serialized, trustProfileID); //check signature-verification result if (result.getSignatureCheckCode() != 0) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java index f97d646b6..47ea91753 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java @@ -46,20 +46,20 @@ package at.gv.egovernment.moa.id.util; +import java.io.ByteArrayInputStream; import java.io.IOException; -import java.io.StringReader; import java.net.MalformedURLException; import java.net.URL; +import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; -import org.xml.sax.InputSource; import org.xml.sax.SAXException; import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; @@ -68,12 +68,22 @@ import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProviderFactory; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.DOMUtils; import at.gv.egovernment.moa.util.MiscUtil; import at.gv.egovernment.moa.util.StringUtils; public class ParamValidatorUtils extends MOAIDAuthConstants{ + private static final Map parserFeatures = + Collections.unmodifiableMap(new HashMap() { + private static final long serialVersionUID = 1L; + { + put(DOMUtils.DISALLOW_DOCTYPE_FEATURE, true); + + } + }); + /** * Checks if the given target is valid * @param target HTTP parameter from request @@ -482,11 +492,13 @@ public class ParamValidatorUtils extends MOAIDAuthConstants{ return false; Logger.debug("Ueberpruefe Parameter XMLDocument"); - try { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder builder = factory.newDocumentBuilder(); - InputSource is = new InputSource(new StringReader(document)); - builder.parse(is); + try { + DOMUtils.parseXmlValidating(new ByteArrayInputStream(document.getBytes()), parserFeatures); + +// DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); +// DocumentBuilder builder = factory.newDocumentBuilder(); +// InputSource is = new InputSource(new StringReader(document)); +// builder.parse(is); Logger.debug("Parameter XMLDocument erfolgreich ueberprueft"); return true; diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java index 0a07fc4a7..95cd63643 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/util/DOMUtils.java @@ -33,6 +33,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import java.util.Vector; @@ -115,7 +116,7 @@ public class DOMUtils { private static final String EXTERNAL_PARAMETER_ENTITIES_FEATURE = "http://xml.org/sax/features/external-parameter-entities"; - private static final String DISALLOW_DOCTYPE_FEATURE = + public static final String DISALLOW_DOCTYPE_FEATURE = "http://apache.org/xml/features/disallow-doctype-decl"; @@ -205,7 +206,8 @@ public class DOMUtils { String externalSchemaLocations, String externalNoNamespaceSchemaLocation, EntityResolver entityResolver, - ErrorHandler errorHandler) + ErrorHandler errorHandler, + Map parserFeatures) throws SAXException, IOException, ParserConfigurationException { DOMParser parser; @@ -247,8 +249,25 @@ public class DOMUtils { parser.setFeature(EXTERNAL_GENERAL_ENTITIES_FEATURE, false); parser.setFeature(EXTERNAL_PARAMETER_ENTITIES_FEATURE, false); + //set external added parser features + if (parserFeatures != null) { + for (Entry el : parserFeatures.entrySet()) { + String key = el.getKey(); + if (MiscUtil.isNotEmpty(key)) { + Object value = el.getValue(); + if (value != null && value instanceof Boolean) + parser.setFeature(key, (boolean)value); + + else + Logger.warn("This XML parser only allows features with 'boolean' values"); + + } else + Logger.warn("Can not set 'null' feature to XML parser"); + } + } + //fix XXE problem - parser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); + //parser.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true); if (validating) { @@ -346,6 +365,7 @@ public class DOMUtils { * @param externalNoNamespaceSchemaLocation The schema location of the * schema for elements without a namespace, the same way it is accepted by the * xsi:noNamespaceSchemaLocation attribute. + * @param parserFeatures * @return The parsed XML document as a DOM tree. * @throws SAXException An error occurred parsing the document. * @throws IOException An error occurred reading the document. @@ -356,7 +376,7 @@ public class DOMUtils { InputStream inputStream, boolean validating, String externalSchemaLocations, - String externalNoNamespaceSchemaLocation) + String externalNoNamespaceSchemaLocation, Map parserFeatures) throws SAXException, IOException, ParserConfigurationException { @@ -367,9 +387,50 @@ public class DOMUtils { externalSchemaLocations, externalNoNamespaceSchemaLocation, new MOAEntityResolver(), - new MOAErrorHandler()); + new MOAErrorHandler(), + parserFeatures); } + /** + * Parse an XML document from a String. + * + * It uses a MOAEntityResolver as the EntityResolver + * and a MOAErrorHandler as the ErrorHandler. + * + * @param xmlString The String containing the XML document. + * @param encoding The encoding of the XML document. + * @param validating If true, parse validating. + * @param externalSchemaLocations A String containing namespace + * URI to schema location pairs, the same way it is accepted by the xsi: + * schemaLocation attribute. + * @param externalNoNamespaceSchemaLocation The schema location of the + * schema for elements without a namespace, the same way it is accepted by the + * xsi:noNamespaceSchemaLocation attribute. + * @return The parsed XML document as a DOM tree. + * @throws SAXException An error occurred parsing the document. + * @throws IOException An error occurred reading the document. + * @throws ParserConfigurationException An error occurred configuring the XML + * parser. + */ + public static Document parseDocument( + String xmlString, + String encoding, + boolean validating, + String externalSchemaLocations, + String externalNoNamespaceSchemaLocation, + Map parserFeatures) + throws SAXException, IOException, ParserConfigurationException { + + InputStream in = new ByteArrayInputStream(xmlString.getBytes(encoding)); + return parseDocument( + in, + validating, + externalSchemaLocations, + externalNoNamespaceSchemaLocation, + parserFeatures); + } + + /** * Parse an XML document from a String. * @@ -404,7 +465,8 @@ public class DOMUtils { in, validating, externalSchemaLocations, - externalNoNamespaceSchemaLocation); + externalNoNamespaceSchemaLocation, + null); } /** @@ -453,7 +515,26 @@ public class DOMUtils { public static Element parseXmlValidating(InputStream inputStream) throws ParserConfigurationException, SAXException, IOException { return DOMUtils - .parseDocument(inputStream, true, Constants.ALL_SCHEMA_LOCATIONS, null) + .parseDocument(inputStream, true, Constants.ALL_SCHEMA_LOCATIONS, null, null) + .getDocumentElement(); + } + + /** + * A convenience method to parse an XML document validating. + * + * @param inputStream The InputStream containing the XML + * document. + * @param parserFeatures Set additional features to XML parser + * @return The root element of the parsed XML document. + * @throws SAXException An error occurred parsing the document. + * @throws IOException An error occurred reading the document. + * @throws ParserConfigurationException An error occurred configuring the XML + * parser. + */ + public static Element parseXmlValidating(InputStream inputStream, Map parserFeatures) + throws ParserConfigurationException, SAXException, IOException { + return DOMUtils + .parseDocument(inputStream, true, Constants.ALL_SCHEMA_LOCATIONS, null, parserFeatures) .getDocumentElement(); } @@ -471,7 +552,7 @@ public class DOMUtils { public static Element parseXmlNonValidating(InputStream inputStream) throws ParserConfigurationException, SAXException, IOException { return DOMUtils - .parseDocument(inputStream, false, Constants.ALL_SCHEMA_LOCATIONS, null) + .parseDocument(inputStream, false, Constants.ALL_SCHEMA_LOCATIONS, null, null) .getDocumentElement(); } diff --git a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java index ba7a0edc4..c0a93bf03 100644 --- a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java +++ b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/AllTests.java @@ -24,16 +24,10 @@ package test.at.gv.egovernment.moa; -import test.at.gv.egovernment.moa.util.DOMUtilsTest; -import test.at.gv.egovernment.moa.util.DateTimeUtilsTest; -import test.at.gv.egovernment.moa.util.KeyStoreUtilsTest; -import test.at.gv.egovernment.moa.util.SSLUtilsTest; -import test.at.gv.egovernment.moa.util.XPathUtilsTest; - import junit.awtui.TestRunner; import junit.framework.Test; import junit.framework.TestSuite; - + /** * @author patrick * @version $Id$ diff --git a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java index 5d1c5371a..66bf1faff 100644 --- a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java +++ b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/MOATestCase.java @@ -26,18 +26,19 @@ package test.at.gv.egovernment.moa; import java.io.FileInputStream; import java.io.StringReader; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; - import org.xml.sax.InputSource; -import junit.framework.TestCase; - import at.gv.egovernment.moa.util.Constants; import at.gv.egovernment.moa.util.DOMUtils; +import junit.framework.TestCase; /** * Base class for MOA test cases. @@ -51,6 +52,16 @@ public class MOATestCase extends TestCase { protected static final String TESTDATA_ROOT = "data/test/"; + protected static final Map parserFeatures = + Collections.unmodifiableMap(new HashMap() { + private static final long serialVersionUID = 1L; + { + put(DOMUtils.DISALLOW_DOCTYPE_FEATURE, true); + + } + }); + + /** * Constructor for MOATestCase. * @param arg0 @@ -67,7 +78,8 @@ public class MOATestCase extends TestCase { new FileInputStream(fileName), false, null, - null); + null, + parserFeatures); } /** @@ -80,7 +92,8 @@ public class MOATestCase extends TestCase { new FileInputStream(fileName), true, Constants.ALL_SCHEMA_LOCATIONS, - null); + null, + parserFeatures); } /** diff --git a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java index 1a2b6904d..7b1c0cb67 100644 --- a/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java +++ b/id/server/moa-id-commons/src/test/java/test/at/gv/egovernment/moa/util/DOMUtilsTest.java @@ -23,6 +23,7 @@ package test.at.gv.egovernment.moa.util; + import java.io.FileInputStream; import java.util.Map; @@ -30,10 +31,9 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; -import test.at.gv.egovernment.moa.*; - import at.gv.egovernment.moa.util.Constants; import at.gv.egovernment.moa.util.DOMUtils; +import test.at.gv.egovernment.moa.MOATestCase; /** * @author Patrick Peck @@ -78,7 +78,8 @@ public class DOMUtilsTest extends MOATestCase { new FileInputStream(fileName), true, Constants.ALL_SCHEMA_LOCATIONS, - null); + null, + parserFeatures); } public void testParseCreateXMLSignature() throws Exception { @@ -113,6 +114,7 @@ public class DOMUtilsTest extends MOATestCase { new FileInputStream(fileName), false, null, + null, null); } diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java index b39cf9e9b..eca231094 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/CreateXMLSignatureResponseParser.java @@ -49,7 +49,10 @@ package at.gv.egovernment.moa.id.auth.parser; import java.io.ByteArrayInputStream; import java.io.InputStream; import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -96,6 +99,15 @@ public class CreateXMLSignatureResponseParser { /** This is the root element of the CreateXMLsignatureResponse */ private Element sigResponse_; + private static final Map parserFeatures = + Collections.unmodifiableMap(new HashMap() { + private static final long serialVersionUID = 1L; + { + put(DOMUtils.DISALLOW_DOCTYPE_FEATURE, true); + + } + }); + /** * Parses and validates the document given as string and extracts the * root element. @@ -156,7 +168,7 @@ public class CreateXMLSignatureResponseParser { private void init(InputStream is) throws AuthenticationException, ParseException, BKUException { try { - Element responseElem = DOMUtils.parseXmlValidating(is); + Element responseElem = DOMUtils.parseXmlValidating(is, parserFeatures); if ("CreateXMLSignatureResponse".equals(responseElem.getLocalName())) { sigResponse_ = responseElem; diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java index 31c91cd40..90fd7e1c7 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/parser/InfoboxReadResponseParser.java @@ -50,6 +50,9 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.security.cert.CertificateException; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; @@ -82,6 +85,16 @@ public class InfoboxReadResponseParser { /** This is the root element of the XML-Document provided by the Security Layer Card*/ private Element infoBoxElem_; + private static final Map parserFeatures = + Collections.unmodifiableMap(new HashMap() { + private static final long serialVersionUID = 1L; + { + put(DOMUtils.DISALLOW_DOCTYPE_FEATURE, true); + + } + }); + + /** * Parses and validates the document given as string and extracts the * root element. @@ -132,7 +145,8 @@ public class InfoboxReadResponseParser { private void init(InputStream is) throws AuthenticationException, ParseException, BKUException { try { - Element responseElem = DOMUtils.parseXmlValidating(is); + + Element responseElem = DOMUtils.parseXmlValidating(is, parserFeatures); if ("InfoboxReadResponse".equals(responseElem.getLocalName())) { infoBoxElem_ = responseElem; -- cgit v1.2.3 From c33f026d4e41a0d5faa27cd8cc924988343b95fd Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 30 Mar 2016 08:36:36 +0200 Subject: add 'ID' attribute to metadata 'entityDescriptor' element --- .../egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java index 567faf1d8..855925272 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/PVPMetadataBuilder.java @@ -184,9 +184,10 @@ public class PVPMetadataBuilder { } else { entityDescriptor.setValidUntil(date.plusHours(config.getMetadataValidUntil())); + entityDescriptor.setID(SAML2Utils.getSecureIdentifier()); entityDescriptor.setSignature(signature); - entityDescriptor.setID(SAML2Utils.getSecureIdentifier()); + //marshall document -- cgit v1.2.3 From 8ca28920c78f58c1e1bd48bd5805a9f939f40c65 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 30 Mar 2016 13:19:37 +0200 Subject: fix possible eIDAS attributes in IDP metadata --- .../moa/id/auth/modules/eidas/Constants.java | 54 +++++++++++++++++++--- .../eidas/engine/MOAeIDAsExtensionProcessor.java | 48 +++++++++++++++++++ .../auth/modules/eidas/utils/SAMLEngineUtils.java | 8 +++- 3 files changed, 103 insertions(+), 7 deletions(-) create mode 100644 id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDAsExtensionProcessor.java (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/Constants.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/Constants.java index 8471439e2..d93d739b1 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/Constants.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/Constants.java @@ -22,6 +22,16 @@ */ package at.gv.egovernment.moa.id.auth.modules.eidas; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +import org.opensaml.xml.encryption.EncryptionConstants; +import org.opensaml.xml.signature.SignatureConstants; + +import eu.eidas.auth.engine.core.eidas.EidasAttributesTypes; +import eu.eidas.auth.engine.core.validator.eidas.EIDASAttributes; + /** * @author tlenz * @@ -60,23 +70,55 @@ public class Constants { public static final long CONFIG_PROPS_METADATA_GARBAGE_TIMEOUT = 7 * 24 * 60 * 60 * 1000; //remove unused eIDAS metadata after 7 days //eIDAS attribute names - public static final String eIDAS_ATTR_PERSONALIDENTIFIER = "PersonIdentifier"; - public static final String eIDAS_ATTR_DATEOFBIRTH = "DateOfBirth"; - public static final String eIDAS_ATTR_CURRENTGIVENNAME = "CurrentGivenName"; - public static final String eIDAS_ATTR_CURRENTFAMILYNAME = "CurrentFamilyName"; + public static final String eIDAS_ATTR_PERSONALIDENTIFIER = EIDASAttributes.ATTRIBUTE_NAME_SUFFIX_PERSONIDENTIFIER; + public static final String eIDAS_ATTR_DATEOFBIRTH = EIDASAttributes.ATTRIBUTE_NAME_SUFFIX_DATEOFBIRTH; + public static final String eIDAS_ATTR_CURRENTGIVENNAME = EIDASAttributes.ATTRIBUTE_NAME_SUFFIX_FIRSTNAME; + public static final String eIDAS_ATTR_CURRENTFAMILYNAME = EIDASAttributes.ATTRIBUTE_NAME_SUFFIX_GIVENNAME; //http endpoint descriptions public static final String eIDAS_HTTP_ENDPOINT_SP_POST = "/eidas/sp/post"; public static final String eIDAS_HTTP_ENDPOINT_SP_REDIRECT = "/eidas/sp/redirect"; - public static final String eIDAS_HTTP_ENDPOINT_IDP_POST = "/eidas/idp/post"; + public static final String eIDAS_HTTP_ENDPOINT_IDP_POST = "/eidas/idp/post"; + public static final String eIDAS_HTTP_ENDPOINT_IDP_COLLEAGUEREQUEST = "/eidas/ColleagueRequest"; public static final String eIDAS_HTTP_ENDPOINT_IDP_REDIRECT = "/eidas/idp/redirect"; public static final String eIDAS_HTTP_ENDPOINT_METADATA = "/eidas/metadata"; + //Event-Codes for Revisionslog public static final int eIDAS_REVERSIONSLOG_METADATA = 3400; public static final int eIDAS_REVERSIONSLOG_IDP_AUTHREQUEST = 3401; public static final int eIDAS_REVERSIONSLOG_IDP_AUTHRESPONSE = 3402; public static final int eIDAS_REVERSIONSLOG_SP_AUTHREQUEST= 3403; public static final int eIDAS_REVERSIONSLOG_SP_AUTHRESPONSE= 3404; - + + //metadata constants + public final static Map METADATA_POSSIBLE_ATTRIBUTES = Collections.unmodifiableMap( + new HashMap(){ + private static final long serialVersionUID = 1L; + { + put(EIDASAttributes.ATTRIBUTE_GIVENNAME, EidasAttributesTypes.NATURAL_PERSON_MANDATORY); + put(EIDASAttributes.ATTRIBUTE_FIRSTNAME, EidasAttributesTypes.NATURAL_PERSON_MANDATORY); + put(EIDASAttributes.ATTRIBUTE_DATEOFBIRTH, EidasAttributesTypes.NATURAL_PERSON_MANDATORY); + put(EIDASAttributes.ATTRIBUTE_PERSONIDENTIFIER, EidasAttributesTypes.NATURAL_PERSON_MANDATORY); + + //TODO: add additional attributes for eIDAS with mandates + //put(EIDASAttributes.ATTRIBUTE_LEGALIDENTIFIER, EidasAttributesTypes.LEGAL_PERSON_MANDATORY); + //put(EIDASAttributes.ATTRIBUTE_LEGALNAME, EidasAttributesTypes.LEGAL_PERSON_MANDATORY); + } + } + ); + + public static final String METADATA_ALLOWED_ALG_DIGIST = + SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256 + ";" + + SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA512 ; + + public static final String METADATA_ALLOWED_ALG_SIGN = + SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256 + ";" + + SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA512; + + public static final String METADATA_ALLOWED_ALG_ENCRYPT = + EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES128_GCM + ";" + + EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES192_GCM + ";" + + EncryptionConstants.ALGO_ID_BLOCKCIPHER_AES256_GCM; + } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDAsExtensionProcessor.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDAsExtensionProcessor.java new file mode 100644 index 000000000..5837d7dbf --- /dev/null +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDAsExtensionProcessor.java @@ -0,0 +1,48 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.eidas.engine; + +import java.util.HashSet; +import java.util.Set; + +import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; +import eu.eidas.auth.engine.core.ExtensionProcessorI; +import eu.eidas.auth.engine.core.eidas.EidasExtensionProcessor; + +/** + * @author tlenz + * + */ +public class MOAeIDAsExtensionProcessor extends EidasExtensionProcessor implements ExtensionProcessorI { + + /** + * Add only eIDAS attributes which are supported by Austrian eIDAS node + * + */ + @Override + public Set getSupportedAttributes(){ + Set supportedAttributes=new HashSet( Constants.METADATA_POSSIBLE_ATTRIBUTES.keySet()); + + return supportedAttributes; + } +} diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/SAMLEngineUtils.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/SAMLEngineUtils.java index 8e46f0ef1..8fe44f4d6 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/SAMLEngineUtils.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/SAMLEngineUtils.java @@ -26,9 +26,11 @@ import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.config.MOAIDCertificateManagerConfigurationImpl; import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDASChainingMetadataProvider; import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDASMetadataProviderDecorator; +import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDAsExtensionProcessor; import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.EIDASEngineException; import at.gv.egovernment.moa.logging.Logger; import eu.eidas.auth.engine.EIDASSAMLEngine; +import eu.eidas.auth.engine.core.ExtensionProcessorI; import eu.eidas.engine.exceptions.EIDASSAMLEngineException; import eu.eidas.samlengineconfig.CertificateConfigurationManager; @@ -51,10 +53,14 @@ public class SAMLEngineUtils { EIDASSAMLEngine engine = EIDASSAMLEngine.createSAMLEngine(Constants.eIDAS_SAML_ENGINE_NAME, configManager); - //set Metadata managment to eIDAS SAMLengine + //set metadata management to eIDAS SAMLengine engine.setMetadataProcessor( new MOAeIDASMetadataProviderDecorator( MOAeIDASChainingMetadataProvider.getInstance())); + + //set MOA specific extension processor + ExtensionProcessorI extensionProcessor = new MOAeIDAsExtensionProcessor(); + engine.setExtensionProcessor(extensionProcessor); eIDASEngine = engine; -- cgit v1.2.3 From d44d87570e2c70a16b0f2797d2180b71ba00bc39 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 30 Mar 2016 13:20:17 +0200 Subject: fix missing Spring bean definitions --- .../moa/id/auth/modules/eidas/eIDASSignalServlet.java | 4 ++-- .../egovernment/moa/id/protocols/eidas/EIDASProtocol.java | 13 ++++++++++++- .../src/main/resources/moaid_eidas_auth.beans.xml | 5 +++++ 3 files changed, 19 insertions(+), 3 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java index 9adffe6fd..16d909331 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/eIDASSignalServlet.java @@ -24,7 +24,6 @@ package at.gv.egovernment.moa.id.auth.modules.eidas; import java.io.IOException; -import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -46,7 +45,8 @@ public class eIDASSignalServlet extends AbstractProcessEngineSignalController { public eIDASSignalServlet() { super(); Logger.debug("Registering servlet " + getClass().getName() + - " with mappings '/eidas/sp/post' and '/eidas/sp/redirect'."); + " with mappings '"+ Constants.eIDAS_HTTP_ENDPOINT_SP_POST + + "' and '"+ Constants.eIDAS_HTTP_ENDPOINT_SP_REDIRECT + "'."); } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java index 1c0e60c63..1d1fc5ede 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java @@ -27,6 +27,7 @@ import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -47,15 +48,25 @@ import eu.eidas.auth.commons.EIDASUtil; import eu.eidas.auth.engine.EIDASSAMLEngine; /** - * eIDAS Protocol Support for outbound authentication + * eIDAS Protocol Support for outbound authentication and metadata generation * * @author tlenz */ +@Controller public class EIDASProtocol extends AbstractAuthProtocolModulController { public static final String NAME = EIDASProtocol.class.getName(); public static final String PATH = "eidas"; + public EIDASProtocol() { + super(); + Logger.debug("Registering servlet " + getClass().getName() + + " with mappings '" + Constants.eIDAS_HTTP_ENDPOINT_METADATA + + "' and '" + Constants.eIDAS_HTTP_ENDPOINT_IDP_COLLEAGUEREQUEST + + "' and '" + Constants.eIDAS_HTTP_ENDPOINT_IDP_POST +"'."); + + } + public String getName() { return NAME; } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/resources/moaid_eidas_auth.beans.xml b/id/server/modules/moa-id-module-eIDAS/src/main/resources/moaid_eidas_auth.beans.xml index a3f5042a1..5d79d082a 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/resources/moaid_eidas_auth.beans.xml +++ b/id/server/modules/moa-id-module-eIDAS/src/main/resources/moaid_eidas_auth.beans.xml @@ -9,6 +9,11 @@ http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd"> + + + Date: Wed, 30 Mar 2016 13:20:55 +0200 Subject: add additional information to eIDAS metadata --- .../id/protocols/eidas/EidasMetaDataRequest.java | 61 ++++++++++++++++++---- 1 file changed, 51 insertions(+), 10 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java index 4e45d2f47..60ffb3673 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java @@ -16,10 +16,13 @@ *******************************************************************************/ package at.gv.egovernment.moa.id.protocols.eidas; +import java.util.List; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.slf4j.Logger; +import org.opensaml.saml2.metadata.ContactPerson; +import org.opensaml.saml2.metadata.Organization; import org.springframework.http.MediaType; import org.springframework.stereotype.Service; @@ -27,12 +30,15 @@ import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.EIDASEngineException; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils; 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.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.data.IAuthData; import at.gv.egovernment.moa.id.data.SLOInformationInterface; import at.gv.egovernment.moa.id.moduls.IAction; +import at.gv.egovernment.moa.id.protocols.pvp2x.config.PVPConfiguration; +import at.gv.egovernment.moa.logging.Logger; import eu.eidas.auth.engine.EIDASSAMLEngine; -import eu.eidas.auth.engine.core.eidas.SPType; +import eu.eidas.auth.engine.metadata.Contact; import eu.eidas.auth.engine.metadata.MetadataConfigParams; import eu.eidas.auth.engine.metadata.MetadataGenerator; import eu.eidas.engine.exceptions.SAMLEngineException; @@ -43,7 +49,6 @@ import eu.eidas.engine.exceptions.SAMLEngineException; */ @Service("EidasMetaDataRequest") public class EidasMetaDataRequest implements IAction { - private Logger logger = org.slf4j.LoggerFactory.getLogger(EidasMetaDataRequest.class); /* (non-Javadoc) * @see at.gv.egovernment.moa.id.moduls.IAction#processRequest(at.gv.egovernment.moa.id.moduls.IRequest, javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, at.gv.egovernment.moa.id.data.IAuthData) @@ -53,9 +58,7 @@ public class EidasMetaDataRequest implements IAction { HttpServletRequest httpReq, HttpServletResponse httpResp, IAuthData authData) throws MOAIDException { - try { - logger.debug("EidasMetaDataServlet GET"); - + try { String pubURLPrefix = req.getAuthURL(); String metadata_url = pubURLPrefix + Constants.eIDAS_HTTP_ENDPOINT_METADATA; @@ -63,7 +66,7 @@ public class EidasMetaDataRequest implements IAction { String sp_return_url = pubURLPrefix + Constants.eIDAS_HTTP_ENDPOINT_SP_POST; String metaData = generateMetadata(metadata_url, sp_return_url); - logger.trace(metaData); + Logger.trace(metaData); httpResp.setContentType(MediaType.APPLICATION_XML.getType()); httpResp.getWriter().print(metaData); @@ -105,11 +108,49 @@ public class EidasMetaDataRequest implements IAction { generator.setConfigParams(mcp); generator.initialize(engine); - mcp.setEntityID(metadata_url); - mcp.setSpType(SPType.DEFAULT_VALUE); + mcp.setEntityID(metadata_url); mcp.setAssertionConsumerUrl(sp_return_url); - mcp.setAssuranceLevel("http://eidas.europa.eu/LoA/substantial"); // TODO make configurable + + //TODO: make it configurable + mcp.setAuthnRequestsSigned(true); + mcp.setWantAssertionsSigned(true); + mcp.setAssuranceLevel("http://eidas.europa.eu/LoA/substantial"); + + //must be set in request, because it could be different for every online-application + //mcp.setSpType(SPType.DEFAULT_VALUE); + + mcp.setDigestMethods(Constants.METADATA_ALLOWED_ALG_DIGIST); + mcp.setSigningMethods(Constants.METADATA_ALLOWED_ALG_SIGN); + mcp.setEncryptionAlgorithms(Constants.METADATA_ALLOWED_ALG_ENCRYPT); + + //add organisation information from PVP metadata information + Organization pvpOrganisation = null; + try { + pvpOrganisation = PVPConfiguration.getInstance().getIDPOrganisation(); + Contact technicalContact = new Contact(); + + List contacts = PVPConfiguration.getInstance().getIDPContacts(); + if (contacts != null && contacts.size() >= 1) { + technicalContact.setEmail(contacts.get(0).getEmailAddresses().get(0).getAddress()); + technicalContact.setGivenName(contacts.get(0).getGivenName().getName()); + technicalContact.setSurName(contacts.get(0).getSurName().getName()); + technicalContact.setPhone(contacts.get(0).getTelephoneNumbers().get(0).getNumber()); + mcp.setTechnicalContact(technicalContact ); + + } + + if (pvpOrganisation != null) { + mcp.setNodeUrl(pvpOrganisation.getURLs().get(0).getURL().getLocalString()); + mcp.setCountryName("Austria"); + technicalContact.setCompany(pvpOrganisation.getDisplayNames().get(0).getName().getLocalString()); + } + + } catch (ConfigurationException | NullPointerException e) { + Logger.warn("Can not load Organisation or Contact from Configuration", e); + + } + generator.addSPRole(); generator.addIDPRole(); -- cgit v1.2.3 From 5c4a5f2877264aa354cf909ce598ff9d84139022 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 30 Mar 2016 13:21:18 +0200 Subject: set correct SPType in eIDAS authnRequest --- .../moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java index 7f3c4bddc..c953e40ef 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java @@ -139,7 +139,12 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { authnRequest.setEidasNameidFormat(EIDASAuthnRequest.NAMEID_FORMAT_UNSPECIFIED); authnRequest.setEidasLoA(EidasLoaLevels.LOW.stringValue()); authnRequest.setEidasLoACompareType(EidasLoaCompareType.MINIMUM.stringValue()); - authnRequest.setSPType(SPType.DEFAULT_VALUE); + + //set correct SPType for this online application + if (oaConfig.getBusinessService()) + authnRequest.setSPType("private"); + else + authnRequest.setSPType(SPType.DEFAULT_VALUE); engine.initRequestedAttributes(pAttList); authnRequest = engine.generateEIDASAuthnRequest(authnRequest); -- cgit v1.2.3 From fb01851bc8fb7dfede70ddbe251f3e416bbd36b3 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 30 Mar 2016 13:21:59 +0200 Subject: add Metadata reload functionality to getRole(*) methods --- .../eidas/engine/MOAeIDASChainingMetadataProvider.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java index d0454688a..491139fb5 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java @@ -341,12 +341,22 @@ public class MOAeIDASChainingMetadataProvider implements ObservableMetadataProvi public List getRole(String entityID, QName roleName) throws MetadataProviderException { - return internalProvider.getRole(entityID, roleName); + EntityDescriptor entityDesc = getEntityDescriptor(entityID); + if (entityDesc != null) + return entityDesc.getRoleDescriptors(roleName); + + else + return null; } public RoleDescriptor getRole(String entityID, QName roleName, String supportedProtocol) throws MetadataProviderException { - return internalProvider.getRole(entityID, roleName, supportedProtocol); + EntityDescriptor entityDesc = getEntityDescriptor(entityID); + if (entityDesc != null) + return internalProvider.getRole(entityID, roleName, supportedProtocol); + + else + return null; } /* (non-Javadoc) -- cgit v1.2.3 From 88fe47db569a262a4631e002187f54979d1ab9a6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 30 Mar 2016 13:36:35 +0200 Subject: extract eIDAS SPType from inbound AuthnRequest --- .../at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java index 1d1fc5ede..1996c3d7c 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java @@ -186,6 +186,15 @@ public class EIDASProtocol extends AbstractAuthProtocolModulController { throw new AuthenticationException("stork.12", new Object[]{pendingReq.getOAURL()}); pendingReq.setOnlineApplicationConfiguration(oaConfig); + String spType = samlReq.getSPType(); + if (MiscUtil.isEmpty(spType)) { + Logger.info("Load SPType from metadata ... IS NOT IMPLEMENTED YET!!!"); + //TODO: maybe implement this if required + + } + + Logger.debug("eIDAS request has SPType:" + spType); + } catch(Exception e) { Logger.error("error in preprocessing step", e); throw new MOAIDException("error in preprocessing step", null); -- cgit v1.2.3 From 38a8abe06596847cda4e4fd9d5b4f5585c67fc52 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Wed, 30 Mar 2016 16:44:02 +0200 Subject: implement first parts of eIDAS module error handling and error-response messaging --- .../resources/properties/id_messages_de.properties | 12 +- .../protocol_response_statuscodes_de.properties | 11 ++ .../engine/MOAeIDASChainingMetadataProvider.java | 54 ++++++-- .../engine/MOAeIDASMetadataProviderDecorator.java | 2 + .../eidas/exceptions/EIDASEngineException.java | 25 +++- .../eidas/exceptions/eIDASAttributeException.java | 18 ++- .../eIDASAuthnRequestProcessingException.java | 80 ++++++++++++ .../eIDASAuthnRequestValidationException.java | 59 +++++++++ .../modules/eidas/exceptions/eIDASException.java | 59 +++++++++ .../exceptions/eIDASResponseBuildException.java | 62 +++++++++ .../eidas/tasks/CreateIdentityLinkTask.java | 29 +++-- .../eidas/tasks/GenerateAuthnRequestTask.java | 24 ++-- .../eidas/tasks/ReceiveAuthnResponseTask.java | 12 +- .../auth/modules/eidas/utils/SAMLEngineUtils.java | 2 +- .../moa/id/protocols/eidas/EIDASProtocol.java | 139 +++++++++++++++++++-- .../id/protocols/eidas/EidasMetaDataRequest.java | 6 +- .../eidas/eIDASAuthenticationRequest.java | 4 +- 17 files changed, 538 insertions(+), 60 deletions(-) create mode 100644 id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAuthnRequestProcessingException.java create mode 100644 id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAuthnRequestValidationException.java create mode 100644 id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASException.java create mode 100644 id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASResponseBuildException.java (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index a579dd80b..6b48750d2 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -227,7 +227,7 @@ validator.73=Das MIS-Vollmachtenservice und das ELGA-Vollmachtenservice k\u00f6n ssl.01=Validierung des SSL-Server-Endzertifikates hat fehlgeschlagen stork.00=STORK SAML AuthnRequest konnte nicht signiert werden -stork.01=STORK SAML AuthnRequest nicht g\u00FCltig +stork.01=STORK SAML AuthnRequest nicht g\u00FCltig. Reason:{0} stork.02=STORK SAML AuthnRequest kann nicht an folgende URL geschickt werden: {0} stork.04=STORK SAML Response konnte nicht decodiert werden stork.05=STORK SAML Response Validierung fehlgeschlagen @@ -256,6 +256,16 @@ stork.27=Fehler bei der Verarbeitung von STORKRequest. stork.28=Fehler bei der Umwandelung von QAA Daten. stork.29=Fehler bei der Generierung von STORK-Attribut (eIdentifier/eLPIdentifier) +eIDAS.00=eIDAS Engine initialization FAILED. Reason:{0} +eIDAS.01=Received eIDAS AuthnRequest is not valid. Reason:{0} +eIDAS.02=Generate eIDAS AuthnRequest FAILED. Reason:{0} +eIDAS.03=Can not connect to eIDAS Node. Reason:No CitizenCountry selected. +eIDAS.04=Can not connect to eIDAS Node. Reason:{0} is not a valid CitizenCountry. +eIDAS.05=Can not generate eIDAS metadata. Reason:{0} +eIDAS.06=Received eIDAS AuthnRequest can not processed. Reason:{0} +eIDAS.07=Missing eIDAS-Attribute:{0} +eIDAS.08=No valid eIDAs-Node configuration for enityID:{0} + pvp2.00={0} ist kein gueltiger consumer service index pvp2.01=Fehler beim kodieren der PVP2 Antwort pvp2.02=Ungueltiges Datumsformat diff --git a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties index 653e073a2..92e231bd0 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties @@ -213,6 +213,17 @@ stork.19=1203 stork.20=1204 stork.21=1205 +eIDAS.00=TODO +eIDAS.01=TODO +eIDAS.02=TODO +eIDAS.03=TODO +eIDAS.04=TODO +eIDAS.05=TODO +eIDAS.06=TODO +eIDAS.07=TODO +eIDAS.08=TODO + + pvp2.01=6100 pvp2.06=6100 pvp2.10=6100 diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java index 491139fb5..80a2734f2 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASChainingMetadataProvider.java @@ -18,6 +18,7 @@ import org.opensaml.saml2.metadata.EntitiesDescriptor; import org.opensaml.saml2.metadata.EntityDescriptor; import org.opensaml.saml2.metadata.RoleDescriptor; import org.opensaml.saml2.metadata.provider.ChainingMetadataProvider; +import org.opensaml.saml2.metadata.provider.FilterException; import org.opensaml.saml2.metadata.provider.HTTPMetadataProvider; import org.opensaml.saml2.metadata.provider.MetadataFilter; import org.opensaml.saml2.metadata.provider.MetadataProvider; @@ -65,7 +66,7 @@ public class MOAeIDASChainingMetadataProvider implements ObservableMetadataProvi private MOAeIDASChainingMetadataProvider() { internalProvider = new ChainingMetadataProvider(); lastAccess = new HashMap(); - + } /* (non-Javadoc) @@ -92,12 +93,13 @@ public class MOAeIDASChainingMetadataProvider implements ObservableMetadataProvi } } - if (!expiredEntities.isEmpty()) { - ChainingMetadataProvider chainProvider = (ChainingMetadataProvider) internalProvider; - - //get all actually loaded metadata providers - Map loadedproviders = getAllActuallyLoadedProviders(); + ChainingMetadataProvider chainProvider = (ChainingMetadataProvider) internalProvider; + boolean isUpdateRequired = false; + //get all actually loaded metadata providers + Map loadedproviders = getAllActuallyLoadedProviders(); + + if (!expiredEntities.isEmpty()) { for (String expired : expiredEntities) { if (loadedproviders.containsKey(expired)) { HTTPMetadataProvider provider = loadedproviders.get(expired); @@ -107,7 +109,8 @@ public class MOAeIDASChainingMetadataProvider implements ObservableMetadataProvi //remove from map loadedproviders.remove(expired); - + isUpdateRequired = true; + /*OpenSAML ChainingMetadataProvider can not remove a MetadataProvider (UnsupportedOperationException) *The ChainingMetadataProvider use internal a unmodifiableList to hold all registrated MetadataProviders.*/ //chainProvider.removeMetadataProvider(provider); @@ -118,18 +121,43 @@ public class MOAeIDASChainingMetadataProvider implements ObservableMetadataProvi Logger.warn("eIDAS metadata for EntityID: " + expired + " is marked as unsed, but no loaded metadata provider is found."); - } + } + } + //check signature of all metadata which are actually loaded + List nonValidMetadataProvider = new ArrayList(); + for (HTTPMetadataProvider provider : loadedproviders.values()) { + try { + provider.getMetadataFilter().doFilter(provider.getMetadata()); + + } catch (FilterException | MetadataProviderException e) { + Logger.info("eIDAS MetadataProvider: " + provider.getMetadataURI() + + " is not valid any more. Reason:" + e.getMessage()); + if (Logger.isDebugEnabled()) + Logger.warn("Reason", e); + + nonValidMetadataProvider.add(provider.getMetadataURI()); + + } + } + for (String el : nonValidMetadataProvider) { + loadedproviders.remove(el); + isUpdateRequired = true; + + } + + //update chaining metadata-provider if it is required + if (isUpdateRequired) { try { synchronized (chainProvider) { chainProvider.setProviders(new ArrayList(loadedproviders.values())); - + emitChangeEvent(); } - + } catch (MetadataProviderException e) { Logger.warn("ReInitalize eIDASA MetaDataProvider is not possible! MOA-ID Instance has to be restarted manualy", e); - + } } } @@ -184,7 +212,7 @@ public class MOAeIDASChainingMetadataProvider implements ObservableMetadataProvi httpProvider.setMetadataFilter(filter); httpProvider.initialize(); - + return httpProvider; } catch (Throwable e) { @@ -277,7 +305,7 @@ public class MOAeIDASChainingMetadataProvider implements ObservableMetadataProvi } - + public boolean requireValidMetadata() { return internalProvider.requireValidMetadata(); } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASMetadataProviderDecorator.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASMetadataProviderDecorator.java index e3ae5c046..7537c4d84 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASMetadataProviderDecorator.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/engine/MOAeIDASMetadataProviderDecorator.java @@ -94,6 +94,8 @@ public class MOAeIDASMetadataProviderDecorator implements MetadataProcessorI { throws SAMLEngineException { //Do nothing, because metadata signature is already validated during //metadata provider initialization + + //TODO: maybe signature validation is needed on every request } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/EIDASEngineException.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/EIDASEngineException.java index 95690bbeb..234c4e038 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/EIDASEngineException.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/EIDASEngineException.java @@ -22,19 +22,21 @@ */ package at.gv.egovernment.moa.id.auth.modules.eidas.exceptions; +import org.opensaml.saml2.core.StatusCode; /** * @author tlenz * */ -public class EIDASEngineException extends Exception { +public class EIDASEngineException extends eIDASException { /** + * @param objects * @param string * @param e */ - public EIDASEngineException(String string, Throwable e) { - super(string, e); + public EIDASEngineException(String msg, Object[] objects, Throwable e) { + super(msg, objects, e); } /** @@ -42,4 +44,21 @@ public class EIDASEngineException extends Exception { */ private static final long serialVersionUID = 1559812927427153879L; + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASException#getStatusCodeFirstLevel() + */ + @Override + public String getStatusCodeFirstLevel() { + return StatusCode.RESPONDER_URI; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASException#getStatusCodeSecondLevel() + */ + @Override + public String getStatusCodeSecondLevel() { + return StatusCode.AUTHN_FAILED_URI; + } + } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAttributeException.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAttributeException.java index 7840ae2e6..b25895eca 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAttributeException.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAttributeException.java @@ -22,17 +22,31 @@ */ package at.gv.egovernment.moa.id.auth.modules.eidas.exceptions; +import org.opensaml.saml2.core.StatusCode; + /** * @author tlenz * */ -public class eIDASAttributeException extends Exception { +public class eIDASAttributeException extends eIDASException { private static final long serialVersionUID = 1L; public eIDASAttributeException(String message) { - super(message); + super("eIDAS.07", new Object[]{message}); } + @Override + public String getStatusCodeFirstLevel() { + return StatusCode.RESPONDER_URI; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASException#getStatusCodeSecondLevel() + */ + @Override + public String getStatusCodeSecondLevel() { + return StatusCode.AUTHN_FAILED_URI; + } } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAuthnRequestProcessingException.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAuthnRequestProcessingException.java new file mode 100644 index 000000000..c96af37ef --- /dev/null +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAuthnRequestProcessingException.java @@ -0,0 +1,80 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.eidas.exceptions; + +import org.opensaml.saml2.core.StatusCode; + +import at.gv.egovernment.moa.util.MiscUtil; + +/** + * @author tlenz + * + */ +public class eIDASAuthnRequestProcessingException extends eIDASException { + + private String subStatusCode = null; + + /** + * + */ + private static final long serialVersionUID = 1083563877689098041L; + + /** + * @param messageId + * @param parameters + */ + public eIDASAuthnRequestProcessingException(String messageId, Object[] parameters) { + super(messageId, parameters); + } + + public eIDASAuthnRequestProcessingException(String subStatusCode, String messageId, Object[] parameters) { + super(messageId, parameters); + this.subStatusCode = subStatusCode; + } + + public eIDASAuthnRequestProcessingException(String messageId, Object[] parameters, Throwable e) { + super(messageId, parameters, e ); + } + + public eIDASAuthnRequestProcessingException(String subStatusCode, String messageId, Object[] parameters, Throwable e) { + super(messageId, parameters, e ); + this.subStatusCode = subStatusCode; + } + + @Override + public String getStatusCodeFirstLevel() { + return StatusCode.REQUESTER_URI; + + } + + @Override + public String getStatusCodeSecondLevel() { + if (MiscUtil.isNotEmpty(subStatusCode)) + return subStatusCode; + + else + return StatusCode.REQUEST_DENIED_URI; + + } + +} diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAuthnRequestValidationException.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAuthnRequestValidationException.java new file mode 100644 index 000000000..2a15ee18a --- /dev/null +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASAuthnRequestValidationException.java @@ -0,0 +1,59 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.eidas.exceptions; + +import org.opensaml.saml2.core.StatusCode; + +/** + * @author tlenz + * + */ +public class eIDASAuthnRequestValidationException extends eIDASException { + + /** + * + */ + private static final long serialVersionUID = 4353716509546972267L; + + /** + * @param messageId + * @param parameters + */ + public eIDASAuthnRequestValidationException(String messageId, Object[] parameters) { + super(messageId, parameters); + + } + + @Override + public String getStatusCodeFirstLevel() { + return StatusCode.REQUESTER_URI; + + } + + @Override + public String getStatusCodeSecondLevel() { + return StatusCode.RESOURCE_NOT_RECOGNIZED_URI; + + } + +} diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASException.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASException.java new file mode 100644 index 000000000..f42004abc --- /dev/null +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASException.java @@ -0,0 +1,59 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.eidas.exceptions; + +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; + +/** + * @author tlenz + * + */ +public abstract class eIDASException extends MOAIDException { + + /** + * + */ + private static final long serialVersionUID = 1L; + + + public abstract String getStatusCodeFirstLevel(); + public abstract String getStatusCodeSecondLevel(); + + + /** + * @param messageId + * @param parameters + */ + public eIDASException(String messageId, Object[] parameters) { + super(messageId, parameters); + } + + /** + * @param messageId + * @param parameters + */ + public eIDASException(String messageId, Object[] parameters, Throwable e) { + super(messageId, parameters, e); + } + +} diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASResponseBuildException.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASResponseBuildException.java new file mode 100644 index 000000000..0ffcf11ef --- /dev/null +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASResponseBuildException.java @@ -0,0 +1,62 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.eidas.exceptions; + +import org.opensaml.saml2.core.StatusCode; + +/** + * @author tlenz + * + */ +public class eIDASResponseBuildException extends eIDASException { + + /** + * + */ + private static final long serialVersionUID = 4446851988854996919L; + + /** + * @param messageId + * @param parameters + */ + public eIDASResponseBuildException(String messageId, Object[] parameters) { + super(messageId, parameters); + } + + public eIDASResponseBuildException(String messageId, Object[] parameters, Throwable e) { + super(messageId, parameters, e); + } + + @Override + public String getStatusCodeFirstLevel() { + return StatusCode.RESPONDER_URI; + + } + + @Override + public String getStatusCodeSecondLevel() { + return StatusCode.AUTHN_FAILED_URI; + + } + +} diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CreateIdentityLinkTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CreateIdentityLinkTask.java index 7a696cd2f..5d7430dd7 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CreateIdentityLinkTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/CreateIdentityLinkTask.java @@ -22,19 +22,15 @@ */ package at.gv.egovernment.moa.id.auth.modules.eidas.tasks; -import java.io.IOException; import java.io.InputStream; -import java.text.ParseException; import java.text.SimpleDateFormat; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import javax.xml.parsers.ParserConfigurationException; import org.springframework.stereotype.Component; import org.w3c.dom.Element; import org.w3c.dom.Node; -import org.xml.sax.SAXException; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.data.AuthenticationSessionStorageConstants; @@ -94,28 +90,28 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { // - set bpk/wpbk; Node prIdentification = XPathUtils.selectSingleNode(idlassertion, IdentityLinkAssertionParser.PERSON_IDENT_VALUE_XPATH); if(!eIDASAttributes.containsKey(Constants.eIDAS_ATTR_PERSONALIDENTIFIER)) - throw new eIDASAttributeException("PersonalIdentifier is missing"); + throw new eIDASAttributeException(Constants.eIDAS_ATTR_PERSONALIDENTIFIER); String eIdentifier = eIDASAttributes.get(Constants.eIDAS_ATTR_PERSONALIDENTIFIER).getValue().get(0); prIdentification.getFirstChild().setNodeValue(eIdentifier); // - set last name Node prFamilyName = XPathUtils.selectSingleNode(idlassertion, IdentityLinkAssertionParser.PERSON_FAMILY_NAME_XPATH); if(!eIDASAttributes.containsKey(Constants.eIDAS_ATTR_CURRENTFAMILYNAME)) - throw new eIDASAttributeException("currentFamilyName is missing"); + throw new eIDASAttributeException(Constants.eIDAS_ATTR_CURRENTFAMILYNAME); String familyName = eIDASAttributes.get(Constants.eIDAS_ATTR_CURRENTFAMILYNAME).getValue().get(0); prFamilyName.getFirstChild().setNodeValue(familyName); // - set first name Node prGivenName = XPathUtils.selectSingleNode(idlassertion, IdentityLinkAssertionParser.PERSON_GIVEN_NAME_XPATH); if(!eIDASAttributes.containsKey(Constants.eIDAS_ATTR_CURRENTGIVENNAME)) - throw new eIDASAttributeException("currentGivenName is missing"); + throw new eIDASAttributeException(Constants.eIDAS_ATTR_CURRENTGIVENNAME); String givenName = eIDASAttributes.get(Constants.eIDAS_ATTR_CURRENTGIVENNAME).getValue().get(0); prGivenName.getFirstChild().setNodeValue(givenName); // - set date of birth Node prDateOfBirth = XPathUtils.selectSingleNode(idlassertion, IdentityLinkAssertionParser.PERSON_DATE_OF_BIRTH_XPATH); if(!eIDASAttributes.containsKey(Constants.eIDAS_ATTR_DATEOFBIRTH)) - throw new eIDASAttributeException("dateOfBirth is missing"); + throw new eIDASAttributeException(Constants.eIDAS_ATTR_DATEOFBIRTH); String dateOfBirth = eIDASAttributes.get(Constants.eIDAS_ATTR_DATEOFBIRTH).getValue().get(0); dateOfBirth = new SimpleDateFormat("yyyy-MM-dd").format(new SimpleDateFormat("yyyyMMdd").parse(dateOfBirth)); prDateOfBirth.getFirstChild().setNodeValue(dateOfBirth); @@ -149,15 +145,18 @@ public class CreateIdentityLinkTask extends AbstractAuthServletTask { //store MOA-session to database authenticatedSessionStorage.storeSession(moasession); - - } catch (ParseException | MOAIDException | MOADatabaseException | ParserConfigurationException | SAXException | IOException e) { - throw new TaskExecutionException(pendingReq, "IdentityLink generation for foreign person FAILED.", e); - + } catch (eIDASAttributeException e) { throw new TaskExecutionException(pendingReq, "Minimum required eIDAS attributeset not found.", e); - - } - + + } catch (MOAIDException | MOADatabaseException e) { + throw new TaskExecutionException(pendingReq, "IdentityLink generation for foreign person FAILED.", e); + + } catch (Exception e) { + Logger.error("IdentityLink generation for foreign person FAILED.", e); + throw new TaskExecutionException(pendingReq, "IdentityLink generation for foreign person FAILED.", e); + + } } } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java index c953e40ef..c82636a8f 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java @@ -22,7 +22,6 @@ */ package at.gv.egovernment.moa.id.auth.modules.eidas.tasks; -import java.io.IOException; import java.io.StringWriter; import java.util.Collection; @@ -86,13 +85,13 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { if (StringUtils.isEmpty(citizenCountryCode)) { // illegal state; task should not have been executed without a selected country - throw new AuthenticationException("stork.22", new Object[] { pendingReq.getRequestID() }); + throw new AuthenticationException("eIDAS.03", new Object[] { "" }); } CPEPS cpeps = authConfig.getStorkConfig().getCPEPS(citizenCountryCode); if(null == cpeps) { Logger.error("PEPS unknown for country", new Object[] {citizenCountryCode}); - throw new AuthenticationException("Unknown PEPS for citizen country '{}'", new Object[] {citizenCountryCode}); + throw new AuthenticationException("eIDAS.04", new Object[] {citizenCountryCode}); } Logger.debug("Found eIDaS Node/C-PEPS configuration for citizen of country: " + citizenCountryCode); String destination = cpeps.getPepsURL().toString().split(";")[1].trim(); // FIXME convenience for metadata url and assertion destination @@ -184,24 +183,25 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { revisionsLogger.logEvent(oaConfig, pendingReq, MOAIDEventConstants.AUTHPROCESS_PEPS_REQUESTED, authnRequest.getSamlId()); - - } catch (IOException e) { - Logger.error("Velocity IO error: " + e.getMessage()); - throw new MOAIDException("stork.15", null); // TODO + } catch (Exception e) { Logger.error("Velocity general error: " + e.getMessage()); - throw new MOAIDException("stork.15", null); // TODO + throw new MOAIDException("eIDAS.02", new Object[]{e.getMessage()}, e); + } }catch (EIDASSAMLEngineException e){ - Logger.error("eIDAS AuthnRequest generation FAILED.", e); throw new TaskExecutionException(pendingReq, "eIDAS AuthnRequest generation FAILED.", - new EIDASEngineException("Could not generate token for Saml Request", e)); + new EIDASEngineException("eIDAS.00", new Object[]{e.getMessage()}, e)); - } catch (EIDASEngineException | MOAIDException e) { + } catch (MOAIDException e) { throw new TaskExecutionException(pendingReq, "eIDAS AuthnRequest generation FAILED.", e); - } + } catch (Exception e) { + Logger.error("eIDAS AuthnRequest generation FAILED.", e); + throw new TaskExecutionException(pendingReq, e.getMessage(), e); + + } } } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java index 5d1b7fb6f..b73c2a873 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java @@ -88,14 +88,20 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { Logger.error("eIDAS AuthnRequest generation FAILED.", e); revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR); - throw new TaskExecutionException(pendingReq, "eIDAS Response processing FAILED.", - new EIDASEngineException("Could not validate eIDAS response", e)); + throw new TaskExecutionException(pendingReq, "eIDAS AuthnRequest generation FAILED.", + new EIDASEngineException("eIDAS.00", new Object[]{e.getMessage()}, e)); - } catch (EIDASEngineException | MOAIDException | MOADatabaseException e) { + } catch (MOAIDException | MOADatabaseException e) { revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR); throw new TaskExecutionException(pendingReq, "eIDAS Response processing FAILED.", e); + } catch (Exception e) { + Logger.error("eIDAS Response processing FAILED.", e); + revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, + MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR); + throw new TaskExecutionException(pendingReq, e.getMessage(), e); + } } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/SAMLEngineUtils.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/SAMLEngineUtils.java index 8fe44f4d6..eeb8305cf 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/SAMLEngineUtils.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/utils/SAMLEngineUtils.java @@ -66,7 +66,7 @@ public class SAMLEngineUtils { } catch (EIDASSAMLEngineException e) { Logger.error("eIDAS SAMLengine initialization FAILED!", e); - throw new EIDASEngineException("eIDAS SAMLengine initialization FAILED!", e); + throw new EIDASEngineException("eIDAS.00", new Object[]{e.getMessage()}, e); } } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java index 1996c3d7c..24134f1d9 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EIDASProtocol.java @@ -23,17 +23,30 @@ package at.gv.egovernment.moa.id.protocols.eidas; import java.io.IOException; +import java.io.StringWriter; +import java.util.List; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.apache.velocity.app.VelocityEngine; +import org.opensaml.saml2.core.StatusCode; +import org.opensaml.saml2.metadata.AssertionConsumerService; +import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; -import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; +import at.gv.egovernment.moa.id.auth.frontend.velocity.VelocityProvider; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; +import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDASChainingMetadataProvider; +import at.gv.egovernment.moa.id.auth.modules.eidas.engine.MOAeIDASMetadataProviderDecorator; +import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASAuthnRequestProcessingException; +import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASAuthnRequestValidationException; +import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASException; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.MOAPersonalAttributeList; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils; import at.gv.egovernment.moa.id.commons.api.IOAAuthParameters; @@ -44,8 +57,11 @@ import at.gv.egovernment.moa.id.protocols.AbstractAuthProtocolModulController; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.MiscUtil; import eu.eidas.auth.commons.EIDASAuthnRequest; +import eu.eidas.auth.commons.EIDASAuthnResponse; import eu.eidas.auth.commons.EIDASUtil; import eu.eidas.auth.engine.EIDASSAMLEngine; +import eu.eidas.auth.engine.metadata.MetadataUtil; +import eu.eidas.engine.exceptions.EIDASSAMLEngineException; /** * eIDAS Protocol Support for outbound authentication and metadata generation @@ -140,7 +156,7 @@ public class EIDASProtocol extends AbstractAuthProtocolModulController { First request step - send it to BKU selection for user authentication. After the user credentials and other info are obtained, in the second step the request will be processed and the user redirected */ - public void preProcess(HttpServletRequest request, HttpServletResponse response, EIDASData pendingReq) throws MOAIDException { + private void preProcess(HttpServletRequest request, HttpServletResponse response, EIDASData pendingReq) throws MOAIDException { Logger.info("received an eIDaS request"); @@ -177,13 +193,36 @@ public class EIDASProtocol extends AbstractAuthProtocolModulController { samlReq.setPersonalAttributeList(pendingReq.getEidasRequestedAttributes()); // circumvent non-serializable eidas personal attribute list pendingReq.setEidasRequest(samlReq); + //validate destination against metadata + String reqDestination = samlReq.getDestination(); + if (MiscUtil.isNotEmpty(reqDestination)) { + boolean isValid = false; + List allowedAssertionConsumerUrl = new MOAeIDASMetadataProviderDecorator(MOAeIDASChainingMetadataProvider.getInstance()) + .getSPSSODescriptor(samlReq.getIssuer()).getAssertionConsumerServices(); + + for (AssertionConsumerService el : allowedAssertionConsumerUrl) { + if (reqDestination.equals(el.getLocation())) + isValid = true; + + } + + if (!isValid) { + Logger.info("eIDAS AuthnRequest contains a not valid 'Destination' attribute"); + throw new eIDASAuthnRequestValidationException("stork.01", + new Object[]{"eIDAS AuthnRequest contains a not valid 'Destination' attribute"}); + } + + } + + // - memorize OA url pendingReq.setOAURL(samlReq.getIssuer()); // - memorize OA config IOAAuthParameters oaConfig = authConfig.getOnlineApplicationParameter(pendingReq.getOAURL()); if (oaConfig == null) - throw new AuthenticationException("stork.12", new Object[]{pendingReq.getOAURL()}); + throw new eIDASAuthnRequestProcessingException("eIDAS.08", new Object[]{pendingReq.getOAURL()}); + pendingReq.setOnlineApplicationConfiguration(oaConfig); String spType = samlReq.getSPType(); @@ -194,16 +233,102 @@ public class EIDASProtocol extends AbstractAuthProtocolModulController { } Logger.debug("eIDAS request has SPType:" + spType); + + } catch (MOAIDException e) { + Logger.info("eIDAS AuthnRequest preProcessing FAILED. Msg:" + e.getMessage()); + throw e; + + } catch (EIDASSAMLEngineException e) { + Logger.info("eIDAS AuthnRequest preProcessing FAILED. Msg:" + e.getMessage()); + throw new eIDASAuthnRequestProcessingException("eIDAS.06", new Object[]{e.getMessage()}, e); } catch(Exception e) { - Logger.error("error in preprocessing step", e); - throw new MOAIDException("error in preprocessing step", null); + Logger.warn("eIDAS AuthnRequest preProcessing FAILED. Msg:" + e.getMessage(), e); + throw new eIDASAuthnRequestProcessingException("eIDAS.06", new Object[]{e.getMessage()}, e); } } - public boolean generateErrorMessage(Throwable e, HttpServletRequest request, HttpServletResponse response, IRequest protocolRequest) throws Throwable { - return false; + public boolean generateErrorMessage(Throwable e, HttpServletRequest request, HttpServletResponse response, IRequest pendingReq) throws Throwable { + if (pendingReq != null && pendingReq instanceof EIDASData) { + EIDASData eidasReq = (EIDASData) pendingReq; + if (eidasReq.getEidasRequest() == null) { + Logger.info("Can not build eIDAS ErrorResponse. No eIDAS AuthnRequest found."); + return false; + } + + try { + EIDASAuthnResponse eIDASResp = new EIDASAuthnResponse(); + eIDASResp.setIssuer(pendingReq.getAuthURL() + Constants.eIDAS_HTTP_ENDPOINT_METADATA); + + if (e instanceof eIDASException) { + eIDASResp.setStatusCode(((eIDASException) e).getStatusCodeFirstLevel()); + eIDASResp.setSubStatusCode(((eIDASException) e).getStatusCodeSecondLevel()); + eIDASResp.setMessage(e.getMessage()); + + } else if (e instanceof MOAIDException ) { + eIDASResp.setStatusCode(StatusCode.RESPONDER_URI); + eIDASResp.setSubStatusCode(StatusCode.AUTHN_FAILED_URI); + eIDASResp.setMessage(e.getMessage()); + + } else { + eIDASResp.setStatusCode(StatusCode.RESPONDER_URI); + eIDASResp.setSubStatusCode(StatusCode.AUTHN_FAILED_URI); + eIDASResp.setMessage(e.getMessage()); + + } + + + EIDASSAMLEngine engine = SAMLEngineUtils.createSAMLEngine(); + + if(null == eidasReq.getEidasRequest().getAssertionConsumerServiceURL()) { + String assertionConsumerUrl = MetadataUtil.getAssertionUrlFromMetadata( + new MOAeIDASMetadataProviderDecorator(MOAeIDASChainingMetadataProvider.getInstance()), + engine, + eidasReq.getEidasRequest()); + eidasReq.getEidasRequest().setAssertionConsumerServiceURL(assertionConsumerUrl); + + } + //get eIDAS SAML-engine + + eIDASResp = engine.generateEIDASAuthnResponseFail(eidasReq.getEidasRequest(), eIDASResp, + eidasReq.getRemoteAddress(), true); + + String token = EIDASUtil.encodeSAMLToken(eIDASResp.getTokenSaml()); + + VelocityEngine velocityEngine = VelocityProvider.getClassPathVelocityEngine(); + Template template = velocityEngine.getTemplate("/resources/templates/stork2_postbinding_template.html"); + VelocityContext context = new VelocityContext(); + + context.put("RelayState", eidasReq.getRemoteRelayState()); + + context.put("SAMLResponse", token); + Logger.debug("SAMLResponse original: " + token); + + Logger.debug("Putting assertion consumer url as action: " + eidasReq.getEidasRequest().getAssertionConsumerServiceURL()); + context.put("action", eidasReq.getEidasRequest().getAssertionConsumerServiceURL()); + Logger.trace("Starting template merge"); + StringWriter writer = new StringWriter(); + + Logger.trace("Doing template merge"); + template.merge(context, writer); + Logger.trace("Template merge done"); + + Logger.trace("Sending html content : " + new String(writer.getBuffer())); + + response.getOutputStream().write(writer.getBuffer().toString().getBytes("UTF-8")); + response.setContentType(MediaType.TEXT_HTML.getType()); + + return true; + + } catch (Exception e1 ) { + Logger.error("Generate eIDAS Error-Response failed.", e); + + } + + } + + return false; } public boolean validate(HttpServletRequest request, HttpServletResponse response, IRequest pending) { diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java index 60ffb3673..b4db5c83d 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/EidasMetaDataRequest.java @@ -71,8 +71,10 @@ public class EidasMetaDataRequest implements IAction { httpResp.setContentType(MediaType.APPLICATION_XML.getType()); httpResp.getWriter().print(metaData); httpResp.flushBuffer(); - } catch (Exception e) { - e.printStackTrace(); + } catch (Exception e) { + Logger.error("eIDAS Metadata generation FAILED.", e); + throw new MOAIDException("eIDAS.05", new Object[]{e.getMessage()}, e); + } diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java index d9663092f..9943cc5fb 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/protocols/eidas/eIDASAuthenticationRequest.java @@ -122,19 +122,21 @@ public class eIDASAuthenticationRequest implements IAction { // but we need to set the appropriate request issuer engine.setRequestIssuer(eidasRequest.getEidasRequest().getIssuer()); - // check if we have the destination available, supply it if not + if(null == eidasRequest.getEidasRequest().getAssertionConsumerServiceURL()) { String assertionConsumerUrl = MetadataUtil.getAssertionUrlFromMetadata( new MOAeIDASMetadataProviderDecorator(MOAeIDASChainingMetadataProvider.getInstance()), engine, eidasRequest.getEidasRequest()); eidasRequest.getEidasRequest().setAssertionConsumerServiceURL(assertionConsumerUrl); + } response = engine.generateEIDASAuthnResponse(eidasRequest.getEidasRequest(), response, eidasRequest.getRemoteAddress(), true); token = EIDASUtil.encodeSAMLToken(response.getTokenSaml()); + } catch(Exception e) { e.printStackTrace(); } -- cgit v1.2.3 From ab67fbdf5d661a33b67436c70db0dcb8b840cf57 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 31 Mar 2016 08:03:28 +0200 Subject: if database cleanUP process found some unhandled exception, write error messages to technical log --- id/server/auth-final/pom.xml | 2 +- .../moa/id/auth/AuthenticationSessionCleaner.java | 76 +++++++++++++++++++++- .../moa/id/auth/servlet/AbstractController.java | 24 ++++++- .../AbstractProcessEngineSignalController.java | 6 +- .../moa/id/data/ExceptionContainer.java | 65 ++++++++++++++++++ .../protocols/ProtocolFinalizationController.java | 12 ++-- .../moa/id/storage/DBTransactionStorage.java | 37 ++++++----- .../moa/id/storage/ITransactionStorage.java | 15 ++++- .../servlet/SSOTransferSignalServlet.java | 6 +- 9 files changed, 207 insertions(+), 36 deletions(-) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java (limited to 'id/server') diff --git a/id/server/auth-final/pom.xml b/id/server/auth-final/pom.xml index 776ec00d3..61eba7f22 100644 --- a/id/server/auth-final/pom.xml +++ b/id/server/auth-final/pom.xml @@ -165,7 +165,7 @@ diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationSessionCleaner.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationSessionCleaner.java index 94138e0fc..e0552c337 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationSessionCleaner.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationSessionCleaner.java @@ -4,15 +4,22 @@ package at.gv.egovernment.moa.id.auth; import java.util.Date; +import java.util.List; +import org.hibernate.HibernateException; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import at.gv.egovernment.moa.id.advancedlogging.TransactionIDUtils; import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; +import at.gv.egovernment.moa.id.data.ExceptionContainer; +import at.gv.egovernment.moa.id.process.ProcessExecutionException; import at.gv.egovernment.moa.id.storage.IAuthenticationSessionStoreage; import at.gv.egovernment.moa.id.storage.ITransactionStorage; import at.gv.egovernment.moa.logging.Logger; +import at.gv.egovernment.moa.util.MiscUtil; /** * Thread cleaning the AuthenticationServer session store @@ -53,11 +60,55 @@ public class AuthenticationSessionCleaner implements Runnable { authenticationSessionStorage.clean(now, sessionTimeOutCreated, sessionTimeOutUpdated); //clean TransactionStorage - transactionStorage.clean(now, authDataTimeOut); + List entryKeysToClean = transactionStorage.clean(now, authDataTimeOut); + if (entryKeysToClean != null && entryKeysToClean.size() != 0) { + for(String entryKey : entryKeysToClean) { + try { + try { + Object entry = transactionStorage.get(entryKey); + //if entry is an exception --> log it because is could be unhandled + if (entry != null && entry instanceof ExceptionContainer) { + ExceptionContainer exContainer = (ExceptionContainer) entry; + + if (exContainer.getExceptionThrown() != null) { + //add session and transaction ID to log if exists + if (MiscUtil.isNotEmpty(exContainer.getUniqueTransactionID())) + TransactionIDUtils.setTransactionId(exContainer.getUniqueTransactionID()); + + if (MiscUtil.isNotEmpty(exContainer.getUniqueSessionID())) + TransactionIDUtils.setSessionId(exContainer.getUniqueSessionID()); + + //log exception to technical log + logExceptionToTechnicalLog(exContainer.getExceptionThrown()); + + //remove session and transaction ID from thread + TransactionIDUtils.removeSessionId(); + TransactionIDUtils.removeTransactionId(); + } + } + + } catch (Exception e) { + Logger.info("Transaction info is not loadable. " + + "Key:" + entryKey + + " ErrorMsg:" + e.getMessage()); + + } + + transactionStorage.remove(entryKey); + Logger.info("Remove stored information with ID: " + entryKey + + " after timeout."); + + } catch (HibernateException e){ + Logger.warn("Transaction information with ID=" + entryKey + + " not removed after timeout! (Error during Database communication)", e); + } + + } + } } catch (Exception e) { - Logger.error("Session cleanUp FAILED!" , e); + Logger.error("Session/Transaction cleanUp FAILED!" , e); } @@ -72,6 +123,27 @@ public class AuthenticationSessionCleaner implements Runnable { } } + /** + * Write a Exception to the MOA-ID-Auth internal technical log + * + * @param loggedException Exception to log + */ + protected void logExceptionToTechnicalLog(Throwable loggedException) { + if (!( loggedException instanceof MOAIDException + || loggedException instanceof ProcessExecutionException )) { + Logger.error("Receive an internal error: Message=" + loggedException.getMessage(), loggedException); + + } else { + if (Logger.isDebugEnabled() || Logger.isTraceEnabled()) { + Logger.warn(loggedException.getMessage(), loggedException); + + } else { + Logger.info(loggedException.getMessage()); + + } + } + } + /** * start the sessionCleaner */ diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java index e51f3e6c9..fd2e03afa 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java @@ -32,6 +32,7 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.ExceptionHandler; +import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; import at.gv.egovernment.moa.id.advancedlogging.StatisticLogger; import at.gv.egovernment.moa.id.auth.exception.InvalidProtocolRequestException; @@ -42,10 +43,12 @@ import at.gv.egovernment.moa.id.auth.frontend.exception.GUIBuildException; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +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.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; +import at.gv.egovernment.moa.id.data.ExceptionContainer; import at.gv.egovernment.moa.id.moduls.IRequestStorage; import at.gv.egovernment.moa.id.process.ProcessExecutionException; import at.gv.egovernment.moa.id.protocols.AbstractAuthProtocolModulController; @@ -101,8 +104,12 @@ public abstract class AbstractController extends MOAIDAuthConstants { } protected void handleError(String errorMessage, Throwable exceptionThrown, - HttpServletRequest req, HttpServletResponse resp, String pendingRequestID) throws IOException { + HttpServletRequest req, HttpServletResponse resp, IRequest pendingReq) throws IOException { + String pendingRequestID = null; + if (pendingReq != null) + pendingRequestID = pendingReq.getRequestID(); + Throwable loggedException = null; Throwable extractedException = extractOriginalExceptionFromProcessException(exceptionThrown); @@ -127,8 +134,19 @@ public abstract class AbstractController extends MOAIDAuthConstants { //switch to protocol-finalize method to generate a protocol-specific error message //put exception into transaction store for redirect - String key = Random.nextRandom(); - transactionStorage.put(key, loggedException); + String key = Random.nextLongRandom(); + if (pendingReq != null) { + revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.TRANSACTION_ERROR); + transactionStorage.put(key, + new ExceptionContainer(pendingReq.getUniqueSessionIdentifier(), + pendingReq.getUniqueTransactionIdentifier(), loggedException)); + + } else { + transactionStorage.put(key, + new ExceptionContainer(null, + null, loggedException)); + + } //build up redirect URL String redirectURL = null; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java index 7a4ee35fa..0ce7b0050 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractProcessEngineSignalController.java @@ -28,14 +28,14 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont protected void signalProcessManagement(HttpServletRequest req, HttpServletResponse resp) throws IOException { String pendingRequestID = StringEscapeUtils.escapeHtml(getPendingRequestId(req)); - + IRequest pendingReq = null; try { if (pendingRequestID == null) { throw new MOAIllegalStateException("process.03", new Object[]{"Unable to determine MOA pending-request id."}); } - IRequest pendingReq = requestStorage.getPendingRequest(pendingRequestID); + pendingReq = requestStorage.getPendingRequest(pendingRequestID); if (pendingReq == null) { Logger.info("No PendingRequest with Id: " + pendingRequestID + " Maybe, a transaction timeout occure."); throw new MOAIDException("auth.28", new Object[]{pendingRequestID}); @@ -60,7 +60,7 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont processEngine.signal(pendingReq); } catch (Exception ex) { - handleError(null, ex, req, resp, pendingRequestID); + handleError(null, ex, req, resp, pendingReq); } finally { //MOASessionDBUtils.closeSession(); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java new file mode 100644 index 000000000..5e3fb5df6 --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java @@ -0,0 +1,65 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.data; + +/** + * @author tlenz + * + */ +public class ExceptionContainer { + + private Throwable exceptionThrown = null; + private String uniqueSessionID = null; + private String uniqueTransactionID = null; + + /** + * + */ + public ExceptionContainer(String uniqueSessionID, String uniqueTransactionID, Throwable exception) { + this.uniqueSessionID = uniqueSessionID; + this.uniqueTransactionID = uniqueTransactionID; + this.exceptionThrown = exception; + } + + /** + * @return the exceptionThrown + */ + public Throwable getExceptionThrown() { + return exceptionThrown; + } + /** + * @return the uniqueSessionID + */ + public String getUniqueSessionID() { + return uniqueSessionID; + } + /** + * @return the uniqueTransactionID + */ + public String getUniqueTransactionID() { + return uniqueTransactionID; + } + + + +} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java index 991c6a881..0da43d818 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/ProtocolFinalizationController.java @@ -38,6 +38,7 @@ import at.gv.egovernment.moa.id.auth.exception.WrongParametersException; import at.gv.egovernment.moa.id.commons.api.IRequest; import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; import at.gv.egovernment.moa.id.commons.utils.MOAIDMessageProvider; +import at.gv.egovernment.moa.id.data.ExceptionContainer; import at.gv.egovernment.moa.id.util.ParamValidatorUtils; import at.gv.egovernment.moa.logging.Logger; @@ -66,15 +67,14 @@ public class ProtocolFinalizationController extends AbstractAuthProtocolModulCon if (errorid != null) { try { //load stored exception from database - Throwable throwable = transactionStorage.get(errorid, Throwable.class); - - if (throwable != null) { + ExceptionContainer container = transactionStorage.get(errorid, ExceptionContainer.class); + if (container != null) { //remove exception if it was found transactionStorage.remove(errorid); - if (pendingReq != null) { - revisionsLogger.logEvent(pendingReq, MOAIDEventConstants.TRANSACTION_ERROR); - + Throwable throwable = container.getExceptionThrown(); + + if (pendingReq != null) { //build protocol-specific error message if possible buildProtocolSpecificErrorResponse(throwable, req, resp, pendingReq); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java index ff631a720..6778dc32e 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java @@ -23,6 +23,7 @@ package at.gv.egovernment.moa.id.storage; import java.io.Serializable; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -99,6 +100,17 @@ public class DBTransactionStorage implements ITransactionStorage { } } + public Object get(String key) throws MOADatabaseException { + AssertionStore element = searchInDatabase(key); + + if (element == null) + return null; + + return SerializationUtils.deserialize(element.getAssertion()); + + + } + public T get(String key, final Class clazz, long dataTimeOut) throws MOADatabaseException, AuthenticationException { AssertionStore element = searchInDatabase(key); @@ -134,10 +146,11 @@ public class DBTransactionStorage implements ITransactionStorage { } } - public void clean(Date now, long dataTimeOut) { + public List clean(Date now, long dataTimeOut) { Date expioredate = new Date(now.getTime() - dataTimeOut); List results; + List returnValues = new ArrayList();; Session session = MOASessionDBUtils.getCurrentSession(); synchronized (session) { @@ -146,22 +159,14 @@ public class DBTransactionStorage implements ITransactionStorage { query.setTimestamp("timeout", expioredate); results = query.list(); session.getTransaction().commit(); - - if (results.size() != 0) { - for(AssertionStore result : results) { - try { - cleanDelete(result); - Logger.info("Remove stored information with ID: " + result.getArtifact() - + " after timeout."); - - } catch (HibernateException e){ - Logger.warn("Sessioninformation with ID=" + result.getArtifact() - + " not removed after timeout! (Error during Database communication)", e); - } - - } - } } + + if (results != null) { + for (AssertionStore el : results) + returnValues.add(el.getArtifact()); + + } + return returnValues; } public void remove(String key) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java index 48283d2b6..fe959c39d 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java @@ -23,6 +23,7 @@ package at.gv.egovernment.moa.id.storage; import java.util.Date; +import java.util.List; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.commons.db.ex.MOADatabaseException; @@ -50,6 +51,15 @@ public interface ITransactionStorage { */ public void put(String key, Object value) throws MOADatabaseException; + /** + * Get a data object from transaction storage + * + * @param key key Id which identifiers the data object + * @return The transaction-data object, or null + * @throws MOADatabaseException In case of load operation failed + */ + public Object get(String key) throws MOADatabaseException; + /** * Get a data object from transaction storage * @@ -91,11 +101,12 @@ public interface ITransactionStorage { public void remove(String key); /** - * Clean-up the transaction storage + * Get all entries for Clean-up the transaction storage * * @param now Current time * @param dataTimeOut Data-object timeout in [ms] + * @return List of entry-keys which as a timeout */ - public void clean(Date now, long dataTimeOut); + public List clean(Date now, long dataTimeOut); } diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferSignalServlet.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferSignalServlet.java index cd18afb71..e92925dfb 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferSignalServlet.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/servlet/SSOTransferSignalServlet.java @@ -61,13 +61,13 @@ public class SSOTransferSignalServlet extends AbstractProcessEngineSignalControl @Override protected void signalProcessManagement(HttpServletRequest req, HttpServletResponse resp) throws IOException { String pendingRequestID = StringEscapeUtils.escapeHtml(getPendingRequestId(req)); - + IRequest pendingReq = null; try { if (pendingRequestID == null) { throw new IllegalStateException("Unable to determine MOA pending-request id."); } - IRequest pendingReq = requestStorage.getPendingRequest(pendingRequestID); + pendingReq = requestStorage.getPendingRequest(pendingRequestID); if (pendingReq == null) { Logger.info("No PendingRequest with Id: " + pendingRequestID + " Maybe, a transaction timeout occure."); throw new MOAIDException("auth.28", new Object[]{pendingRequestID}); @@ -87,7 +87,7 @@ public class SSOTransferSignalServlet extends AbstractProcessEngineSignalControl processEngine.signal(pendingReq); } catch (Exception ex) { - handleError(null, ex, req, resp, pendingRequestID); + handleError(null, ex, req, resp, pendingReq); } finally { //MOASessionDBUtils.closeSession(); -- cgit v1.2.3 From 4a347b1c7784e2c756c2bcae973d3b6da0ba8e62 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 31 Mar 2016 14:36:38 +0200 Subject: fix missing implementation in ExceptionContainer --- .../main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java | 5 ++++- .../java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java | 6 ++++++ .../java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java | 3 ++- 3 files changed, 12 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java index 5e3fb5df6..1c6fdcb65 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/data/ExceptionContainer.java @@ -22,12 +22,15 @@ */ package at.gv.egovernment.moa.id.data; +import java.io.Serializable; + /** * @author tlenz * */ -public class ExceptionContainer { +public class ExceptionContainer implements Serializable { + private static final long serialVersionUID = 5355860753609684995L; private Throwable exceptionThrown = null; private String uniqueSessionID = null; private String uniqueTransactionID = null; diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java index 6778dc32e..c2b3b0fc5 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/DBTransactionStorage.java @@ -242,6 +242,12 @@ public class DBTransactionStorage implements ITransactionStorage { element.setType(value.getClass().getName()); element.setDatatime(new Date()); + if (!Serializable.class.isInstance(value)) { + Logger.warn("Transaction-Storage can only store objects which implements the 'Seralizable' interface"); + throw new MOADatabaseException("Transaction-Storage can only store objects which implements the 'Seralizable' interface", null); + + } + //serialize the Assertion for Database storage byte[] data = SerializationUtils.serialize((Serializable) value); element.setAssertion(data); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java index fe959c39d..493f24ee8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/storage/ITransactionStorage.java @@ -46,7 +46,8 @@ public interface ITransactionStorage { * Store a data object with a key to transaction storage * * @param key Id which identifiers the data object - * @param value Data object which should be stored + * @param value Data object which should be stored. + * This data must implement the java.io.Serializable interface * @throws MOADatabaseException In case of store operation failed */ public void put(String key, Object value) throws MOADatabaseException; -- cgit v1.2.3 From a2c787edb81084a0f7a1f01d79607121ff5ec2a4 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 31 Mar 2016 14:37:09 +0200 Subject: add errorcodes to eIDAS module functionality --- id/server/doc/handbook/protocol/protocol.html | 46 +++++++++++++++ .../resources/properties/id_messages_de.properties | 8 ++- .../protocol_response_statuscodes_de.properties | 22 +++---- .../eIDASResponseNotSuccessException.java | 67 ++++++++++++++++++++++ .../eidas/tasks/ReceiveAuthnResponseTask.java | 24 ++++++-- 5 files changed, 148 insertions(+), 19 deletions(-) create mode 100644 id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASResponseNotSuccessException.java (limited to 'id/server') diff --git a/id/server/doc/handbook/protocol/protocol.html b/id/server/doc/handbook/protocol/protocol.html index ff7921ad5..6713bd7a3 100644 --- a/id/server/doc/handbook/protocol/protocol.html +++ b/id/server/doc/handbook/protocol/protocol.html @@ -270,6 +270,13 @@ Redirect Binding + + + + + + + @@ -646,6 +653,45 @@ Redirect Binding

EventCode

Wert

Beschreibung

EventCode

Wert

Beschreibung

3000

Protokolltype

Type des verwendeten Authentifizierungsprotokolls (OpenID Connect, PVP2, STORK, SAML1)

3000

Protokolltype

Type des verwendeten Authentifizierungsprotokolls (OpenID Connect, PVP2, STORK, SAML1)

3100

 

PVP 2.x Metadaten Request

3100

 

PVP 2.x Metadaten Request

3101

 

PVP 2.x Authentifizierungsrequest

3101

 

PVP 2.x Authentifizierungsrequest

3102

 

PVP 2.x Authentifizierungsresponse

3102

 

PVP 2.x Authentifizierungsresponse

3103

 

PVP 2.x Single LogOut Request

3103

 

PVP 2.x Single LogOut Request

3104

 

PVP 2.x Attribute Query (im Fall IDP Interfederation mit zwischen MOA-IDs)

3104

 

PVP 2.x Attribute Query (im Fall IDP Interfederation mit zwischen MOA-IDs)

3200

 

OpenID Connect Auth Requsst

3200

 

OpenID Connect Auth Requsst

3201

 

OpenID Connect Tokken Request

3201

 

OpenID Connect Tokken Request

3300

 

SAML1 StartAuthentication Request

3300

 

SAML1 StartAuthentication Request

4000

 

Identifizierungs- und Authentifizierungsprozess wurde gestartet

4000

 

Identifizierungs- und Authentifizierungsprozess wurde gestartet

4001

 

Identifizierungs- und Authentifizierungsprozess wurde beendet

4001

 

Identifizierungs- und Authentifizierungsprozess wurde beendet

4002

 

Anmeldeprozess mit Online Vollmachten

4002

 

Anmeldeprozess mit Online Vollmachten

4003

 

Anmeldeprozess mit STORK

4003

 

Anmeldeprozess mit STORK

4004

 

Anmeldeprozess mit Single Sign-On

4004

 

Anmeldeprozess mit Single Sign-On

4005

 

Ungültige Single Sign-On Session

4005

 

Ungültige Single Sign-On Session

4006

 

Benutzeranfrage für Single Sign-On Verwendung gestellt

4006

 

Benutzeranfrage für Single Sign-On Verwendung gestellt

4007

 

Benutzerantwort für Single Sign-On Verwendung empfangen

4007

 

Benutzerantwort für Single Sign-On Verwendung empfangen

4008

 

Anmeldeprozess über IDP Föderation

4008

 

Anmeldeprozess über IDP Föderation

4009

 

Gültige Response von föderiertem IDP erhalten

4009

 

Gültige Response von föderiertem IDP erhalten

4010Verwendeter IDP für föderierte Anmeldung

4011

Service Identifikator

Eindeutiger Identifikator der/des Online-Applikation/Service an der/dem die Anmeldung erfolgt

4011

Service Identifikator

Eindeutiger Identifikator der/des Online-Applikation/Service an der/dem die Anmeldung erfolgt

4110

 

BKU Auswahl gestartet

4110

 

BKU Auswahl gestartet

4111

Bkutype (z.b. online, handy, local)

Ausgewählter BKU Type

4111

Bkutype (z.b. online, handy, local)

Ausgewählter BKU Type

4112

URL

Verwendete BKU URL

4112

URL

Verwendete BKU URL

4113

IP Adresse

IP Adresse mit der die BKU Daten an MOA-ID liefert

4113

IP Adresse

IP Adresse mit der die BKU Daten an MOA-ID liefert

4220

 

Personenbindung ausgelesen und gültig validiert

4220

 

Personenbindung ausgelesen und gültig validiert

4221

 

Signaturzertifikat ausgelesen und validiert

4221

 

Signaturzertifikat ausgelesen und validiert

4222

 

AuthBlock signiert und gültig validiert

4222

 

AuthBlock signiert und gültig validiert

4223

 

Wechsel in den Modus für ausländische Signaturkarten

4223

 

Wechsel in den Modus für ausländische Signaturkarten

4224

 

SZR-Gateway wird kontaktiert

4224

 

SZR-Gateway wird kontaktiert

4225

 

Personenbindung von SZR-Gateway erhalten

4225

 

Personenbindung von SZR-Gateway erhalten

4300

ReferenceID des Vollmachtensystems

Online-Vollmachten Service wird kontaktiert

4300

ReferenceID des Vollmachtensystems

Online-Vollmachten Service wird kontaktiert

4301

 

Redirekt zum Online-Vollmachten Service

4301

 

Redirekt zum Online-Vollmachten Service

4302

 

Vollmacht vom Online-Vollmachten Service erhalten

4302

 

Vollmacht vom Online-Vollmachten Service erhalten

4400Unvollständiger Single LogOut Prozess

5000

bPK

bPK bei Vollmacht mit berufsmäßigem Parteienvertreter oder Organwalter

5000

bPK

bPK bei Vollmacht mit berufsmäßigem Parteienvertreter oder Organwalter

5001

OID

OID bei Vollmacht mit berufsmäßigem Parteienvertreter oder Organwalter

5001

OID

OID bei Vollmacht mit berufsmäßigem Parteienvertreter oder Organwalter

5002

JSON String

Pseudoanonymisierte Personendaten der sich anmeldeten natürlichen Person.

5002

JSON String

Pseudoanonymisierte Personendaten der sich anmeldeten natürlichen Person.

5100

Vollmachtstype

Type der ausgewählten Vollmacht

5100

Vollmachtstype

Type der ausgewählten Vollmacht

5101

jur / nat

Vollmacht - Type der vertretenen Person (Juristische / natürliche Person)

5101

jur / nat

Vollmacht - Type der vertretenen Person (Juristische / natürliche Person)

5102

JSON String

Pseudoanonymisierte Personendaten der vertretenen natürlichen Person.

5102

JSON String

Pseudoanonymisierte Personendaten der vertretenen natürlichen Person.

5103

baseID

Stammzahl der vertretenen juristischen Person

5103

baseID

Stammzahl der vertretenen juristischen Person

 
6000ReferenceID des VollmachtensystemsReferenceID zum Auth. Prozess externes Vollmachten Service kontaktiert
6001 ReferenceID des Vollmachhtenservice gültige Vollmacht vom externen Vollmachten Service verarbeitet

Gesamte Personenbindung in BASE64 kodiert.

Hinweis: Im Falle einer privatwirtschaftlichen Applikation ist die Stammzahl durch die wbPK ersetzt.

urn:oid:1.2.40.0.10.2.1.1.261.106MANDATE-TYPE-OIDmandate Bezeichnung als OID des verwendeten Vollmachten-Profils
urn:oid:1.2.40.0.10.2.1.1.261.68 MANDATE-TYPE Der geforderte QAA Level ist höher als der QAA Level der gewählten Authentifizierungsmethode
+
1.3.1.4 eIDAS (13xxx)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StatuscodeBeschreibung
1300Fehler beim Erstellen des eIDAS Authentifizierungsrequests
1301Fehler beim Validieren der eIDAS Authentifizierungsresponse
1302Response vom eIDAS Node enthält einen Fehler
1303eIDAS Response beinhaltet nicht alle minimal erforderlichen Attribute
1304Der ausgewählte eIDAS Node existiert nicht oder ist nicht konfiguriert
1305eIDAS Request konnte nicht gültig verarbeitet werden
1306Generierung dereIDAS Metadaten fehlgeschlagen
1399Interner Fehler in der eIDAS SAML-Engine

1.3.2 Statuscodes 4xxxx

Alles Statuscodes beginnend mit der Zahl vier beschreiben Fehler die während der Kommunikation mit externen Services aufgetreten sind.

1.3.2.1 BKU (40xxxx)
diff --git a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties index 6b48750d2..400b0bc25 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/id_messages_de.properties @@ -128,7 +128,7 @@ cleaner.03=Abgelaufene Anmeldedaten zur SAML-Assertion ID {0} wurden aus dem Spe proxy.00=MOA ID Proxy wurde erfolgreich gestartet proxy.01=Unbekannter URL {0}, erwarteter URL auf {1} -proxy.02=Unbekannter URL {0}.
Es wurde keine Übereinstimmung zum Attribut publicURLPrefix im Element 'OnlineApplication' der verwendeten MOA-ID Konfigurationsdatei gefunden. +proxy.02=Unbekannter URL {0}.
Es wurde keine \u00dcbereinstimmung zum Attribut publicURLPrefix im Element 'OnlineApplication' der verwendeten MOA-ID Konfigurationsdatei gefunden. proxy.04=URL {0} : {1} proxy.05=Fehler beim Aufbauen der SSLSocketFactory f\u00FCr {0} \: {1} proxy.06=Fehler beim Starten des Service MOA ID Proxy @@ -265,8 +265,10 @@ eIDAS.05=Can not generate eIDAS metadata. Reason:{0} eIDAS.06=Received eIDAS AuthnRequest can not processed. Reason:{0} eIDAS.07=Missing eIDAS-Attribute:{0} eIDAS.08=No valid eIDAs-Node configuration for enityID:{0} +eIDAS.09=Received eIDAS Response is not valid. Reason:{0} +eIDAS.10=Internal server error. Reason:{0} +eIDAS.11=Received eIDAS Error-Response. Reason:{0} -pvp2.00={0} ist kein gueltiger consumer service index pvp2.01=Fehler beim kodieren der PVP2 Antwort pvp2.02=Ungueltiges Datumsformat pvp2.03=Vollmachtattribute nicht in Metadaten verfuegbar @@ -325,4 +327,4 @@ slo.02=Es wurde keine aktive SSO Session gefunden oder Sie sind bei keiner Onlin process.01=Fehler beim Ausf\u00FChren des Prozesses. process.02=Fehler beim Erstellen eines geeigneten Prozesses f\u00FCr die SessionID {0}. -process.03=Fehler beim Weiterführen es Prozesses. Msg:{0} +process.03=Fehler beim Weiterf\u00FChren es Prozesses. Msg:{0} diff --git a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties index 92e231bd0..bfaf5ffb1 100644 --- a/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties +++ b/id/server/idserverlib/src/main/resources/resources/properties/protocol_response_statuscodes_de.properties @@ -213,16 +213,18 @@ stork.19=1203 stork.20=1204 stork.21=1205 -eIDAS.00=TODO -eIDAS.01=TODO -eIDAS.02=TODO -eIDAS.03=TODO -eIDAS.04=TODO -eIDAS.05=TODO -eIDAS.06=TODO -eIDAS.07=TODO -eIDAS.08=TODO - +eIDAS.00=1399 +eIDAS.01=1305 +eIDAS.02=1300 +eIDAS.03=1304 +eIDAS.04=1304 +eIDAS.05=1306 +eIDAS.06=1305 +eIDAS.07=1303 +eIDAS.08=1304 +eIDAS.09=1301 +eIDAS.10=9199 +eIDAS.11=1302 pvp2.01=6100 pvp2.06=6100 diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASResponseNotSuccessException.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASResponseNotSuccessException.java new file mode 100644 index 000000000..d10ca1c88 --- /dev/null +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/exceptions/eIDASResponseNotSuccessException.java @@ -0,0 +1,67 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.modules.eidas.exceptions; + +import org.opensaml.saml2.core.StatusCode; + +/** + * @author tlenz + * + */ +public class eIDASResponseNotSuccessException extends eIDASException { + + /** + * + */ + private static final long serialVersionUID = 6145402939313568907L; + + public eIDASResponseNotSuccessException(String messageId, Object[] parameters) { + super(messageId, parameters); + } + + /** + * @param messageId + * @param parameters + * @param e + */ + public eIDASResponseNotSuccessException(String messageId, Object[] parameters, Throwable e) { + super(messageId, parameters, e); + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASException#getStatusCodeFirstLevel() + */ + @Override + public String getStatusCodeFirstLevel() { + return StatusCode.RESPONDER_URI; + } + + /* (non-Javadoc) + * @see at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASException#getStatusCodeSecondLevel() + */ + @Override + public String getStatusCodeSecondLevel() { + return StatusCode.AUTHN_FAILED_URI; + } + +} diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java index b73c2a873..fae06031a 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/ReceiveAuthnResponseTask.java @@ -3,6 +3,7 @@ package at.gv.egovernment.moa.id.auth.modules.eidas.tasks; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import org.opensaml.saml2.core.StatusCode; import org.springframework.stereotype.Component; import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; @@ -11,6 +12,7 @@ import at.gv.egovernment.moa.id.auth.modules.AbstractAuthServletTask; import at.gv.egovernment.moa.id.auth.modules.TaskExecutionException; import at.gv.egovernment.moa.id.auth.modules.eidas.Constants; import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.EIDASEngineException; +import at.gv.egovernment.moa.id.auth.modules.eidas.exceptions.eIDASResponseNotSuccessException; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.MOAPersonalAttributeList; import at.gv.egovernment.moa.id.auth.modules.eidas.utils.SAMLEngineUtils; import at.gv.egovernment.moa.id.commons.api.exceptions.MOAIDException; @@ -58,7 +60,15 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { //TODO: check if additional decryption operation is required } - + + //check response StatusCode + if (!samlResp.getStatusCode().equals(StatusCode.SUCCESS_URI)) { + Logger.info("Receice eIDAS Response with StatusCode:" + samlResp.getStatusCode() + + " Subcode:" + samlResp.getSubStatusCode() + " Msg:" + samlResp.getMessage()); + throw new eIDASResponseNotSuccessException("eIDAS.11", new Object[]{samlResp.getMessage()}); + + } + //MOA-ID specific response validation //TODO: implement MOA-ID specific response validation @@ -89,18 +99,20 @@ public class ReceiveAuthnResponseTask extends AbstractAuthServletTask { revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR); throw new TaskExecutionException(pendingReq, "eIDAS AuthnRequest generation FAILED.", - new EIDASEngineException("eIDAS.00", new Object[]{e.getMessage()}, e)); - - } catch (MOAIDException | MOADatabaseException e) { + new EIDASEngineException("eIDAS.09", new Object[]{e.getMessage()}, e)); + + } catch (MOADatabaseException e) { revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR); - throw new TaskExecutionException(pendingReq, "eIDAS Response processing FAILED.", e); + throw new TaskExecutionException(pendingReq, "eIDAS Response processing FAILED.", + new MOAIDException("init.04", new Object[]{""}, e)); } catch (Exception e) { Logger.error("eIDAS Response processing FAILED.", e); revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, MOAIDEventConstants.AUTHPROCESS_PEPS_RECEIVED_ERROR); - throw new TaskExecutionException(pendingReq, e.getMessage(), e); + throw new TaskExecutionException(pendingReq, e.getMessage(), + new MOAIDException("eIDAS.10", new Object[]{e.getMessage()}, e)); } -- cgit v1.2.3 From eabe2473f8111cfbd2e221ee80f31eb11a91c2df Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 4 Apr 2016 11:48:46 +0200 Subject: fix typo in default tomcat start-script --- id/server/data/deploy/tomcat/unix/tomcat-start.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/tomcat/unix/tomcat-start.sh b/id/server/data/deploy/tomcat/unix/tomcat-start.sh index f6ae86540..9e292540a 100644 --- a/id/server/data/deploy/tomcat/unix/tomcat-start.sh +++ b/id/server/data/deploy/tomcat/unix/tomcat-start.sh @@ -7,8 +7,8 @@ export CATALINA_BASE=$CATALINA_HOME LOGGING_OPT=-Dlog4j.configuration=file:$CATALINA_BASE/conf/moa-id/log4j.properties LOGGING_LOGBACK_OPT=-Dlogback.configurationFile=$CATALINA_BASE/conf/moa-id/logback_config.xml -CONFIG_OPT=-Dmoa.id.configuration=$CATALINA_BASE/conf/moa-id/moa-id.properties -SPSS_OPT=-Dmoa.spss.server.configuration=file:$CATALINA_BASE/conf/moa-spss/SampleMOASPSSConfiguration.xml +CONFIG_OPT=-Dmoa.id.configuration=file:$CATALINA_BASE/conf/moa-id/moa-id.properties +SPSS_OPT=-Dmoa.spss.server.configuration=$CATALINA_BASE/conf/moa-spss/SampleMOASPSSConfiguration.xml CONFIGTOOL_OPT=-Dmoa.id.webconfig=file:$CATALINA_BASE/conf/moa-id-configuration/moa-id-configtool.properties CONFIGTOOL_USER_OPT=-Duser.properties=$CATALINA_BASE/conf/moa-id-configuration/userdatabase.properties -- cgit v1.2.3 From 5481121cf1c33392b5ae599c42f670b563c16b1c Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 4 Apr 2016 11:49:19 +0200 Subject: add log-message to log MOA-SPSS initialization errors --- .../main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java | 1 + 1 file changed, 1 insertion(+) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java index a8b9509bc..d1cf3338a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthInitializer.java @@ -136,6 +136,7 @@ public class MOAIDAuthInitializer { new IaikConfigurator().configure(config); } catch (at.gv.egovernment.moa.spss.server.config.ConfigurationException ex) { + Logger.error("MOA-SP initialization FAILED!", ex.getWrapped()); throw new ConfigurationException("config.10", new Object[] { ex .toString() }, ex); -- cgit v1.2.3 From 3acbee93bd61ffba7b192282f534dc614d1cc280 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 4 Apr 2016 14:56:58 +0200 Subject: move default mandate-service-selection template to ELGA mandate-client module --- .../templates/mandate-service-selection.html | 76 ---------------------- .../templates/mandate-service-selection.html | 76 ++++++++++++++++++++++ 2 files changed, 76 insertions(+), 76 deletions(-) delete mode 100644 id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html create mode 100644 id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/templates/mandate-service-selection.html (limited to 'id/server') diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html deleted file mode 100644 index b0be4a475..000000000 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/mandate-service-selection.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - Anmeldung an Online-Applikation - - - - -
- -
- - - -
- -
-
-

- Anmeldeinformationen: -

-
- -
-

Anmeldung an: $OAName

- - -
-

Für die Anmeldung 'in Vertretung' stehen Ihnen zwei Systeme zur Vollmachtenauswahl zur Verfügung. Bitte wählen Sie das gewünschte Service.

-
- -
-
-
- - - -
-
-

Eltern-Kind Vertretung

-
-
-
-
- - - -
-
-

Vollmachtenservice der Österreichischen Datenschutzbehörde (MMS Service)

-
-
-
-
- - -
-
-

Den Anmeldevorgang abbrechen

-
-
-
- -
-
- - -
-
-
- - diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/templates/mandate-service-selection.html b/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/templates/mandate-service-selection.html new file mode 100644 index 000000000..b0be4a475 --- /dev/null +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/resources/templates/mandate-service-selection.html @@ -0,0 +1,76 @@ + + + + + + + + Anmeldung an Online-Applikation + + + + +
+ +
+ + + +
+ +
+
+

+ Anmeldeinformationen: +

+
+ +
+

Anmeldung an: $OAName

+ + +
+

Für die Anmeldung 'in Vertretung' stehen Ihnen zwei Systeme zur Vollmachtenauswahl zur Verfügung. Bitte wählen Sie das gewünschte Service.

+
+ +
+
+
+ + + +
+
+

Eltern-Kind Vertretung

+
+
+
+
+ + + +
+
+

Vollmachtenservice der Österreichischen Datenschutzbehörde (MMS Service)

+
+
+
+
+ + +
+
+

Den Anmeldevorgang abbrechen

+
+
+
+ +
+
+ + +
+
+
+ + -- cgit v1.2.3 From 2fb3856bb3412bc825ea789f8d98177a8c527964 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Tue, 5 Apr 2016 12:57:17 +0200 Subject: make some minor handbook updates --- id/server/doc/handbook/protocol/Assertion.xml | 4 ++-- id/server/doc/handbook/protocol/idp_metadata.xml | 4 ++-- id/server/doc/handbook/protocol/protocol.html | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) (limited to 'id/server') diff --git a/id/server/doc/handbook/protocol/Assertion.xml b/id/server/doc/handbook/protocol/Assertion.xml index b6db5f088..2654f2e80 100644 --- a/id/server/doc/handbook/protocol/Assertion.xml +++ b/id/server/doc/handbook/protocol/Assertion.xml @@ -1,6 +1,6 @@ - https://demo.egiz.gv.at/demoportal_moaid-2.0 + https://demo.egiz.gv.at/demoportal_moaid-2.0/pvp/metadata @@ -34,7 +34,7 @@ nibdIyU5+AmfFzDaMwNocJEANoXrjLTpduCHvT0Qt/wH+7rVdgjX1djMrBhyMWs7GQyIBRfuf58m - https://demo.egiz.gv.at/demoportal_moaid-2.0 + https://demo.egiz.gv.at/demoportal_moaid-2.0/pvp/metadata QVGm48cqcM4UcyhDTNGYmVdrIoY= diff --git a/id/server/doc/handbook/protocol/idp_metadata.xml b/id/server/doc/handbook/protocol/idp_metadata.xml index e8915332e..ffc15d461 100644 --- a/id/server/doc/handbook/protocol/idp_metadata.xml +++ b/id/server/doc/handbook/protocol/idp_metadata.xml @@ -1,4 +1,4 @@ - + @@ -37,7 +37,7 @@ cfmNJhb06H+6mmHz929Bk4HuHoQj8X8= - + diff --git a/id/server/doc/handbook/protocol/protocol.html b/id/server/doc/handbook/protocol/protocol.html index 6713bd7a3..58474b635 100644 --- a/id/server/doc/handbook/protocol/protocol.html +++ b/id/server/doc/handbook/protocol/protocol.html @@ -1079,6 +1079,7 @@ https://<host>:<port>/moa-id-auth/LogOut
 https://<host>:<port>/moa-id-auth/pvp2/metadata
 
+

Hinweis: Ist die deployed MOA-ID Instanz für mehrere virtuelle IDPs konfiguriert, so können die Metadaten für die jeweiligen virutellen Entities über den PublicURLPrefix der jeweiligen virtuellen Instanz abgerufen werden. Z.B. https://aaa.com/moa-id-auth/pvp2/metadata für virtuellen IDP aaa.com oder https://bbb.com/moa-id-auth/pvp2/metadata für virtuellen IDP bbb.com

Wollen Sie für Ihre Online-Applikation PVP 2.1 als Authentifizierungsprotokoll nutzen müssen für jede Online-Applikation Metadaten erstellt und durch den Service Provider signiert werden. Zusätzlich muss die URL auf die Metadaten und das entsprechende Signaturzertifikat zur Prüfung der Signatur in der online-applikationsspezifischen PVP 2.1 Konfiguration von MOA-ID-Auth hinterlegt sein. Ein Beispiel für online-applikationsspezifische Metadaten finden Sie hier.

Die nachfolgenden Anforderungen an die online-applikationsspezifischen Metadaten .

    -- cgit v1.2.3 From 4b932484d66ef161bb547a419fdc32f04677fe57 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 7 Apr 2016 10:44:11 +0200 Subject: fix some possible problems with STORK configuration in config-GUI --- .../auth/parser/StartAuthentificationParameterParser.java | 2 +- .../auth/PropertyBasedAuthConfigurationProvider.java | 10 +++++++--- .../gv/egovernment/moa/id/auth/AuthenticationServer.java | 14 ++++++++------ .../ssotransfer/data/SSOTransferAuthenticationData.java | 5 +++-- 4 files changed, 19 insertions(+), 12 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java index 69c155c1e..140c7aebc 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/parser/StartAuthentificationParameterParser.java @@ -206,7 +206,7 @@ public class StartAuthentificationParameterParser extends MOAIDAuthConstants{ //validate SSO functionality - String domainIdentifier = authConfig.getSSOTagetIdentifier().trim(); + String domainIdentifier = authConfig.getSSOTagetIdentifier(); if (MiscUtil.isEmpty(domainIdentifier) && protocolReq.needSingleSignOnFunctionality()) { //do not use SSO if no Target is set Logger.warn("NO SSO-Target found in configuration. Single Sign-On is deaktivated!"); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java index 210bda3e6..348b1c45a 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/config/auth/PropertyBasedAuthConfigurationProvider.java @@ -738,13 +738,17 @@ public class PropertyBasedAuthConfigurationProvider extends ConfigurationProvide */ public String getSSOTagetIdentifier() throws ConfigurationException { try { - return configuration.getStringValue( + String value = configuration.getStringValue( MOAIDConfigurationConstants.GENERAL_AUTH_SSO_TARGET); - + if (MiscUtil.isNotEmpty(value)) + return value.trim(); + } catch (at.gv.egiz.components.configuration.api.ConfigurationException e) { Logger.warn("Single Sign-On Target can not be read from configuration.", e); - return null; + } + + return null; } /** diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index 7122c6577..f5000581c 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -167,12 +167,14 @@ public class AuthenticationServer extends BaseAuthenticationServer { } String infoboxReadRequest = ""; - if (pendingReq.needSingleSignOnFunctionality()) { - Logger.info("SSO Login requested"); + String ssoDomainIdentifier = authConfig.getSSOTagetIdentifier(); + if (MiscUtil.isNotEmpty(ssoDomainIdentifier) && + pendingReq.needSingleSignOnFunctionality()) { + Logger.debug("SSO Login requested"); //load identityLink with SSO Target boolean isbuisness = false; - String domainIdentifier = authConfig.getSSOTagetIdentifier().trim(); - if (domainIdentifier.startsWith(PREFIX_WPBK)) { + + if (ssoDomainIdentifier.startsWith(PREFIX_WPBK)) { isbuisness = true; } else { @@ -182,10 +184,10 @@ public class AuthenticationServer extends BaseAuthenticationServer { //build ReadInfobox request infoboxReadRequest = new InfoboxReadRequestBuilder().build( - isbuisness, domainIdentifier); + isbuisness, ssoDomainIdentifier); } else { - Logger.info("Non-SSO Login requested"); + Logger.debug("Non-SSO Login requested or SSO not allowed/possible"); //build ReadInfobox request infoboxReadRequest = new InfoboxReadRequestBuilder().build( oaParam.getBusinessService(), oaParam diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferAuthenticationData.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferAuthenticationData.java index f9cb4c636..78cbd788d 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferAuthenticationData.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/data/SSOTransferAuthenticationData.java @@ -49,8 +49,9 @@ public class SSOTransferAuthenticationData implements IAuthData { public SSOTransferAuthenticationData(AuthConfiguration authConfig, AuthenticationSession authSession) throws ConfigurationException { this.authSession = authSession; - String domainIdentifier = authConfig.getSSOTagetIdentifier().trim(); - isIDPPrivateService = domainIdentifier.startsWith(MOAIDAuthConstants.PREFIX_WPBK); + String domainIdentifier = authConfig.getSSOTagetIdentifier(); + if (domainIdentifier != null) + isIDPPrivateService = domainIdentifier.startsWith(MOAIDAuthConstants.PREFIX_WPBK); } -- cgit v1.2.3 From e5e4f2b8cc2652e47d31ace6ee35e7aeab7d814a Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 7 Apr 2016 10:45:13 +0200 Subject: small default-config and handbook updates for final version 3.1.0 --- id/server/auth-edu/pom.xml | 1 + id/server/auth-final/pom.xml | 5 +- .../htmlTemplates/sendAssertionFormFull.html | 2 +- .../data/deploy/conf/moa-id/moa-id.properties | 13 +- id/server/doc/htmlTemplates/BKU-selection.html | 874 +-------------------- id/server/doc/htmlTemplates/sendAssertion.html | 581 +------------- id/server/idserverlib/pom.xml | 1 + 7 files changed, 42 insertions(+), 1435 deletions(-) (limited to 'id/server') diff --git a/id/server/auth-edu/pom.xml b/id/server/auth-edu/pom.xml index 090bb985b..43e87f2ab 100644 --- a/id/server/auth-edu/pom.xml +++ b/id/server/auth-edu/pom.xml @@ -93,6 +93,7 @@ MOA.id moa-spss-container + pom iaik_pki_module diff --git a/id/server/auth-final/pom.xml b/id/server/auth-final/pom.xml index 61eba7f22..2fb196255 100644 --- a/id/server/auth-final/pom.xml +++ b/id/server/auth-final/pom.xml @@ -77,6 +77,7 @@ MOA.id moa-spss-container + pom iaik_pki_module @@ -158,10 +159,10 @@ moa-id-module-openID - + - + Anmeldung an Online-Applikation diff --git a/id/server/data/deploy/conf/moa-id/moa-id.properties b/id/server/data/deploy/conf/moa-id/moa-id.properties index 964fe0646..a3a677a0d 100644 --- a/id/server/data/deploy/conf/moa-id/moa-id.properties +++ b/id/server/data/deploy/conf/moa-id/moa-id.properties @@ -47,13 +47,6 @@ stork.fakeIdL.countries= stork.fakeIdL.keygroup= stork.documentservice.url= - -## eIDAS protocol configuration -moa.id.protocols.eIDAS.samlengine.config.file=eIDAS/SamlEngine_basics.xml -moa.id.protocols.eIDAS.samlengine.sign.config.file=eIDAS/SignModule.xml -moa.id.protocols.eIDAS.samlengine.enc.config.file=eIDAS/EncryptModule.xml -moa.id.protocols.eIDAS.metadata.validation.truststore=eIDAS_metadata - ##Protocol configuration## #PVP2 protocols.pvp2.idp.ks.file=file:$PATH_TO_CONFIG$/conf/moa-id/keys/moa_idp[password].p12 @@ -142,6 +135,12 @@ advancedlogging.hibernate.c3p0.min_size=3 ## This additional eID moduls add special functionality to MOA-ID-Auth. ## The configuration of this modules is only needed if this modules are in use. ######## +### eIDAS protocol configuration ### +moa.id.protocols.eIDAS.samlengine.config.file=eIDAS/SamlEngine_basics.xml +moa.id.protocols.eIDAS.samlengine.sign.config.file=eIDAS/SignModule.xml +moa.id.protocols.eIDAS.samlengine.enc.config.file=eIDAS/EncryptModule.xml +moa.id.protocols.eIDAS.metadata.validation.truststore=eIDAS_metadata + ### HBV Mandate-Service client module ### modules.elga_mandate.nameID.target=urn:publicid:gv.at:cdid+GH modules.elga_mandate.service.entityID= diff --git a/id/server/doc/htmlTemplates/BKU-selection.html b/id/server/doc/htmlTemplates/BKU-selection.html index 2b0115d4a..02b86472b 100644 --- a/id/server/doc/htmlTemplates/BKU-selection.html +++ b/id/server/doc/htmlTemplates/BKU-selection.html @@ -4,847 +4,29 @@ - - - + + + + Anmeldung mittels Bürgerkarte oder Handy-Signatur
    -

    Anmeldung an: #OAName#

    +

    Anmeldung an: $OAName

    -

    #HEADER_TEXT#

    +

    $HEADER_TEXT

    -
    +
    + onClick='document.getElementById("mandateCheckBox").setAttribute("aria-checked", document.getElementById("mandateCheckBox").checked);'$MANDATECHECKED> -
    +

    Home Country Selection

    i @@ -907,16 +87,6 @@

    -
    diff --git a/id/server/doc/htmlTemplates/sendAssertion.html b/id/server/doc/htmlTemplates/sendAssertion.html index 07d018a94..7ae4b3f92 100644 --- a/id/server/doc/htmlTemplates/sendAssertion.html +++ b/id/server/doc/htmlTemplates/sendAssertion.html @@ -3,556 +3,7 @@ - - + Anmeldung an Online-Applikation @@ -574,25 +25,21 @@
    -

    Anmeldung an: #OAName#

    +

    Anmeldung an: $OAName

    -
    + - - - - + +
    -
    + - - - - + +
    @@ -600,18 +47,6 @@
    -
    diff --git a/id/server/idserverlib/pom.xml b/id/server/idserverlib/pom.xml index c1533eeb7..fb6ba1bc6 100644 --- a/id/server/idserverlib/pom.xml +++ b/id/server/idserverlib/pom.xml @@ -113,6 +113,7 @@ axis + pom -- cgit v1.2.3 From 581d87d939820b9e74130279692f2825baff6594 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 7 Apr 2016 16:23:18 +0200 Subject: add initial version of a virtual IDP REST URL rewrite filter --- .../interceptor/VHostUrlRewriteServletFilter.java | 185 +++++++++++++++++++++ .../at/gv/egovernment/moa/id/util/HTTPUtils.java | 11 ++ .../moa/id/auth/MOAIDAuthSpringInitializer.java | 13 +- 3 files changed, 203 insertions(+), 6 deletions(-) create mode 100644 id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/VHostUrlRewriteServletFilter.java (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/VHostUrlRewriteServletFilter.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/VHostUrlRewriteServletFilter.java new file mode 100644 index 000000000..93d74d7ef --- /dev/null +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/interceptor/VHostUrlRewriteServletFilter.java @@ -0,0 +1,185 @@ +/* + * Copyright 2014 Federal Chancellery Austria + * MOA-ID has been developed in a cooperation between BRZ, the Federal + * Chancellery Austria - ICT staff unit, and Graz University of Technology. + * + * Licensed under the EUPL, Version 1.1 or - as soon they will be approved by + * the European Commission - subsequent versions of the EUPL (the "Licence"); + * You may not use this work except in compliance with the Licence. + * You may obtain a copy of the Licence at: + * http://www.osor.eu/eupl/ + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the Licence is distributed on an "AS IS" basis, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the Licence for the specific language governing permissions and + * limitations under the Licence. + * + * This product combines work with different licenses. See the "NOTICE" text + * file for details on the various modules and licenses. + * The "NOTICE" text file is part of the distribution. Any derivative works + * that you distribute must include a readable copy of the "NOTICE" text file. + */ +package at.gv.egovernment.moa.id.auth.servlet.interceptor; + +import java.io.IOException; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.List; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; + +import org.springframework.context.ApplicationContext; + +import at.gv.egovernment.moa.id.commons.api.AuthConfiguration; +import at.gv.egovernment.moa.id.commons.api.exceptions.ConfigurationException; +import at.gv.egovernment.moa.id.util.HTTPUtils; +import at.gv.egovernment.moa.logging.Logger; + +/** + * @author tlenz + * + */ +public class VHostUrlRewriteServletFilter implements Filter { + + private static final String VHOST_PATH = "/vhost/"; + private static final String AUTHURL = "authURL"; + + + private ApplicationContext context = null; + + public VHostUrlRewriteServletFilter(ApplicationContext context) { + Logger.info("Register vHost Servelt Filter"); + this.context = context; + + } + + /* (non-Javadoc) + * @see javax.servlet.Filter#init(javax.servlet.FilterConfig) + */ + @Override + public void init(FilterConfig filterConfig) throws ServletException { + + } + + /* (non-Javadoc) + * @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain) + */ + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) + throws IOException, ServletException { + HttpServletRequest httpReq = (HttpServletRequest) request; + try { + AuthConfiguration authConfig = context.getBean(AuthConfiguration.class); + List configuredPublicURLPrefix = authConfig.getPublicURLPrefix(); + + //check if End-Point is valid + String publicURLString = HTTPUtils.extractAuthURLFromRequest(httpReq); + URL publicURL; + try { + publicURL = new URL(publicURLString); + + } catch (MalformedURLException e) { + Logger.error("IDP AuthenticationServiceURL Prefix is not a valid URL." + publicURLString, e); + throw new ConfigurationException("1299", null, e); + + } + + //check if virtual IDPs are enabled + if (!authConfig.isVirtualIDPsEnabled()) { + Logger.trace("Virtual IDPs are disabled. Use default IDP PublicURLPrefix from configuration: " + configuredPublicURLPrefix.get(0)); + httpReq.setAttribute(AUTHURL, configuredPublicURLPrefix.get(0)); + chain.doFilter(request, response); + + } else { + String authURLString = HTTPUtils.extractAuthServletPathFromRequest(httpReq); + URL authURL; + try { + authURL = new URL(authURLString); + + } catch (MalformedURLException e) { + Logger.error("IDP AuthenticationServiceURL Prefix is not a valid URL." + authURLString, e); + throw new ConfigurationException("1299", null, e); + + } + + Logger.debug("Extract AuthenticationServiceURL: " + authURLString); + URL resultURL = null; + + for (String el : configuredPublicURLPrefix) { + try { + URL configuredURL = new URL(el); + + //get Ports from URL + int configPort = configuredURL.getPort(); + if (configPort == -1) + configPort = configuredURL.getDefaultPort(); + + int authURLPort = authURL.getPort(); + if (authURLPort == -1) + authURLPort = authURL.getDefaultPort(); + + //check AuthURL against ConfigurationURL + if (configuredURL.getHost().equals(authURL.getHost()) && + configPort == authURLPort && + authURL.getPath().startsWith(configuredURL.getPath())) { + Logger.debug("Select configurated PublicURLPrefix: " + configuredURL + + " for authURL: " + authURLString); + resultURL = configuredURL; + } + + } catch (MalformedURLException e) { + Logger.error("Configurated IDP PublicURLPrefix is not a valid URL." + el); + + } + } + + if (resultURL == null) { + Logger.warn("Extract AuthenticationServiceURL: " + authURL + " is NOT found in configuration."); + throw new ConfigurationException("config.25", new Object[]{authURLString}); + + } else { + httpReq.setAttribute(AUTHURL, resultURL.toExternalForm()); + + } + + String servletPath = httpReq.getServletPath(); + if (servletPath.startsWith(VHOST_PATH)) { + Logger.trace("Found V-IDP selection via REST URL ... "); + String vHostDescriptor = resultURL.toExternalForm().substring(0, publicURLString.length()); + String requestedServlet = authURLString.substring(0, vHostDescriptor.length()); + String newURL = publicURL.toExternalForm().concat(requestedServlet); + httpReq.setAttribute(AUTHURL, newURL); + httpReq.getRequestDispatcher(newURL).forward(httpReq, response); + + } else { + Logger.trace("Found V-IDP selection via Domain ..."); + chain.doFilter(request, response); + + } + + } + + } catch (ConfigurationException e) { + + + } + + } + + /* (non-Javadoc) + * @see javax.servlet.Filter#destroy() + */ + @Override + public void destroy() { + // TODO Auto-generated method stub + + } + +} diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPUtils.java index d2499af9d..4cb6af127 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPUtils.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/HTTPUtils.java @@ -173,6 +173,17 @@ public class HTTPUtils { } + /** + * Extract the IDP requested URL from authrequest + * + * @param req HttpServletRequest + * @return RequestURL which ends always without / + */ + public static String extractAuthServletPathFromRequest(HttpServletRequest req) { + return extractAuthURLFromRequest(req).concat(req.getServletPath()); + + } + public static String addURLParameter(String url, String paramname, String paramvalue) { String param = paramname + "=" + paramvalue; diff --git a/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java b/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java index 636a3ed03..327d659ec 100644 --- a/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java +++ b/id/server/moa-id-spring-initializer/src/main/java/at/gv/egovernment/moa/id/auth/MOAIDAuthSpringInitializer.java @@ -98,9 +98,7 @@ public class MOAIDAuthSpringInitializer implements WebApplicationInitializer { MOAIDAuthSpringInitializer.class)); } } - - - + Logger.debug("Refreshing context "+ rootContext); rootContext.refresh(); @@ -108,8 +106,7 @@ public class MOAIDAuthSpringInitializer implements WebApplicationInitializer { Logger.trace("Final Beans in "+ rootContext); dumpBeanDefinitions(rootContext); - - + Logger.info("Registering dispatcher configuration"); ServletRegistration.Dynamic dispatcher = servletContext.addServlet( "dispatcher", new DispatcherServlet(rootContext)); @@ -123,7 +120,11 @@ public class MOAIDAuthSpringInitializer implements WebApplicationInitializer { Logger.info("=============== Register RequestContextListener! ==============="); servletContext.addListener(new RequestContextListener()); - + +// Logger.info("=============== Register RequestFilter! ==============="); +// servletContext.addFilter("vHost RequestFilter", new VHostUrlRewriteServletFilter(rootContext)) +// .addMappingForUrlPatterns(null, false, "/*"); + Logger.info("Basic Context initalisation finished --> Start MOA-ID-Auth initialisation process ..."); MOAIDAuthInitializer.initialize(rootContext); Logger.info(MOAIDMessageProvider.getInstance().getMessage( -- cgit v1.2.3 From 5ad752b76eed7c345638ecd67f180919a4f9d3d7 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Thu, 7 Apr 2016 16:24:05 +0200 Subject: change MOA-ID version commands in default configuration --- id/server/data/deploy/conf/moa-id/moa-id.properties | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/moa-id.properties b/id/server/data/deploy/conf/moa-id/moa-id.properties index a3a677a0d..784f66602 100644 --- a/id/server/data/deploy/conf/moa-id/moa-id.properties +++ b/id/server/data/deploy/conf/moa-id/moa-id.properties @@ -5,24 +5,24 @@ ****** -##General MOA-ID 3.0 Configuration +##General MOA-ID 3.x Configuration ##For Testing configuration.validation.certificate.QC.ignore=false protocols.pvp2.assertion.encryption.active=false protocols.pvp2.schemavalidation=true -##General MOA-ID 2.0 operations -#MOA-ID 2.0 session information encryption key (PassPhrase) +##General MOA-ID 3.x operations +#MOA-ID 3.x session information encryption key (PassPhrase) configuration.moasession.key=SessionEncryptionKey configuration.moaconfig.key=ConfigurationEncryptionKey -#MOA-ID 2.0 Monitoring Servlet +#MOA-ID 3.x Monitoring Servlet configuration.monitoring.active=false configuration.monitoring.message.success=All Tests passed! configuration.monitoring.test.identitylink.url=$PATH_TO_CONFIG$/conf/moa-id/monitoring/monitoring_idl.xml -#MOA-ID 2.0 Advanced Logging +#MOA-ID 3.x Advanced Logging configuration.advancedlogging.active=false ##Webservice Client Configuration @@ -65,7 +65,7 @@ protocols.oauth20.jwt.ks.key.name=oauth protocols.oauth20.jwt.ks.key.password=password ##Database configuration## -#Hibnerate configuration for MOA-ID 2.0 session store +#Hibnerate configuration for MOA-ID 3.x session store moasession.hibernate.dialect=org.hibernate.dialect.MySQLDialect moasession.hibernate.connection.url=jdbc:mysql://localhost/moa-id-session?charSet=utf-8 moasession.hibernate.connection.charSet=utf-8 @@ -86,7 +86,7 @@ moasession.hibernate.c3p0.max_size=20 moasession.hibernate.c3p0.max_statements=0 moasession.hibernate.c3p0.min_size=3 -#Hibnerate configuration for MOA-ID 2.0 configuration +#Hibnerate configuration for MOA-ID 3.x configuration configuration.hibernate.dialect=org.hibernate.dialect.MySQLDialect configuration.jpaVendorAdapter.generateDdl=true configuration.hibernate.show_sql=false @@ -109,7 +109,7 @@ configuration.dbcp.testWhileIdle=false configuration.dbcp.validationQuery=SELECT 1 # -#Hibnerate configuration for MOA-ID 2.0 advanced statistic logging +#Hibnerate configuration for MOA-ID 3.x advanced statistic logging advancedlogging.hibernate.dialect=org.hibernate.dialect.MySQLDialect advancedlogging.hibernate.connection.url=jdbc:mysql://localhost/moa-id-statistic?charSet=utf-8&autoReconnect=true advancedlogging.hibernate.connection.charSet=utf-8 -- cgit v1.2.3 From 1e66fa62ef2114aa412e4c207c8180c18aa07a0b Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 06:22:13 +0200 Subject: fix bug in PVP2 assertion builder. - https://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf does not allow 'NotBefore' attribute in when 'Method' contains 'urn:oasis:names:tc:SAML:2.0:cm:bearer' (see 554 - 560 chapter 4.1.4.2) --- .../moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java index 68301d000..483bcb1ec 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java @@ -436,7 +436,7 @@ public class PVP2AssertionBuilder implements PVPConstants { .createSAMLObject(SubjectConfirmationData.class); subjectConfirmationData.setInResponseTo(authnRequest.getID()); subjectConfirmationData.setNotOnOrAfter(new DateTime(authData.getSsoSessionValidTo().getTime())); - subjectConfirmationData.setNotBefore(date); +// subjectConfirmationData.setNotBefore(date); subjectConfirmationData.setRecipient(assertionConsumerService.getLocation()); -- cgit v1.2.3 From 41882a0c5601dda478c2749ac99c2087b864c912 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 07:48:40 +0200 Subject: change logLevel to warn --- .../java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java index fd2e03afa..d87480cc1 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java @@ -221,7 +221,7 @@ public abstract class AbstractController extends MOAIDAuthConstants { Logger.warn(loggedException.getMessage(), loggedException); } else { - Logger.info(loggedException.getMessage()); + Logger.warn(loggedException.getMessage()); } } -- cgit v1.2.3 From 08c3ad78e9e6607a0f72dd89b052464f8655ebe2 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 08:12:40 +0200 Subject: fix typo in default BKU-Selection template --- id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html | 4 ++-- id/server/doc/htmlTemplates/BKU-selection.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html index 02b86472b..6c70b57b3 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html @@ -37,13 +37,13 @@
    - OnlineBKU
    - HandyBKU diff --git a/id/server/doc/htmlTemplates/BKU-selection.html b/id/server/doc/htmlTemplates/BKU-selection.html index 02b86472b..6c70b57b3 100644 --- a/id/server/doc/htmlTemplates/BKU-selection.html +++ b/id/server/doc/htmlTemplates/BKU-selection.html @@ -37,13 +37,13 @@
    - OnlineBKU
    - HandyBKU -- cgit v1.2.3 From 19cbabff11dd919e40eaef5e8eb50d4e35c7421f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 09:53:57 +0200 Subject: fix typo in redirectTarget parameter --- .../gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java index 18495381e..ef81af94b 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/builder/GetIdentityLinkFormBuilder.java @@ -174,7 +174,7 @@ public class GetIdentityLinkFormBuilder extends Builder { htmlForm = replaceTag(htmlForm, COLOR_TAG, FormBuildUtils.getDefaultMap().get(FormBuildUtils.PARAM_MAIN_BACKGROUNDCOLOR), false, ALL); //set redirect target - if (oaParam != null && MiscUtil.isNotEmpty(oaParam.getConfigurationValue(oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETREDIRECTTARGET)))) + if (oaParam != null && MiscUtil.isNotEmpty(oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETREDIRECTTARGET))) htmlForm = replaceTag(htmlForm, REDIRECTTARGETTAG, oaParam.getConfigurationValue(MOAIDConfigurationConstants.SERVICE_AUTH_TEMPLATES_CUSTOMIZATION_APPLETREDIRECTTARGET), false, ALL); else -- cgit v1.2.3 From 9231c84c9a509ba75b3e92a286941cc0792982f6 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 09:54:25 +0200 Subject: fix configurationTool BKU-selection preview problem --- .../deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html index 02b86472b..6c70b57b3 100644 --- a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html @@ -37,13 +37,13 @@
    - OnlineBKU
    - HandyBKU -- cgit v1.2.3 From 007475a7d2df25efa5c958a859fa0dc4c923c687 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 09:57:35 +0200 Subject: fix typo in sendAssertionFormFull backup template --- .../src/main/resources/templates/sendAssertionFormFull.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/moa-id-frontend-resources/src/main/resources/templates/sendAssertionFormFull.html b/id/server/moa-id-frontend-resources/src/main/resources/templates/sendAssertionFormFull.html index a9f0c4238..7ae4b3f92 100644 --- a/id/server/moa-id-frontend-resources/src/main/resources/templates/sendAssertionFormFull.html +++ b/id/server/moa-id-frontend-resources/src/main/resources/templates/sendAssertionFormFull.html @@ -3,7 +3,7 @@ - + Anmeldung an Online-Applikation -- cgit v1.2.3 From 5b3041239452f0f064a6fea1e68e9b2c96a181f2 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 13:39:48 +0200 Subject: fix type in javascript template --- id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js index eadb65b2b..a463bae65 100644 --- a/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js +++ b/id/server/data/deploy/conf/moa-id/htmlTemplates/javascript_tempalte.js @@ -142,7 +142,7 @@ function isIE() { var image = document.getElementById("bkuimage"); var srcatt = image.getAttribute("src"); var last = srcatt.substring(srcatt.lastIndexOf('/')+1); - srcatt = srcatt.replace(last,'online-bku-deactivated.png'); + srcatt = srcatt.replace(last,'karte_deactivated.png'); image.setAttribute("src",srcatt); -- cgit v1.2.3 From 4790e826491e753882a6da8b414db1ab34924620 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 13:41:52 +0200 Subject: some Update of ELGA MandateService client implementation --- .../java/at/gv/egovernment/moa/id/util/Random.java | 8 ++++++-- .../tasks/ReceiveElgaMandateResponseTask.java | 23 +++++++++++++--------- .../elgamandates/tasks/RequestELGAMandateTask.java | 20 +++++++++++++++++-- 3 files changed, 38 insertions(+), 13 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/Random.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/Random.java index 47f784c33..ba45a3679 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/Random.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/Random.java @@ -99,8 +99,12 @@ public class Random { char preFix = allowedPreFix[Math.abs(random.nextInt() % allowedPreFix.length)]; //generate ID - return preFix + new String(Hex.encodeHex(Bytes.concat(now.getBytes(), randValue))); // 20 bytes = 160 bits - + String returnValue = preFix + new String(Hex.encodeHex(Bytes.concat(now.getBytes(), randValue))); // 20 bytes = 160 bits + if (returnValue.length() > 40) + return returnValue.substring(0, 40); + else + return returnValue; + } diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java index 5604b7640..07bde7762 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/ReceiveElgaMandateResponseTask.java @@ -149,16 +149,21 @@ public class ReceiveElgaMandateResponseTask extends AbstractAuthServletTask { //load MOASession object defaultTaskInitialization(request, executionContext); + + /** + * Mandate Reference-Value is generated from ELGA MandateServie --> + * MOA-ID generated reference value is not equal to reference-value from ELGA MandateService + * But MOA-ID refernece-value is also validated in 'inResponseTo' attribute from ELGA MandateService response + */ //validate receive mandate reference-value - //TODO: update if ReferenceValue Discussion is finished - String responseRefValue = extractor.getSingleAttributeValue(PVPConstants.MANDATE_REFERENCE_VALUE_NAME); - if (!moasession.getMandateReferenceValue().equals(responseRefValue)) { - Logger.warn("PVP Response from ELGA mandate-service contains a not valid MandateReferenceValue."); - throw new AssertionValidationExeption("sp.pvp2.07", - new Object[]{ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING, - PVPConstants.MANDATE_REFERENCE_VALUE_FRIENDLY_NAME}); - - } +// String responseRefValue = extractor.getSingleAttributeValue(PVPConstants.MANDATE_REFERENCE_VALUE_NAME); +// if (!moasession.getMandateReferenceValue().equals(responseRefValue)) { +// Logger.warn("PVP Response from ELGA mandate-service contains a not valid MandateReferenceValue."); +// throw new AssertionValidationExeption("sp.pvp2.07", +// new Object[]{ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING, +// PVPConstants.MANDATE_REFERENCE_VALUE_FRIENDLY_NAME}); +// +// } Logger.debug("Validation of PVP Response from ELGA mandate-service is complete."); diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java index 6a7858575..fd918c7f4 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/tasks/RequestELGAMandateTask.java @@ -150,9 +150,25 @@ public class RequestELGAMandateTask extends AbstractAuthServletTask { } } + //build subjectNameID with bPK-Type Prefix + String bPKPrefix = null; + if (configTarget.startsWith(Constants.URN_PREFIX_WBPK)) + bPKPrefix = configTarget.substring((Constants.URN_PREFIX_WBPK + "+").length()); + + else if (configTarget.startsWith(Constants.URN_PREFIX_CDID)) + bPKPrefix = configTarget.substring((Constants.URN_PREFIX_CDID + "+").length()); + + if (bPKPrefix == null) { + throw new MOAIDException("service.10", + new Object[]{ELGAMandatesAuthConstants.MODULE_NAME_FOR_LOGGING, "Configurated bPK-Type is wrong."}); + + } + //set bPK of representative as SAML2 subjectNameID - authnReqConfig.setSubjectNameID(representativeBPK ); - authnReqConfig.setSubjectNameIDQualifier(configTarget); + authnReqConfig.setSubjectNameID(bPKPrefix + ":" + representativeBPK ); + + //is not recommended from ELGA + //authnReqConfig.setSubjectNameIDQualifier(configTarget); //set MandateReferenceValue as RequestID authnReqConfig.setRequestID(moasession.getMandateReferenceValue()); -- cgit v1.2.3 From 361fe44d40c2fdec3d2be10334a16c537166a0e2 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Fri, 8 Apr 2016 14:10:58 +0200 Subject: update PVP SubjectNameID generation in case of ELGA MandateService is used --- .../protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java index 483bcb1ec..8ddd2cb39 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/builder/assertion/PVP2AssertionBuilder.java @@ -316,6 +316,15 @@ public class PVP2AssertionBuilder implements PVPConstants { //no sourcePin is included --> search for bPK bpk = authData.getGenericData(PVPConstants.MANDATE_NAT_PER_BPK_NAME, String.class); + try { + if (bpk.contains(":")) + bpk = bpk.split(":")[1]; + + } catch (Exception e) { + Logger.warn("Can not split bPK from mandator attribute!", e); + + } + //set bPK-Type from configuration, because it MUST be equal to service-provider type if (oaParam.getBusinessService()) { if (oaParam.getIdentityLinkDomainIdentifier().startsWith(AuthenticationSession.REGISTERANDORDNR_PREFIX_)) -- cgit v1.2.3 From 0ac65832ded28f7522a570ed114e81b3ed30d277 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 11 Apr 2016 13:30:46 +0200 Subject: BKU selection template - hide useMandate checkbox if mandates are not in use --- .../deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html | 2 +- id/server/data/deploy/conf/moa-id/htmlTemplates/loginFormFull.html | 2 +- id/server/doc/htmlTemplates/BKU-selection.html | 2 +- .../src/main/resources/templates/loginFormFull.html | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'id/server') diff --git a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html index 6c70b57b3..32f0a7d4d 100644 --- a/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html +++ b/id/server/data/deploy/conf/moa-id-configuration/htmlTemplates/loginFormFull.html @@ -22,7 +22,7 @@

    $HEADER_TEXT

    -
    +
    $HEADER_TEXT
    -
    +
    $HEADER_TEXT
    -
    +
    $HEADER_TEXT
    -
    +
    Date: Mon, 11 Apr 2016 16:07:39 +0200 Subject: add ELGA Mandate-Service client-module to final build --- id/server/auth-final/pom.xml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'id/server') diff --git a/id/server/auth-final/pom.xml b/id/server/auth-final/pom.xml index 2fb196255..0c42c9deb 100644 --- a/id/server/auth-final/pom.xml +++ b/id/server/auth-final/pom.xml @@ -159,15 +159,10 @@ moa-id-module-openID - - - + MOA.id.server.modules -- cgit v1.2.3 From 2f1fb9860c455fa706a5bc9f07e0ec5dd41d376f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 9 May 2016 09:39:44 +0200 Subject: fix type in Redirect servlet implementation --- .../java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java index d9386d404..3eaede028 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/RedirectServlet.java @@ -131,7 +131,7 @@ public class RedirectServlet { DefaultGUIFormBuilderConfiguration.VIEW_REDIRECT, null); config.putCustomParameter(URL, url); - guiBuilder.build(resp, config, "RedirectForm"); + guiBuilder.build(resp, config, "RedirectForm.html"); } -- cgit v1.2.3 From a4d18ffb736c29d6f7cb026df50fb8a8e4898f9f Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 9 May 2016 09:43:56 +0200 Subject: fix problem with PVP protocol and legacy mode (SP side BKU selection) --- .../main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java index 47ea91753..885d03fd8 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/util/ParamValidatorUtils.java @@ -539,9 +539,7 @@ public class ParamValidatorUtils extends MOAIDAuthConstants{ return false; } - if (StringUtils.isEmpty(oaURL) - //|| StringUtils.isEmpty(templateURL) - || StringUtils.isEmpty(bkuURL) ) + if (StringUtils.isEmpty(bkuURL)) return false; else return true; -- cgit v1.2.3 From dbb7e7d21f318f5969521a1e3986101218b2b766 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 9 May 2016 09:45:59 +0200 Subject: update Struts to 2.3.28.1 (https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3081) switch MOA-ID Version to 3.1.1 --- id/server/modules/moa-id-module-openID/pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'id/server') diff --git a/id/server/modules/moa-id-module-openID/pom.xml b/id/server/modules/moa-id-module-openID/pom.xml index 4684c8032..2bd3b6b4f 100644 --- a/id/server/modules/moa-id-module-openID/pom.xml +++ b/id/server/modules/moa-id-module-openID/pom.xml @@ -41,13 +41,13 @@ com.google.http-client google-http-client-jackson2 - 1.21.0 + 1.22.0 test com.google.oauth-client google-oauth-client-jetty - 1.21.0 + 1.22.0 test -- cgit v1.2.3 From 8175d726cecf103b3a433313f4d2ef54d09ebadf Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 9 May 2016 11:05:15 +0200 Subject: fix some problems in configuration tool --- .../config/ConfigurationMigrationUtils.java | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'id/server') diff --git a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java index 63d8f463c..fb2ef456c 100644 --- a/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java +++ b/id/server/moa-id-commons/src/main/java/at/gv/egovernment/moa/id/commons/config/ConfigurationMigrationUtils.java @@ -22,8 +22,6 @@ moaidconfigmoaidconfigmoaidconfig * Copyright 2014 Federal Chancellery Austria */ package at.gv.egovernment.moa.id.commons.config; -import iaik.x509.X509Certificate; - import java.io.IOException; import java.math.BigInteger; import java.security.cert.CertificateException; @@ -88,6 +86,7 @@ import at.gv.egovernment.moa.id.commons.validation.TargetValidator; import at.gv.egovernment.moa.logging.Logger; import at.gv.egovernment.moa.util.Base64Utils; import at.gv.egovernment.moa.util.MiscUtil; +import iaik.x509.X509Certificate; /** * @author tlenz @@ -1259,10 +1258,16 @@ public class ConfigurationMigrationUtils { if (list.contains(MOA_CONFIG_PROTOCOL_SAML1)) result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_SAML1_LEGACY, Boolean.TRUE.toString()); + else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_SAML1_LEGACY, + Boolean.FALSE.toString()); if (list.contains(MOA_CONFIG_PROTOCOL_PVP2)) result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_PVP2X_LEGACY, Boolean.TRUE.toString()); + else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_PVP2X_LEGACY, + Boolean.FALSE.toString()); } SAML1 saml1 = protocols.getSAML1(); @@ -1277,14 +1282,18 @@ public class ConfigurationMigrationUtils { result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_SAML1_SOURCEID, saml1.getSourceID()); - } + } else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_SAML1_ENABLED, + Boolean.FALSE.toString()); OAuth oauth = protocols.getOAuth(); if (oauth != null) { result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_OPENID_ENABLED, String.valueOf(oauth.isIsActive())); - } + } else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_OPENID_ENABLED, + Boolean.FALSE.toString()); PVP2 pvp2 = protocols.getPVP2(); if (pvp2 != null) { @@ -1323,7 +1332,10 @@ public class ConfigurationMigrationUtils { result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_PVP2X_METADATA_ORG_URL, org.getURL()); } - } + + } else + result.put(MOAIDConfigurationConstants.GENERAL_PROTOCOLS_PVP2X_ENABLED, + Boolean.FALSE.toString()); } SecurityLayer seclayer = auth.getSecurityLayer(); -- cgit v1.2.3 From c3e07d7fb87b2d132ffc838e4878b9479da361a7 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 9 May 2016 16:06:56 +0200 Subject: fix ContentType typo, which make problems with IE11 in some cases --- .../moa/id/auth/servlet/AbstractController.java | 10 ++++++---- .../moa/id/auth/servlet/GUILayoutBuilderServlet.java | 4 ++-- .../egovernment/moa/id/protocols/pvp2x/MetadataAction.java | 4 +++- .../moa/id/auth/frontend/builder/GUIFormBuilderImpl.java | 2 +- .../modules/internal/tasks/CreateIdentityLinkFormTask.java | 6 ++++-- .../egovernment/moa/id/util/CitizenCardServletUtils.java | 6 ++++-- .../auth/modules/eidas/tasks/GenerateAuthnRequestTask.java | 6 ++++-- .../controller/ELGAMandateMetadataController.java | 4 +++- .../modules/ssotransfer/task/RestoreSSOSessionTask.java | 3 ++- .../controller/FederatedAuthMetadataController.java | 4 +++- .../id/protocols/saml1/GetAuthenticationDataService.java | 14 ++++++++------ 11 files changed, 40 insertions(+), 23 deletions(-) (limited to 'id/server') diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java index d87480cc1..e3efdeac0 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/AbstractController.java @@ -32,6 +32,8 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.ExceptionHandler; +import com.google.common.net.MediaType; + import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; import at.gv.egovernment.moa.id.advancedlogging.StatisticLogger; @@ -86,7 +88,7 @@ public abstract class AbstractController extends MOAIDAuthConstants { @ExceptionHandler({Exception.class}) public void GenericExceptionHandler(HttpServletResponse resp, Exception exception) throws IOException { Logger.error("Internel Server Error." , exception); - resp.setContentType("text/html;charset=UTF-8"); + resp.setContentType(MediaType.HTML_UTF_8.toString()); resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Internal Server Error!" + "(Errorcode=9199" +" | Description="+ exception.getMessage() + ")"); @@ -97,7 +99,7 @@ public abstract class AbstractController extends MOAIDAuthConstants { @ExceptionHandler({IOException.class}) public void IOExceptionHandler(HttpServletResponse resp, Throwable exception) { Logger.error("Internel Server Error." , exception); - resp.setContentType("text/html;charset=UTF-8"); + resp.setContentType(MediaType.HTML_UTF_8.toString()); resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); return; @@ -232,7 +234,7 @@ public abstract class AbstractController extends MOAIDAuthConstants { String code = utils.mapInternalErrorToExternalError( ((InvalidProtocolRequestException)e).getMessageId()); String descr = e.getMessage(); - resp.setContentType("text/html;charset=UTF-8"); + resp.setContentType(MediaType.HTML_UTF_8.toString()); resp.sendError(HttpServletResponse.SC_BAD_REQUEST, "Protocol validation FAILED!" + "(Errorcode=" + code + " | Description=" + descr + ")"); @@ -315,7 +317,7 @@ public abstract class AbstractController extends MOAIDAuthConstants { private void internalMOAIDExceptionHandler(HttpServletRequest req, HttpServletResponse resp, Exception e, boolean writeExceptionToStatisicLog) throws IOException { if (e instanceof ProtocolNotActiveException) { resp.getWriter().write(e.getMessage()); - resp.setContentType("text/html;charset=UTF-8"); + resp.setContentType(MediaType.HTML_UTF_8.toString()); resp.sendError(HttpServletResponse.SC_FORBIDDEN, e.getMessage()); } else if (e instanceof AuthnRequestValidatorException) { diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java index babc87866..9b658d81b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/servlet/GUILayoutBuilderServlet.java @@ -85,7 +85,7 @@ public class GUILayoutBuilderServlet extends AbstractController { null); //build GUI component - formBuilder.build(resp, config, "text/css;charset=UTF-8", "CSS-Form"); + formBuilder.build(resp, config, "text/css; charset=UTF-8", "CSS-Form"); } catch (Exception e) { Logger.warn("GUI ressource:'CSS' generation FAILED."); @@ -114,7 +114,7 @@ public class GUILayoutBuilderServlet extends AbstractController { GeneralProcessEngineSignalController.ENDPOINT_BKUSELECTION_EVALUATION); //build GUI component - formBuilder.build(resp, config, "text/javascript;charset=UTF-8", "JavaScript"); + formBuilder.build(resp, config, "text/javascript; charset=UTF-8", "JavaScript"); } catch (Exception e) { Logger.warn("GUI ressource:'JavaScript' generation FAILED."); diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java index 2a688da68..b282e3a4b 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/protocols/pvp2x/MetadataAction.java @@ -28,6 +28,8 @@ import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import com.google.common.net.MediaType; + import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.advancedlogging.MOAReversionLogger; import at.gv.egovernment.moa.id.commons.api.IRequest; @@ -62,7 +64,7 @@ public class MetadataAction implements IAction { String metadataXML = metadatabuilder.buildPVPMetadata(metadataConfig); Logger.debug("METADATA: " + metadataXML); - httpResp.setContentType("text/xml"); + httpResp.setContentType(MediaType.XML_UTF_8.toString()); httpResp.getOutputStream().write(metadataXML.getBytes("UTF-8")); httpResp.getOutputStream().close(); diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java index 94fa4d977..26b37226d 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java @@ -54,7 +54,7 @@ import at.gv.egovernment.moa.util.MiscUtil; @Service("guiFormBuilder") public class GUIFormBuilderImpl implements IGUIFormBuilder { - private static final String DEFAULT_CONTENT_TYPE = "text/html;charset=UTF-8"; + private static final String DEFAULT_CONTENT_TYPE = "text/html; charset=UTF-8"; private static final String CONFIG_HTMLTEMPLATES_DIR = "htmlTemplates/"; private static final String CLASSPATH_HTMLTEMPLATES_DIR = "templates/"; diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java index e82aa8fbb..e47aff83b 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/internal/tasks/CreateIdentityLinkFormTask.java @@ -10,6 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Component; +import com.google.common.net.MediaType; + import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.advancedlogging.TransactionIDUtils; import at.gv.egovernment.moa.id.auth.AuthenticationServer; @@ -75,9 +77,9 @@ public class CreateIdentityLinkFormTask extends AbstractAuthServletTask { pendingReq, MOAIDEventConstants.AUTHPROCESS_MANDATES_REQUESTED); revisionsLogger.logEvent(pendingReq.getOnlineApplicationConfiguration(), pendingReq, MOAIDEventConstants.AUTHPROCESS_BKU_URL, moasession.getBkuURL()); - + if (!StringUtils.isEmpty(getIdentityLinkForm)) { - resp.setContentType("text/html;charset=UTF-8"); + resp.setContentType(MediaType.HTML_UTF_8.toString()); PrintWriter out = new PrintWriter(resp.getOutputStream()); out.print(getIdentityLinkForm); out.flush(); diff --git a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/util/CitizenCardServletUtils.java b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/util/CitizenCardServletUtils.java index 2a8d26566..9fbdf5cd7 100644 --- a/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/util/CitizenCardServletUtils.java +++ b/id/server/modules/moa-id-modul-citizencard_authentication/src/main/java/at/gv/egovernment/moa/id/util/CitizenCardServletUtils.java @@ -55,6 +55,8 @@ import java.net.URLEncoder; import javax.servlet.http.HttpServletResponse; +import com.google.common.net.MediaType; + import at.gv.egovernment.moa.id.auth.builder.DataURLBuilder; import at.gv.egovernment.moa.id.auth.data.AuthenticationSession; import at.gv.egovernment.moa.id.commons.MOAIDAuthConstants; @@ -91,7 +93,7 @@ public class CitizenCardServletUtils extends ServletUtils{ resp.addHeader("Location", dataURL); //TODO test impact of explicit setting charset with older versions of BKUs (HotSign) - resp.setContentType("text/xml;charset=UTF-8"); + resp.setContentType(MediaType.XML_UTF_8.toString()); OutputStream out = resp.getOutputStream(); out.write(createXMLSignatureRequestOrRedirect.getBytes("UTF-8")); @@ -127,7 +129,7 @@ public class CitizenCardServletUtils extends ServletUtils{ resp.addHeader("Location", dataURL); //TODO test impact of explicit setting charset with older versions of BKUs (HotSign) - resp.setContentType("text/xml;charset=UTF-8"); + resp.setContentType(MediaType.XML_UTF_8.toString()); OutputStream out = resp.getOutputStream(); out.write(createXMLSignatureRequestOrRedirect.getBytes("UTF-8")); diff --git a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java index c82636a8f..30c206025 100644 --- a/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java +++ b/id/server/modules/moa-id-module-eIDAS/src/main/java/at/gv/egovernment/moa/id/auth/modules/eidas/tasks/GenerateAuthnRequestTask.java @@ -35,6 +35,8 @@ import org.apache.velocity.VelocityContext; import org.apache.velocity.app.VelocityEngine; import org.springframework.stereotype.Component; +import com.google.common.net.MediaType; + import at.gv.egovernment.moa.id.advancedlogging.MOAIDEventConstants; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.frontend.velocity.VelocityProvider; @@ -176,8 +178,8 @@ public class GenerateAuthnRequestTask extends AbstractAuthServletTask { Logger.debug("Template merge done"); Logger.debug("Sending html content: " + writer.getBuffer().toString()); - - response.setContentType("text/html;charset=UTF-8"); + + response.setContentType(MediaType.HTML_UTF_8.toString()); response.getOutputStream().write(writer.getBuffer().toString().getBytes("UTF-8")); revisionsLogger.logEvent(oaConfig, pendingReq, diff --git a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java index 29bc5ee12..5720e4827 100644 --- a/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java +++ b/id/server/modules/moa-id-module-elga_mandate_service/src/main/java/at/gv/egovernment/moa/id/auth/modules/elgamandates/controller/ELGAMandateMetadataController.java @@ -32,6 +32,8 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import com.google.common.net.MediaType; + import at.gv.egovernment.moa.id.auth.modules.elgamandates.ELGAMandatesAuthConstants; import at.gv.egovernment.moa.id.auth.modules.elgamandates.config.ELGAMandatesMetadataConfiguration; import at.gv.egovernment.moa.id.auth.modules.elgamandates.utils.ELGAMandatesCredentialProvider; @@ -80,7 +82,7 @@ public class ELGAMandateMetadataController extends AbstractController { String xmlMetadata = metadatabuilder.buildPVPMetadata(metadataConfig); //write response - resp.setContentType("text/xml"); + resp.setContentType(MediaType.XML_UTF_8.toString()); resp.getOutputStream().write(xmlMetadata.getBytes("UTF-8")); resp.getOutputStream().close(); diff --git a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java index dd133e4fb..003ce8c21 100644 --- a/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java +++ b/id/server/modules/moa-id-module-ssoTransfer/src/main/java/at/gv/egovernment/moa/id/auth/modules/ssotransfer/task/RestoreSSOSessionTask.java @@ -39,6 +39,7 @@ import org.opensaml.saml2.core.Response; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; +import com.google.common.net.MediaType; import com.google.gson.JsonObject; import com.google.gson.JsonParser; @@ -216,7 +217,7 @@ public class RestoreSSOSessionTask extends AbstractAuthServletTask { SSOTransferConstants.SSOCONTAINER_KEY_STATUS, "OK"); response.setStatus(HttpServletResponse.SC_OK); - response.setContentType("text/html;charset=UTF-8"); + response.setContentType(MediaType.HTML_UTF_8.toString()); PrintWriter out = new PrintWriter(response.getOutputStream()); out.print(responseMsg.toString()); out.flush(); diff --git a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/controller/FederatedAuthMetadataController.java b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/controller/FederatedAuthMetadataController.java index 98240a636..02356d74a 100644 --- a/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/controller/FederatedAuthMetadataController.java +++ b/id/server/modules/moa-id-modules-federated_authentication/src/main/java/at/gv/egovernment/moa/id/auth/modules/federatedauth/controller/FederatedAuthMetadataController.java @@ -32,6 +32,8 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import com.google.common.net.MediaType; + import at.gv.egovernment.moa.id.auth.modules.federatedauth.FederatedAuthConstants; import at.gv.egovernment.moa.id.auth.modules.federatedauth.config.FederatedAuthMetadataConfiguration; import at.gv.egovernment.moa.id.auth.modules.federatedauth.utils.FederatedAuthCredentialProvider; @@ -80,7 +82,7 @@ public class FederatedAuthMetadataController extends AbstractController { String xmlMetadata = metadatabuilder.buildPVPMetadata(metadataConfig); //write response - resp.setContentType("text/xml"); + resp.setContentType(MediaType.XML_UTF_8.toString()); resp.getOutputStream().write(xmlMetadata.getBytes("UTF-8")); resp.getOutputStream().close(); diff --git a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java index b01ea666d..f00358d02 100644 --- a/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java +++ b/id/server/modules/moa-id-modules-saml1/src/main/java/at/gv/egovernment/moa/id/protocols/saml1/GetAuthenticationDataService.java @@ -69,6 +69,8 @@ import org.w3c.dom.Element; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; +import com.google.common.net.MediaType; + import at.gv.egovernment.moa.id.auth.builder.SAMLResponseBuilder; import at.gv.egovernment.moa.id.auth.exception.AuthenticationException; import at.gv.egovernment.moa.id.auth.frontend.velocity.VelocityProvider; @@ -136,13 +138,13 @@ public class GetAuthenticationDataService extends AbstractController implements String respString = DOMUtils.serializeNode(soapResp, true); - resp.setContentType("text/xml;charset=UTF-8"); + resp.setContentType(MediaType.XML_UTF_8.toString()); context.put(CONTEXT_SOAP_ASSERTION, respString); evaluateTemplate(context, resp, TEMPLATE_SOAP_SUCCESS); } catch (ParserConfigurationException | SAXException | IOException | TransformerException e) { Logger.error("SAML1 GetAuthenticationData receive a non-valid request.", e); - resp.setContentType("text/xml;charset=UTF-8"); + resp.setContentType(MediaType.XML_UTF_8.toString()); context.put(CONTEXT_SOAP_ISSUEINSTANT, DateTimeUtils.buildDateTimeUTC(Calendar.getInstance())); context.put(CONTEXT_SOAP_RESPONSEID, Random.nextRandom()); @@ -153,7 +155,7 @@ public class GetAuthenticationDataService extends AbstractController implements } catch (SAML1AssertionResponseBuildException e) { Logger.error("SAML1 GetAuthenticationData response build failed..", e); - resp.setContentType("text/xml;charset=UTF-8"); + resp.setContentType(MediaType.XML_UTF_8.toString()); context.put(CONTEXT_SOAP_ISSUEINSTANT, e.getIssueInstant()); context.put(CONTEXT_SOAP_REQUESTEID, e.getRequestID()); @@ -187,17 +189,17 @@ public class GetAuthenticationDataService extends AbstractController implements if (wsdl_param != null) { //print wsdl - resp.setContentType("text/xml;charset=UTF-8"); + resp.setContentType(MediaType.XML_UTF_8.toString()); evaluateTemplate(context, resp, TEMPLATE_WSDL); } else if (xsd_param != null){ //print xsd - resp.setContentType("text/xml;charset=UTF-8"); + resp.setContentType(MediaType.XML_UTF_8.toString()); evaluateTemplate(context, resp, TEMPLATE_XSD); } else { //print plain info - resp.setContentType("text/html;charset=UTF-8"); + resp.setContentType(MediaType.XML_UTF_8.toString()); evaluateTemplate(context, resp, TEMPLATE_PLAIN_INFO); } -- cgit v1.2.3