From 3fada6cef21c9b16467177d866df778203b51b4d Mon Sep 17 00:00:00 2001
From: Thomas
+ * 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.
+ * The parser use the VelocityEngine
as internal template
+ * evaluator.
*
- * @param httpReq http-request object
- * @param httpResp http-response object
- * @param config Configuration object
+ * @param httpReq http-request object
+ * @param httpResp http-response object
+ * @param config Configuration object
* @param loggerName String, which should be used from logger
*
* @throws GuiBuildException in case of an error
@@ -47,17 +49,17 @@ public interface IVelocityGuiFormBuilder extends IGuiFormBuilder {
void build(HttpServletRequest httpReq, HttpServletResponse httpResp,
IVelocityGuiBuilderConfiguration 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.
+ * The parser use the VelocityEngine
as internal template
+ * evaluator.
*
- * @param httpReq http-request object
- * @param httpResp http-response object
- * @param config Configuration object
+ * @param httpReq http-request object
+ * @param httpResp http-response object
+ * @param config Configuration object
* @param contentType http-response content-type, which should be set
- * @param loggerName String, which should be used from logger
+ * @param loggerName String, which should be used from logger
*
* @throws GuiBuildException In case of an error
*/
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java
index 7315dbf1..8f66afff 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluationContext.java
@@ -21,11 +21,12 @@ package at.gv.egiz.eaaf.core.api.idp.process;
import java.io.Serializable;
import java.util.Map;
-import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition;
+import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition;
/**
- * Context used for evaluation of condition expressions set for {@linkplain Transition Transitions}.
+ * Context used for evaluation of condition expressions set for
+ * {@linkplain Transition Transitions}.
*
* @author tknall
*
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java
index 7fa67ae4..18e4533e 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExpressionEvaluator.java
@@ -29,11 +29,13 @@ public interface ExpressionEvaluator {
/**
* Evaluates a given {@code expression} returning a boolean value.
*
- * @param expressionContext The context which can be used for evaluation of the expression.
- * @param expression The expression resulting in a boolean (must not be {@code null}).
+ * @param expressionContext The context which can be used for evaluation of the
+ * expression.
+ * @param expression The expression resulting in a boolean (must not be
+ * {@code null}).
* @return A boolean value.
* @throws IllegalArgumentException In case of an invalid {@code expression}.
- * @throws NullPointerException In case of a {@code null} expression.
+ * @throws NullPointerException In case of a {@code null} expression.
*/
boolean evaluate(ExpressionEvaluationContext expressionContext, String expression);
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java
index d4c221e0..302deae4 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessEngine.java
@@ -19,8 +19,8 @@
package at.gv.egiz.eaaf.core.api.idp.process;
-
import java.io.InputStream;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.exceptions.ProcessExecutionException;
import at.gv.egiz.eaaf.core.impl.idp.process.ProcessDefinitionParserException;
@@ -35,64 +35,71 @@ import at.gv.egiz.eaaf.core.impl.idp.process.model.ProcessDefinition;
public interface ProcessEngine {
/**
- * Registers a new process definition. Note that existing definitions with the same identifier
- * will be replaced.
+ * Registers a new process definition. Note that existing definitions with the
+ * same identifier will be replaced.
*
* @param processDefinition The process definition to be registered.
*/
void registerProcessDefinition(ProcessDefinition processDefinition);
/**
- * Registers a new process definition given as {@link InputStream}. Note that existing definitions
- * with the same identifier will be replaced.
+ * Registers a new process definition given as {@link InputStream}. Note that
+ * existing definitions with the same identifier will be replaced.
*
- * @param processDefinitionInputStream The input stream to the definition to be registered.
+ * @param processDefinitionInputStream The input stream to the definition to be
+ * registered.
* @return The process definition's identifier.
- * @throws ProcessDefinitionParserException Thrown in case of an error parsing the process
- * definition.
+ * @throws ProcessDefinitionParserException Thrown in case of an error parsing
+ * the process definition.
*/
String registerProcessDefinition(InputStream processDefinitionInputStream)
throws ProcessDefinitionParserException;
/**
- * Creates a process instance according to the referenced process definition, persists it into the
- * database and returns it identifier.
+ * Creates a process instance according to the referenced process definition,
+ * persists it into the database and returns it identifier.
*
- * Note that the method returns the identifier of a process instance which will be needed in order
- * to start a process or to continue process execution after asynchronous task execution (refer to
- * {@link #start(String)} and {@link #signal(String)} for further information).
+ * Note that the method returns the identifier of a process instance which will
+ * be needed in order to start a process or to continue process execution after
+ * asynchronous task execution (refer to {@link #start(String)} and
+ * {@link #signal(String)} for further information).
*
- * @param processDefinitionId The identifier of the respective process definition.
- * @param executionContext The execution context (may be {@code null}).
+ * @param processDefinitionId The identifier of the respective process
+ * definition.
+ * @param executionContext The execution context (may be {@code null}).
* @return The id of the newly created process instance (never {@code null}).
* @throws ProcessExecutionException Thrown in case of error, e.g. when a
- * {@code processDefinitionId} is referenced that does not exist.
+ * {@code processDefinitionId} is referenced
+ * that does not exist.
*/
String createProcessInstance(String processDefinitionId, ExecutionContext executionContext)
throws ProcessExecutionException;
/**
- * Creates a process instance according to the referenced process definition, persists it into the
- * database and returns it identifier.
+ * Creates a process instance according to the referenced process definition,
+ * persists it into the database and returns it identifier.
*
- * Note that the method returns the identifier of a process instance which will be needed in order
- * to start a process or to continue process execution after asynchronous task execution (refer to
- * {@link #start(String)} and {@link #signal(String)} for further information).
+ * Note that the method returns the identifier of a process instance which will
+ * be needed in order to start a process or to continue process execution after
+ * asynchronous task execution (refer to {@link #start(String)} and
+ * {@link #signal(String)} for further information).
*
- * @param processDefinitionId The identifier of the respective process definition.
+ * @param processDefinitionId The identifier of the respective process
+ * definition.
* @return The id of the newly created process instance (never {@code null}).
* @throws ProcessExecutionException Thrown in case of error, e.g. when a
- * {@code processDefinitionId} is referenced that does not exist.
+ * {@code processDefinitionId} is referenced
+ * that does not exist.
*/
String createProcessInstance(String processDefinitionId) throws ProcessExecutionException;
-
/**
* Delete a process instance.
*
* @param processInstanceId The identifier of the respective process.
* @throws ProcessExecutionException Thrown in case of error, e.g. when a
- * {@code processInstanceId} is referenced that does not exist.
+ * {@code processInstanceId} is referenced
+ * that does not exist.
*/
void deleteProcessInstance(String processInstanceId) throws ProcessExecutionException;
@@ -101,8 +108,10 @@ public interface ProcessEngine {
*
* @param processInstanceId The process instance id.
* @return The process instance (never {@code null}).
- * @throws IllegalArgumentException In case the process instance does not/no longer exist.
- * @throws RuntimeException In case the process instance could not be retrieved from persistence.
+ * @throws IllegalArgumentException In case the process instance does not/no
+ * longer exist.
+ * @throws RuntimeException In case the process instance could not be
+ * retrieved from persistence.
*/
ProcessInstance getProcessInstance(String processInstanceId);
@@ -114,7 +123,6 @@ public interface ProcessEngine {
*/
void start(IRequest pendingReq) throws ProcessExecutionException;
-
/**
* Resumes process execution after an asynchronous task has been executed.
*
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java
index 641eeab8..6de53432 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ProcessInstanceStoreDao.java
@@ -30,25 +30,30 @@ public interface ProcessInstanceStoreDao {
* Stores a {@link ProcessInstance} defined by {@code pIStore} in the database.
*
* @param piStore the {@link ProcessInstanceStore} to persist.
- * @throws EaafStorageException is thrown if a problem occurs while accessing the database.
+ * @throws EaafStorageException is thrown if a problem occurs while accessing
+ * the database.
*/
void saveOrUpdate(ProcessInstanceStore piStore) throws EaafException;
/**
- * Returns a {@link ProcessInstanceStore}, defined by {@code processInstanceID} from the database,
- * or {@code null} if the object could not be found.
+ * Returns a {@link ProcessInstanceStore}, defined by {@code processInstanceID}
+ * from the database, or {@code null} if the object could not be found.
*
- * @param processInstanceId the id of the {@code ProcessInstanceStore} to retrieve.
+ * @param processInstanceId the id of the {@code ProcessInstanceStore} to
+ * retrieve.
* @return a ProcessInstanceStore, or {@code null}.
- * @throws EaafStorageException is thrown if a problem occurs while accessing the database.
+ * @throws EaafStorageException is thrown if a problem occurs while accessing
+ * the database.
*/
ProcessInstanceStore load(String processInstanceId) throws EaafException;
/**
- * Deletes the {@link ProcessInstance} corresponding with the {@code processInstanceId}.
+ * Deletes the {@link ProcessInstance} corresponding with the
+ * {@code processInstanceId}.
*
* @param processInstanceId the id of the {@code ProcessInstance} to be deleted.
- * @throws EaafStorageException is thrown if a problem occurs while accessing the database.
+ * @throws EaafStorageException is thrown if a problem occurs while accessing
+ * the database.
*/
void remove(String processInstanceId) throws EaafException;
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java
index 06573403..a1fd49e5 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/Task.java
@@ -22,7 +22,6 @@ package at.gv.egiz.eaaf.core.api.idp.process;
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
-
/**
* Represents a single task to be performed upon process execution.
*
@@ -34,9 +33,10 @@ public interface Task {
/**
* Executes this task.
*
- * @param pendingReq Provides the current processed protocol request
+ * @param pendingReq Provides the current processed protocol request
* @param executionContext Provides execution related information.
- * @return The pending-request object, because Process-management works recursive
+ * @return The pending-request object, because Process-management works
+ * recursive
* @throws Exception An exception upon task execution.
*/
IRequest execute(IRequest pendingReq, ExecutionContext executionContext)
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IJsonMapper.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IJsonMapper.java
index dd7e69fd..a7e4f6fe 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IJsonMapper.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/api/utils/IJsonMapper.java
@@ -9,38 +9,43 @@ public interface IJsonMapper {
/**
* Serialize an object to a JSON string.
- *
+ *
* @param value the object to serialize
* @return a JSON string
- * @throws JsonProcessingException thrown when an error occurs during serialization
+ * @throws JsonProcessingException thrown when an error occurs during
+ * serialization
*/
String serialize(Object value) throws EaafJsonMapperException;
/**
* Deserialize a JSON string.
- *
+ *
* @param value the JSON string to deserialize
- * @param clazz optional parameter that determines the type of the returned object. If not set, an
- * {@link Object} is returned.
- * @return the deserialized JSON string as an object of type {@code clazz} or {@link Object}
- * @throws JsonParseException if the JSON string contains invalid content.
- * @throws JsonMappingException if the input JSON structure does not match structure expected for
- * result type
- * @throws IOException if an I/O problem occurs (e.g. unexpected end-of-input)
+ * @param clazz optional parameter that determines the type of the returned
+ * object. If not set, an {@link Object} is returned.
+ * @return the deserialized JSON string as an object of type {@code clazz} or
+ * {@link Object}
+ * @throws JsonParseException if the JSON string contains invalid content.
+ * @throws JsonMappingException if the input JSON structure does not match
+ * structure expected for result type
+ * @throws IOException if an I/O problem occurs (e.g. unexpected
+ * end-of-input)
*/
- * IMPORTANT: external HTML escapetion is required, because it is NOT done internally
- * during the building process
+ * IMPORTANT: external HTML escapetion is required, because it is NOT
+ * done internally during the building process
*
*/
protected abstract void putSpecificViewParameters();
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGuiFormBuilderImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGuiFormBuilderImpl.java
index 0ab5fa49..5e4af55e 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGuiFormBuilderImpl.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/AbstractVelocityGuiFormBuilderImpl.java
@@ -27,20 +27,23 @@ import java.io.StringWriter;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import at.gv.egiz.eaaf.core.api.data.EAAFConstants;
-import at.gv.egiz.eaaf.core.api.gui.IGuiBuilderConfiguration;
-import at.gv.egiz.eaaf.core.api.gui.IVelocityGuiBuilderConfiguration;
-import at.gv.egiz.eaaf.core.api.gui.IVelocityGuiFormBuilder;
-import at.gv.egiz.eaaf.core.exceptions.GuiBuildException;
-import at.gv.egiz.eaaf.core.impl.gui.velocity.VelocityProvider;
+
import org.apache.commons.lang3.StringUtils;
import org.apache.velocity.VelocityContext;
import org.apache.velocity.app.VelocityEngine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.gv.egiz.eaaf.core.api.data.EaafConstants;
+import at.gv.egiz.eaaf.core.api.gui.IGuiBuilderConfiguration;
+import at.gv.egiz.eaaf.core.api.gui.IVelocityGuiBuilderConfiguration;
+import at.gv.egiz.eaaf.core.api.gui.IVelocityGuiFormBuilder;
+import at.gv.egiz.eaaf.core.exceptions.GuiBuildException;
+import at.gv.egiz.eaaf.core.impl.gui.velocity.VelocityProvider;
+
/**
* Abstract VeloCity based GUI builder implementation.
*
@@ -50,7 +53,7 @@ import org.slf4j.LoggerFactory;
public abstract class AbstractVelocityGuiFormBuilderImpl implements IVelocityGuiFormBuilder {
private static final Logger log =
LoggerFactory.getLogger(AbstractVelocityGuiFormBuilderImpl.class);
- private static final String DEFAULT_CONTENT_TYPE = EAAFConstants.CONTENTTYPE_HTML_UTF8;
+ private static final String DEFAULT_CONTENT_TYPE = EaafConstants.CONTENTTYPE_HTML_UTF8;
private VelocityEngine engine;
@@ -82,7 +85,6 @@ public abstract class AbstractVelocityGuiFormBuilderImpl implements IVelocityGui
+ IVelocityGuiBuilderConfiguration.class.getName());
}
-
}
@Override
@@ -159,7 +161,8 @@ public abstract class AbstractVelocityGuiFormBuilderImpl implements IVelocityGui
}
/**
- * Generate a new {@link VelocityContext} and populate it with MOA-ID GUI parameters.
+ * Generate a new {@link VelocityContext} and populate it with MOA-ID GUI
+ * parameters.
*
* @param config GUI builder config
* @return Context of Velocity engine
@@ -175,8 +178,8 @@ public abstract class AbstractVelocityGuiFormBuilderImpl implements IVelocityGui
* Load the template from different resources.
*
* @param config GUI builder config
- * @return An {@link InputStream} but never null. The {@link InputStream} had to be closed be the
- * invoking method
+ * @return An {@link InputStream} but never null. The {@link InputStream} had to
+ * be closed be the invoking method
* @throws GuiBuildException In case of an error
*/
@Override
@@ -207,7 +210,6 @@ public abstract class AbstractVelocityGuiFormBuilderImpl implements IVelocityGui
protected abstract InputStream getInternalTemplate(IVelocityGuiBuilderConfiguration config)
throws GuiBuildException;
-
protected String getInternalClasspathTemplateDir(final IVelocityGuiBuilderConfiguration config,
final String defaultClassPathDir) {
String dir = config.getClasspathTemplateDir();
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/velocity/VelocityLogAdapter.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/velocity/VelocityLogAdapter.java
index 05cbaf58..bf8e75a9 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/velocity/VelocityLogAdapter.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/gui/velocity/VelocityLogAdapter.java
@@ -37,8 +37,8 @@ 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.)
+ * register this class as a logger with the Velocity singleton (NOTE: this would
+ * not work for the non-singleton method.)
*/
Velocity.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM, this);
Velocity.init();
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java
index 1c1de7c8..05ea08b2 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/AuthenticationData.java
@@ -28,15 +28,17 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.TimeZone;
-import at.gv.egiz.eaaf.core.api.idp.IAuthData;
-import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink;
-import at.gv.egiz.eaaf.core.exceptions.EaafStorageException;
-import at.gv.egiz.eaaf.core.impl.data.Pair;
+
import org.apache.commons.collections4.map.HashedMap;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import at.gv.egiz.eaaf.core.api.idp.IAuthData;
+import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink;
+import at.gv.egiz.eaaf.core.exceptions.EaafStorageException;
+import at.gv.egiz.eaaf.core.impl.data.Pair;
+
/**
* Service-Provider specific authentication data.
*
@@ -70,8 +72,6 @@ public class AuthenticationData implements IAuthData, Serializable {
private String encSourceId;
private String encSourceIdType;
-
-
@Deprecated
private String bpk;
@Deprecated
@@ -81,7 +81,6 @@ public class AuthenticationData implements IAuthData, Serializable {
private String ccc = null;
-
private boolean foreigner = false;
private String eidasLoa = null;
@@ -112,14 +111,12 @@ public class AuthenticationData implements IAuthData, Serializable {
}
-
@Override
public Date getAuthenticationIssueInstant() {
return getDateCopyOrNull(this.issueInstant);
}
-
@Override
public String getAuthenticationIssueInstantString() {
final SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
@@ -142,7 +139,6 @@ public class AuthenticationData implements IAuthData, Serializable {
return this.ccc;
}
-
@Override
@Deprecated
public String getBpk() {
@@ -159,15 +155,12 @@ public class AuthenticationData implements IAuthData, Serializable {
this.bpk = bpk;
}
-
@Override
public Date getDateOfBirth() {
return getDateCopyOrNull(this.dateOfBirth);
}
-
-
@Override
public String getFormatedDateOfBirth() {
final DateFormat pvpDateFormat = new SimpleDateFormat(IDENTITY_LINK_DATE_FORMAT);
@@ -179,13 +172,11 @@ public class AuthenticationData implements IAuthData, Serializable {
}
-
@Override
public String getFamilyName() {
return this.familyName;
}
-
@Override
public String getGivenName() {
return this.givenName;
@@ -207,7 +198,6 @@ public class AuthenticationData implements IAuthData, Serializable {
return identificationValue;
}
-
@Override
@Deprecated
public String getIdentificationType() {
@@ -296,7 +286,6 @@ public class AuthenticationData implements IAuthData, Serializable {
this.identificationType = identificationType;
}
-
@Override
@Deprecated
public String getBpkType() {
@@ -319,13 +308,11 @@ public class AuthenticationData implements IAuthData, Serializable {
}
-
@Override
public boolean isForeigner() {
return this.foreigner;
}
-
/**
* Indicate the the user is a foreigner.
*
@@ -340,7 +327,6 @@ public class AuthenticationData implements IAuthData, Serializable {
return ssoSession;
}
-
/**
* Indicate that the authentication was done by using an active SSO session.
*
@@ -350,7 +336,6 @@ public class AuthenticationData implements IAuthData, Serializable {
this.ssoSession = ssoSession;
}
-
/**
* Country Code for the authenticated user.
*
@@ -374,7 +359,6 @@ public class AuthenticationData implements IAuthData, Serializable {
this.sessionIndex = sessionIndex;
}
-
@Override
public String getNameID() {
return this.nameID;
@@ -427,7 +411,6 @@ public class AuthenticationData implements IAuthData, Serializable {
this.ssoSessionValidTo = getDateCopyOrNull(ssoSessionValidTo);
}
-
/*
* (non-Javadoc)
*
@@ -450,7 +433,7 @@ public class AuthenticationData implements IAuthData, Serializable {
/**
* Returns a generic data-object with is stored with a specific identifier.
*
- * @param key The specific identifier of the data object
+ * @param key The specific identifier of the data object
* @param clazz The class type which is stored with this key
* @return The data object or null if no data is found with this key
*/
@@ -484,11 +467,11 @@ public class AuthenticationData implements IAuthData, Serializable {
/**
* Store a generic data-object to session 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
- * session-data storage
+ * @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 session-data storage
*/
public void setGenericData(final String key, final Object object) throws EaafStorageException {
if (StringUtils.isEmpty(key)) {
@@ -499,7 +482,7 @@ public class AuthenticationData implements IAuthData, Serializable {
if (object != null && !Serializable.class.isInstance(object)) {
log.warn(
- "Generic data can only store objects which implements the 'Seralizable' interface");
+ "Generic data can only store objects which implements the 'Seralizable' interface");
throw new EaafStorageException(
"Generic data can only store objects which implements the 'Seralizable' interface",
null);
@@ -524,7 +507,6 @@ public class AuthenticationData implements IAuthData, Serializable {
return this.additionalBpks;
}
-
/**
* Set the encrypted SourceId for current authenticated user.
*
@@ -543,8 +525,6 @@ public class AuthenticationData implements IAuthData, Serializable {
this.encSourceIdType = encSourceIdType;
}
-
-
/**
* Add an additional bPK Pair bPK/bPKType into authdata.
*
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EaafCoreSpringResourceProvider.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EaafCoreSpringResourceProvider.java
index 74b6a0fb..3548684b 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EaafCoreSpringResourceProvider.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EaafCoreSpringResourceProvider.java
@@ -19,10 +19,11 @@
package at.gv.egiz.eaaf.core.impl.idp;
-import at.gv.egiz.components.spring.api.SpringResourceProvider;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
+import at.gv.egiz.components.spring.api.SpringResourceProvider;
+
public class EaafCoreSpringResourceProvider implements SpringResourceProvider {
@Override
@@ -41,7 +42,7 @@ public class EaafCoreSpringResourceProvider implements SpringResourceProvider {
final ClassPathResource sl20AuthConfig =
new ClassPathResource("/eaaf_core.beans.xml", EaafCoreSpringResourceProvider.class);
- return new Resource[] {sl20AuthConfig};
+ return new Resource[] { sl20AuthConfig };
}
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java
index ea197478..5779f12b 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/EidAuthenticationData.java
@@ -2,22 +2,23 @@ package at.gv.egiz.eaaf.core.impl.idp;
import java.security.cert.CertificateEncodingException;
import java.security.cert.X509Certificate;
-import at.gv.egiz.eaaf.core.api.data.PVPAttributeDefinitions.EID_IDENTITY_STATUS_LEVEL_VALUES;
-import at.gv.egiz.eaaf.core.api.idp.IEidAuthData;
+
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.lang.NonNull;
import org.springframework.util.Assert;
+import at.gv.egiz.eaaf.core.api.data.PvpAttributeDefinitions.EidIdentityStatusLevelValues;
+import at.gv.egiz.eaaf.core.api.idp.IEidAuthData;
+
public class EidAuthenticationData extends AuthenticationData implements IEidAuthData {
private static final Logger log = LoggerFactory.getLogger(EidAuthenticationData.class);
-
private static final long serialVersionUID = -7106142572904327044L;
private byte[] eidToken;
private byte[] signerCertificate;
- private EID_IDENTITY_STATUS_LEVEL_VALUES eidStatus;
+ private EidIdentityStatusLevelValues eidStatus;
private String vdaEndpointUrl;
private boolean useMandate = false;
@@ -32,7 +33,7 @@ public class EidAuthenticationData extends AuthenticationData implements IEidAut
}
@Override
- public EID_IDENTITY_STATUS_LEVEL_VALUES getEidStatus() {
+ public EidIdentityStatusLevelValues getEidStatus() {
return this.eidStatus;
}
@@ -53,7 +54,7 @@ public class EidAuthenticationData extends AuthenticationData implements IEidAut
*
* @param eidStatus Status of the E-ID
*/
- public void setEidStatus(final EID_IDENTITY_STATUS_LEVEL_VALUES eidStatus) {
+ public void setEidStatus(final EidIdentityStatusLevelValues eidStatus) {
this.eidStatus = eidStatus;
}
@@ -103,7 +104,6 @@ public class EidAuthenticationData extends AuthenticationData implements IEidAut
this.useMandate = useMandate;
}
-
/**
* Set URL of the EndPoint that was used on VDA for authentication.
*
@@ -121,5 +121,4 @@ public class EidAuthenticationData extends AuthenticationData implements IEidAut
}
}
-
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/AbstractAuthenticationManager.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/AbstractAuthenticationManager.java
index 241b43c9..d2365e4a 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/AbstractAuthenticationManager.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/AbstractAuthenticationManager.java
@@ -24,14 +24,22 @@ import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Enumeration;
import java.util.List;
+
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.lang3.StringUtils;
+import org.apache.commons.text.StringEscapeUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.IRequestStorage;
-import at.gv.egiz.eaaf.core.api.data.EAAFConstants;
+import at.gv.egiz.eaaf.core.api.data.EaafConstants;
import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
-import at.gv.egiz.eaaf.core.api.idp.IspConfiguration;
+import at.gv.egiz.eaaf.core.api.idp.ISpConfiguration;
import at.gv.egiz.eaaf.core.api.idp.auth.IAuthenticationManager;
import at.gv.egiz.eaaf.core.api.idp.auth.ISsoManager;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
@@ -46,11 +54,6 @@ import at.gv.egiz.eaaf.core.impl.idp.auth.modules.ModuleRegistration;
import at.gv.egiz.eaaf.core.impl.idp.controller.protocols.RequestImpl;
import at.gv.egiz.eaaf.core.impl.idp.process.ExecutionContextImpl;
import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.commons.text.StringEscapeUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
public abstract class AbstractAuthenticationManager implements IAuthenticationManager {
private static final Logger log = LoggerFactory.getLogger(AbstractAuthenticationManager.class);
@@ -73,14 +76,14 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
protected IRevisionLogger revisionsLogger;
@Autowired(required = false)
protected ISsoManager ssoManager;
- @Autowired ModuleRegistration moduleRegistration;
+ @Autowired
+ ModuleRegistration moduleRegistration;
/*
* (non-Javadoc)
*
- * @see
- * at.gv.egiz.eaaf.core.impl.idp.auth.IAuthenticationManager#addParameterNameToWhiteList(java.lang
- * .String)
+ * @see at.gv.egiz.eaaf.core.impl.idp.auth.IAuthenticationManager#
+ * addParameterNameToWhiteList(java.lang .String)
*/
@Override
public final void addParameterNameToWhiteList(final String httpReqParam) {
@@ -93,9 +96,8 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
/*
* (non-Javadoc)
*
- * @see
- * at.gv.egiz.eaaf.core.impl.idp.auth.IAuthenticationManager#addHeaderNameToWhiteList(java.lang.
- * String)
+ * @see at.gv.egiz.eaaf.core.impl.idp.auth.IAuthenticationManager#
+ * addHeaderNameToWhiteList(java.lang. String)
*/
@Override
public final void addHeaderNameToWhiteList(final String httpReqParam) {
@@ -108,9 +110,8 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
/*
* (non-Javadoc)
*
- * @see
- * at.gv.egiz.eaaf.core.impl.idp.auth.IAuthenticationManager#addHeaderNameToWhiteList(java.lang.
- * String)
+ * @see at.gv.egiz.eaaf.core.impl.idp.auth.IAuthenticationManager#
+ * addHeaderNameToWhiteList(java.lang. String)
*/
@Override
public final boolean doAuthentication(final HttpServletRequest httpReq,
@@ -124,7 +125,7 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
}
// load OA configuration from pending request
- final IspConfiguration oaParam = pendingReq.getServiceProviderConfiguration();
+ final ISpConfiguration oaParam = pendingReq.getServiceProviderConfiguration();
// set logging context and log unique OA identifier to revision log
TransactionIdUtils.setServiceProviderId(oaParam.getUniqueIdentifier());
@@ -137,7 +138,6 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
throw new NoPassivAuthenticationException();
}
-
// check Single Sign-On functionality if SSOManager is available
boolean isValidSsoSession = false;
if (ssoManager != null) {
@@ -149,16 +149,15 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
isValidSsoSession = ssoManager.checkAndValidateSsoSession(pendingReq, httpReq, httpResp)
&& pendingReq.needSingleSignOnFunctionality();
-
}
// check if session is already authenticated
- // boolean isSessionAuthenticated = tryPerformAuthentication((RequestImpl) pendingReq,
+ // boolean isSessionAuthenticated = tryPerformAuthentication((RequestImpl)
+ // pendingReq,
// isValidSSOSession);
// boolean isSessionAuthenticated = isValidSSOSession &&
// StringUtils.isNotEmpty(pendingReq.getSSOSessionIdentifier());
-
// force new authentication authentication process
if (pendingReq.forceAuth()) {
startAuthenticationProcess(httpReq, (RequestImpl) pendingReq);
@@ -169,7 +168,6 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
sendSingleSignOnConsentsEvaluation((RequestImpl) pendingReq);
return false;
-
} else if (pendingReq.isPassiv()) {
if (isValidSsoSession
&& StringUtils.isNotEmpty(pendingReq.getInternalSsoSessionIdentifier())) {
@@ -207,7 +205,6 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
log.debug("Close session. Remove pending request ... ");
requestStoreage.removePendingRequest(pendingReq.getPendingRequestId());
-
if (ssoManager != null) {
try {
log.trace("'SSOManager' active. Search for active SSO sessions ... ");
@@ -229,11 +226,11 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
/**
* Populate process execution context and start process engine.
*
- * @param httpReq http request
+ * @param httpReq http request
* @param pendingReq current pending request
* @throws ServletException In case of a servlet error
- * @throws IOException In case of an IO error
- * @throws EaafException In case of EAAF processing error
+ * @throws IOException In case of an IO error
+ * @throws EaafException In case of EAAF processing error
*/
private void startAuthenticationProcess(final HttpServletRequest httpReq,
final RequestImpl pendingReq) throws EaafException {
@@ -245,15 +242,15 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
final ExecutionContext executionContext = new ExecutionContextImpl();
// set oaIdentifeir
- executionContext.put(EAAFConstants.PROCESS_ENGINE_SERVICE_PROVIDER_ENTITYID,
+ executionContext.put(EaafConstants.PROCESS_ENGINE_SERVICE_PROVIDER_ENTITYID,
pendingReq.getServiceProviderConfiguration().getUniqueIdentifier());
// add X509 SSL client certificate if exist
if (httpReq.getAttribute("javax.servlet.request.X509Certificate") != null) {
log.debug("Find SSL-client-certificate on request --> Add it to context");
- executionContext.put(EAAFConstants.PROCESS_ENGINE_SSL_CLIENT_CERTIFICATE,
+ executionContext.put(EaafConstants.PROCESS_ENGINE_SSL_CLIENT_CERTIFICATE,
(X509Certificate[]) httpReq.getAttribute("javax.servlet.request.X509Certificate"));
- pendingReq.setRawDataToTransaction(EAAFConstants.PROCESS_ENGINE_SSL_CLIENT_CERTIFICATE,
+ pendingReq.setRawDataToTransaction(EaafConstants.PROCESS_ENGINE_SSL_CLIENT_CERTIFICATE,
httpReq.getAttribute("javax.servlet.request.X509Certificate"));
}
@@ -287,8 +284,6 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
}
}
-
-
// populate more IDP specific information to execution context
populateExecutionContext(executionContext, pendingReq, httpReq);
@@ -301,8 +296,8 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
* Add additional parameters into context of process-engine.
*
* @param executionContext Process-engine context
- * @param pendingReq Current pending request
- * @param httpReq http request
+ * @param pendingReq Current pending request
+ * @param httpReq http request
*
* @throws EaafException In case of an error
*/
@@ -314,8 +309,8 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
*
* @param pendingReq current pending request
* @throws ServletException In case of a servlet error
- * @throws IOException In case of an IO error
- * @throws EaafException In case of a EAAF processing error
+ * @throws IOException In case of an IO error
+ * @throws EaafException In case of a EAAF processing error
*/
private void sendSingleSignOnConsentsEvaluation(final RequestImpl pendingReq) throws EaafException {
@@ -333,11 +328,10 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
}
-
/**
* Select a specific process and starting process engine.
*
- * @param pendingReq current pending request
+ * @param pendingReq current pending request
* @param executionContext current context for process-engine
* @throws EaafException In case of an process-engine error
*/
@@ -345,7 +339,7 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
final ExecutionContext executionContext) throws EaafException {
try {
// put pending-request ID on execurtionContext
- executionContext.put(EAAFConstants.PROCESS_ENGINE_PENDINGREQUESTID,
+ executionContext.put(EaafConstants.PROCESS_ENGINE_PENDINGREQUESTID,
pendingReq.getPendingRequestId());
// create process instance
@@ -354,7 +348,7 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
if (processDefinitionId == null) {
log.warn("No suitable process found for PendingReqId " + pendingReq.getPendingRequestId());
- throw new EaafException("process.02", new Object[] {pendingReq.getPendingRequestId()});
+ throw new EaafException("process.02", new Object[] { pendingReq.getPendingRequestId() });
}
@@ -383,7 +377,7 @@ public abstract class AbstractAuthenticationManager implements IAuthenticationMa
}
throw new EaafException("process.01",
- new Object[] {pendingReq.getProcessInstanceId(), pendingReq.getPendingRequestId()}, e);
+ new Object[] { pendingReq.getProcessInstanceId(), pendingReq.getPendingRequestId() }, e);
}
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java
index 1afa879f..0834aa7c 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/RequestStorage.java
@@ -19,6 +19,12 @@
package at.gv.egiz.eaaf.core.impl.idp.auth;
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.IRequestStorage;
import at.gv.egiz.eaaf.core.api.idp.process.ProcessInstanceStoreDao;
@@ -29,11 +35,6 @@ import at.gv.egiz.eaaf.core.exceptions.EaafStorageException;
import at.gv.egiz.eaaf.core.exceptions.PendingReqIdValidationException;
import at.gv.egiz.eaaf.core.impl.idp.controller.protocols.RequestImpl;
import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
@Service("RequestStorage")
public class RequestStorage implements IRequestStorage {
@@ -155,8 +156,8 @@ public class RequestStorage implements IRequestStorage {
* (non-Javadoc)
*
* @see
- * at.gv.egovernment.moa.id.storage.IRequestStorage#changePendingRequestID(at.gv.egovernment.moa.
- * id.moduls.IRequest)
+ * at.gv.egovernment.moa.id.storage.IRequestStorage#changePendingRequestID(at.gv
+ * .egovernment.moa. id.moduls.IRequest)
*/
@Override
public String changePendingRequestID(final IRequest pendingRequest) throws EaafException {
@@ -169,13 +170,13 @@ public class RequestStorage implements IRequestStorage {
.getPendingRequestIdWithOutChecks(pendingRequest.getPendingRequestId());
} catch (final PendingReqIdValidationException e) {
- // it's no problem, because it must be valid before when pending-request was loaded and we
+ // it's no problem, because it must be valid before when pending-request was
+ // loaded and we
// change it now
oldInternalRequestID = e.getInvalidInternalPendingReqId();
}
-
// generate new pendingReqId and get internalPendingReqId
final String newRequestID = pendingReqIdGenerationStrategy.generateExternalPendingRequestId();
log.debug("Change pendingRequestID from " + pendingRequest.getPendingRequestId() + " to "
@@ -189,11 +190,10 @@ public class RequestStorage implements IRequestStorage {
} catch (final PendingReqIdValidationException e) {
throw new EaafException("internal.99",
- new Object[] {"Generate invalid pendingRequestId. Something looks WRONG"}, e);
+ new Object[] { "Generate invalid pendingRequestId. Something looks WRONG" }, e);
}
-
// change Key in cache
transactionStorage.changeKey(oldInternalRequestID, newInternalPendingRequestId,
pendingRequest);
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
index b12658f5..f5c687f1 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/AbstractAuthenticationDataBuilder.java
@@ -25,14 +25,26 @@ import java.io.InputStream;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Map.Entry;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.lang.NonNull;
+import org.springframework.util.Assert;
+import org.springframework.util.Base64Utils;
+import org.w3c.dom.DOMException;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
import at.gv.egiz.eaaf.core.api.IRequest;
-import at.gv.egiz.eaaf.core.api.data.EAAFConstants;
-import at.gv.egiz.eaaf.core.api.data.ExtendedPVPAttributeDefinitions;
-import at.gv.egiz.eaaf.core.api.data.PVPAttributeDefinitions;
+import at.gv.egiz.eaaf.core.api.data.EaafConstants;
+import at.gv.egiz.eaaf.core.api.data.ExtendedPvpAttributeDefinitions;
+import at.gv.egiz.eaaf.core.api.data.PvpAttributeDefinitions;
import at.gv.egiz.eaaf.core.api.idp.IAuthData;
import at.gv.egiz.eaaf.core.api.idp.IAuthenticationDataBuilder;
import at.gv.egiz.eaaf.core.api.idp.IConfigurationWithSP;
-import at.gv.egiz.eaaf.core.api.idp.IspConfiguration;
+import at.gv.egiz.eaaf.core.api.idp.ISpConfiguration;
import at.gv.egiz.eaaf.core.api.idp.auth.data.IAuthProcessDataContainer;
import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink;
import at.gv.egiz.eaaf.core.exceptions.EaafAuthenticationException;
@@ -47,17 +59,6 @@ import at.gv.egiz.eaaf.core.impl.idp.AuthenticationData;
import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper;
import at.gv.egiz.eaaf.core.impl.idp.auth.data.SimpleIdentityLinkAssertionParser;
import at.gv.egiz.eaaf.core.impl.utils.XPathUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.lang.NonNull;
-import org.springframework.util.Assert;
-import org.springframework.util.Base64Utils;
-import org.w3c.dom.DOMException;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
public abstract class AbstractAuthenticationDataBuilder implements IAuthenticationDataBuilder {
private static final Logger log =
@@ -83,7 +84,7 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
pendingReq.getSessionData(AuthProcessDataWrapper.class);
try {
- if (authProcessData.isEIDProcess()) {
+ if (authProcessData.isEidProcess()) {
log.debug("Building AuthData from new E-ID information ... ");
authData = getAuthDataInstance(pendingReq);
Assert.notNull(authData, "AuthData is null");
@@ -107,7 +108,7 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
} catch (XPathException | DOMException | EaafException e) {
log.warn("Can not build authentication data from auth. process information");
- throw new EaafAuthenticationException("builder.11", new Object[] {e.getMessage()}, e);
+ throw new EaafAuthenticationException("builder.11", new Object[] { e.getMessage() }, e);
}
@@ -127,8 +128,8 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
protected abstract IAuthData getAuthDataInstance(IRequest pendingReq) throws EaafException;
/**
- * Build service-specific AuthData by using information from E-ID This builder uses vSZ, MDS and
- * Consent as input information.
+ * Build service-specific AuthData by using information from E-ID This builder
+ * uses vSZ, MDS and Consent as input information.
*
* @param pendingReq current pendingRequest
* @return {@link IAuthData} but never null
@@ -137,13 +138,13 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
protected abstract void buildServiceSpecificAuthenticationData(IAuthData authData,
IRequest pendingReq) throws EaafException;
-
/**
* Add generic E-ID information into already existing AuthData.
*
- * @param authData AuthData object
- * @param authProcessData Authentication information holder from current pending request
- * @param pendingReq current pending request
+ * @param authData AuthData object
+ * @param authProcessData Authentication information holder from current pending
+ * request
+ * @param pendingReq current pending request
*/
private void buildInternalAuthDataGeneric(@NonNull final IAuthData authData,
@NonNull final IAuthProcessDataContainer authProcessData,
@@ -164,7 +165,8 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
// TODO: check if it is needed
// if (authProcessData.getGenericSessionDataStorage() != null &&
// !authProcessData.getGenericSessionDataStorage().isEmpty())
- // includedToGenericAuthData = authProcessData.getGenericSessionDataStorage().keySet();
+ // includedToGenericAuthData =
+ // authProcessData.getGenericSessionDataStorage().keySet();
// else
includedToGenericAuthData = new ArrayList<>();
@@ -178,31 +180,28 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
// ####################################################
// set MDS and vSZ
internalAuthData.setFamilyName(authProcessData
- .getGenericDataFromSession(PVPAttributeDefinitions.PRINCIPAL_NAME_NAME, String.class));
+ .getGenericDataFromSession(PvpAttributeDefinitions.PRINCIPAL_NAME_NAME, String.class));
internalAuthData.setGivenName(authProcessData
- .getGenericDataFromSession(PVPAttributeDefinitions.GIVEN_NAME_NAME, String.class));
+ .getGenericDataFromSession(PvpAttributeDefinitions.GIVEN_NAME_NAME, String.class));
internalAuthData.setDateOfBirth(authProcessData
- .getGenericDataFromSession(PVPAttributeDefinitions.BIRTHDATE_NAME, String.class));
+ .getGenericDataFromSession(PvpAttributeDefinitions.BIRTHDATE_NAME, String.class));
internalAuthData.setEncSourceId(authProcessData.getGenericDataFromSession(
- ExtendedPVPAttributeDefinitions.EID_ENCRYPTED_SOURCEID_NAME, String.class));
+ ExtendedPvpAttributeDefinitions.EID_ENCRYPTED_SOURCEID_NAME, String.class));
internalAuthData.setEncSourceIdType(authProcessData.getGenericDataFromSession(
- ExtendedPVPAttributeDefinitions.EID_ENCRYPTED_SOURCEID_TYPE_NAME, String.class));
+ ExtendedPvpAttributeDefinitions.EID_ENCRYPTED_SOURCEID_TYPE_NAME, String.class));
// ####################################################
// set QAA level
setQaaLevel(internalAuthData, authProcessData);
-
// ####################################################
// set isForeigner flag
setFlagForeigner(internalAuthData, authProcessData);
-
// ####################################################
// set citizen country-code
setCitizenCountryCode(internalAuthData, authProcessData);
-
// set generic authProcessData to authdata
for (final Entrynull
@@ -340,7 +340,6 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
authData.setBaseIdTransferRestrication(
pendingReq.getServiceProviderConfiguration().hasBaseIdTransferRestriction());
-
// ####################################################
// parse user info's from identityLink
IIdentityLink idlFromPvpAttr = null;
@@ -351,10 +350,10 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
} else {
// identityLink is not direct in MOASession
final String pvpAttrIdl = authProcessData
- .getGenericDataFromSession(PVPAttributeDefinitions.EID_IDENTITY_LINK_NAME, String.class);
+ .getGenericDataFromSession(PvpAttributeDefinitions.EID_IDENTITY_LINK_NAME, String.class);
// find PVP-Attr. which contains the IdentityLink
if (StringUtils.isNotEmpty(pvpAttrIdl)) {
- log.debug("Find PVP-Attr: " + PVPAttributeDefinitions.EID_IDENTITY_LINK_FRIENDLY_NAME
+ log.debug("Find PVP-Attr: " + PvpAttributeDefinitions.EID_IDENTITY_LINK_FRIENDLY_NAME
+ " --> Parse basic user info's from that attribute.");
InputStream idlStream = null;
try {
@@ -373,7 +372,7 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
} finally {
try {
- includedToGenericAuthData.remove(PVPAttributeDefinitions.EID_IDENTITY_LINK_NAME);
+ includedToGenericAuthData.remove(PvpAttributeDefinitions.EID_IDENTITY_LINK_NAME);
if (idlStream != null) {
idlStream.close();
}
@@ -390,28 +389,28 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
log.debug(
"No IdentityLink found or not parseable --> Parse basic user info's from single PVP-Attributes.");
authData.setFamilyName(authProcessData
- .getGenericDataFromSession(PVPAttributeDefinitions.PRINCIPAL_NAME_NAME, String.class));
+ .getGenericDataFromSession(PvpAttributeDefinitions.PRINCIPAL_NAME_NAME, String.class));
authData.setGivenName(authProcessData
- .getGenericDataFromSession(PVPAttributeDefinitions.GIVEN_NAME_NAME, String.class));
+ .getGenericDataFromSession(PvpAttributeDefinitions.GIVEN_NAME_NAME, String.class));
authData.setDateOfBirth(authProcessData
- .getGenericDataFromSession(PVPAttributeDefinitions.BIRTHDATE_NAME, String.class));
+ .getGenericDataFromSession(PvpAttributeDefinitions.BIRTHDATE_NAME, String.class));
authData.setIdentificationValue(authProcessData
- .getGenericDataFromSession(PVPAttributeDefinitions.EID_SOURCE_PIN_NAME, String.class));
+ .getGenericDataFromSession(PvpAttributeDefinitions.EID_SOURCE_PIN_NAME, String.class));
authData.setIdentificationType(authProcessData.getGenericDataFromSession(
- PVPAttributeDefinitions.EID_SOURCE_PIN_TYPE_NAME, String.class));
+ PvpAttributeDefinitions.EID_SOURCE_PIN_TYPE_NAME, String.class));
// remove corresponding keys from genericSessionData if exists
- includedToGenericAuthData.remove(PVPAttributeDefinitions.PRINCIPAL_NAME_NAME);
- includedToGenericAuthData.remove(PVPAttributeDefinitions.GIVEN_NAME_NAME);
- includedToGenericAuthData.remove(PVPAttributeDefinitions.BIRTHDATE_NAME);
- includedToGenericAuthData.remove(PVPAttributeDefinitions.EID_SOURCE_PIN_NAME);
- includedToGenericAuthData.remove(PVPAttributeDefinitions.EID_SOURCE_PIN_TYPE_NAME);
+ includedToGenericAuthData.remove(PvpAttributeDefinitions.PRINCIPAL_NAME_NAME);
+ includedToGenericAuthData.remove(PvpAttributeDefinitions.GIVEN_NAME_NAME);
+ includedToGenericAuthData.remove(PvpAttributeDefinitions.BIRTHDATE_NAME);
+ includedToGenericAuthData.remove(PvpAttributeDefinitions.EID_SOURCE_PIN_NAME);
+ includedToGenericAuthData.remove(PvpAttributeDefinitions.EID_SOURCE_PIN_TYPE_NAME);
}
}
if (authData.getIdentificationType() != null
- && !authData.getIdentificationType().equals(EAAFConstants.URN_PREFIX_BASEID)) {
+ && !authData.getIdentificationType().equals(EaafConstants.URN_PREFIX_BASEID)) {
log.trace("IdentificationType is not a baseID --> clear it. ");
authData.setBpk(authData.getIdentificationValue());
authData.setBpkType(authData.getIdentificationType());
@@ -420,22 +419,18 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
authData.setIdentificationType(null);
}
-
// ####################################################
// set QAA level
setQaaLevel(authData, authProcessData);
-
// ####################################################
// set isForeigner flag
setFlagForeigner(authData, authProcessData);
-
// ####################################################
// set citizen country-code
setCitizenCountryCode(authData, authProcessData);
-
// ####################################################
// set bPK and IdentityLink
final String pvpBpkValue = getBpkValueFromPvpAttribute(authProcessData);
@@ -449,12 +444,12 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
log.info(
"Can not build authData, because moaSession include no bPK, encrypted bPK or baseID");
throw new EaafBuilderException("builder.08",
- new Object[] {"No " + PVPAttributeDefinitions.BPK_FRIENDLY_NAME + " or "
- + PVPAttributeDefinitions.EID_SOURCE_PIN_FRIENDLY_NAME + " or "
- + PVPAttributeDefinitions.ENC_BPK_LIST_FRIENDLY_NAME},
- "No " + PVPAttributeDefinitions.BPK_FRIENDLY_NAME + " or "
- + PVPAttributeDefinitions.EID_SOURCE_PIN_FRIENDLY_NAME + " or "
- + PVPAttributeDefinitions.ENC_BPK_LIST_FRIENDLY_NAME);
+ new Object[] { "No " + PvpAttributeDefinitions.BPK_FRIENDLY_NAME + " or "
+ + PvpAttributeDefinitions.EID_SOURCE_PIN_FRIENDLY_NAME + " or "
+ + PvpAttributeDefinitions.ENC_BPK_LIST_FRIENDLY_NAME },
+ "No " + PvpAttributeDefinitions.BPK_FRIENDLY_NAME + " or "
+ + PvpAttributeDefinitions.EID_SOURCE_PIN_FRIENDLY_NAME + " or "
+ + PvpAttributeDefinitions.ENC_BPK_LIST_FRIENDLY_NAME);
}
@@ -513,10 +508,10 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
"Can not build authData, because moaSession include no valid bPK, encrypted bPK or sourceID");
throw new EaafBuilderException("builder.13",
new Object[] {
- pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier()},
- "No valid " + PVPAttributeDefinitions.BPK_FRIENDLY_NAME + " or "
- + PVPAttributeDefinitions.EID_SOURCE_PIN_FRIENDLY_NAME + " or "
- + PVPAttributeDefinitions.ENC_BPK_LIST_FRIENDLY_NAME);
+ pendingReq.getServiceProviderConfiguration().getAreaSpecificTargetIdentifier() },
+ "No valid " + PvpAttributeDefinitions.BPK_FRIENDLY_NAME + " or "
+ + PvpAttributeDefinitions.EID_SOURCE_PIN_FRIENDLY_NAME + " or "
+ + PvpAttributeDefinitions.ENC_BPK_LIST_FRIENDLY_NAME);
}
}
@@ -536,7 +531,7 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
@Deprecated
protected abstract Pair
+ * Get bPK from PVP Attribute 'BPK_NAME', which could be exist in MOASession as
+ * 'GenericData'.
*
*
*
*
* @param session MOASession, but never null
- * @return bPK, which was received by PVP-Attribute, or session.getGenericDataFromSession(PVPConstants.BPK_NAME, String.class)
* null
if no attribute exists
+ * @return bPK, which was received by PVP-Attribute, or null
if no
+ * attribute exists
*/
@Deprecated
private String getBpkValueFromPvpAttribute(final IAuthProcessDataContainer session) {
String pvpBpkValueAttr =
- session.getGenericDataFromSession(PVPAttributeDefinitions.BPK_NAME, String.class);
+ session.getGenericDataFromSession(PvpAttributeDefinitions.BPK_NAME, String.class);
if (StringUtils.isNotEmpty(pvpBpkValueAttr)) {
- // fix a wrong bPK-value prefix, which was used in some PVP Standardportal implementations
+ // fix a wrong bPK-value prefix, which was used in some PVP Standardportal
+ // implementations
if (pvpBpkValueAttr.startsWith("bPK:")) {
- log.warn("Attribute " + PVPAttributeDefinitions.BPK_NAME
+ log.warn("Attribute " + PvpAttributeDefinitions.BPK_NAME
+ " contains a not standardize prefix! Staring attribute value correction process ...");
pvpBpkValueAttr = pvpBpkValueAttr.substring("bPK:".length());
@@ -685,18 +685,16 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
final String[] spitted = pvpBpkValueAttr.split(":");
if (spitted.length == 2) {
- log.debug("Find PVP-Attr: " + PVPAttributeDefinitions.BPK_FRIENDLY_NAME);
+ log.debug("Find PVP-Attr: " + PvpAttributeDefinitions.BPK_FRIENDLY_NAME);
return spitted[1];
-
-
} else if (spitted.length > 2) {
- log.warn("Attribute " + PVPAttributeDefinitions.BPK_NAME
+ log.warn("Attribute " + PvpAttributeDefinitions.BPK_NAME
+ " has a wrong encoding and can NOT be USED!" + " Value:" + pvpBpkValueAttr);
return null;
} else {
- log.debug("Find PVP-Attr: " + PVPAttributeDefinitions.BPK_FRIENDLY_NAME
+ log.debug("Find PVP-Attr: " + PvpAttributeDefinitions.BPK_FRIENDLY_NAME
+ " without prefix. Use it as it is");
return spitted[0];
@@ -708,49 +706,52 @@ public abstract class AbstractAuthenticationDataBuilder implements IAuthenticati
}
/**
- * Get bPK-Type from PVP Attribute 'EID_SECTOR_FOR_IDENTIFIER_NAME', which could be exist in
- * MOASession as 'GenericData'.
+ * Get bPK-Type from PVP Attribute 'EID_SECTOR_FOR_IDENTIFIER_NAME', which could
+ * be exist in MOASession as 'GenericData'.
*
*
*
*
* @param session MOASession, but never null
- * @return bPKType, which was received by PVP-Attribute, or session.getGenericDataFromSession(PVPConstants.EID_SECTOR_FOR_IDENTIFIER_NAME, String.class)
* null
if no attribute
- * exists
+ * @return bPKType, which was received by PVP-Attribute, or null
if
+ * no attribute exists
*/
@Deprecated
private String getBpkTypeFromPvpAttribute(final IAuthProcessDataContainer session) {
final String pvpBpkTypeAttr = session.getGenericDataFromSession(
- PVPAttributeDefinitions.EID_SECTOR_FOR_IDENTIFIER_NAME, String.class);
+ PvpAttributeDefinitions.EID_SECTOR_FOR_IDENTIFIER_NAME, String.class);
if (StringUtils.isNotEmpty(pvpBpkTypeAttr)) {
- // //fix a wrong bPK-Type encoding, which was used in some PVP Standardportal implementations
+ // //fix a wrong bPK-Type encoding, which was used in some PVP Standardportal
+ // implementations
// if (pvpbPKTypeAttr.startsWith(EAAFConstants.URN_PREFIX_CDID) &&
// !pvpbPKTypeAttr.substring(EAAFConstants.URN_PREFIX_CDID.length(),
// EAAFConstants.URN_PREFIX_CDID.length() + 1).equals("+")) {
- // log.warn("Receive uncorrect encoded bBKType attribute " + pvpbPKTypeAttr + " Starting
+ // log.warn("Receive uncorrect encoded bBKType attribute " + pvpbPKTypeAttr + "
+ // Starting
// attribute value correction ... ");
// pvpbPKTypeAttr = EAAFConstants.URN_PREFIX_CDID + "+" +
// pvpbPKTypeAttr.substring(EAAFConstants.URN_PREFIX_CDID.length() + 1);
//
// }
log.debug(
- "Find PVP-Attr: " + PVPAttributeDefinitions.EID_SECTOR_FOR_IDENTIFIER_FRIENDLY_NAME);
+ "Find PVP-Attr: " + PvpAttributeDefinitions.EID_SECTOR_FOR_IDENTIFIER_FRIENDLY_NAME);
return pvpBpkTypeAttr;
}
return null;
-
/*
- * INFO: This code could be used to extract the bPKType from 'PVPConstants.BPK_NAME', because
- * the prefix of BPK_NAME attribute contains the postfix of the bPKType
+ * INFO: This code could be used to extract the bPKType from
+ * 'PVPConstants.BPK_NAME', because the prefix of BPK_NAME attribute contains
+ * the postfix of the bPKType
*
- * Now, all PVP Standardportals should be able to send 'EID_SECTOR_FOR_IDENTIFIER' PVP
- * attributes
+ * Now, all PVP Standardportals should be able to send
+ * 'EID_SECTOR_FOR_IDENTIFIER' PVP attributes
*/
- // String pvpbPKValueAttr = session.getGenericDataFromSession(PVPConstants.BPK_NAME,
+ // String pvpbPKValueAttr =
+ // session.getGenericDataFromSession(PVPConstants.BPK_NAME,
// String.class);
// String[] spitted = pvpbPKValueAttr.split(":");
// if (MiscUtil.isEmpty(authData.getBPKType())) {
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilder.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilder.java
index 60c08253..a613bd56 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilder.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/builder/BpkBuilder.java
@@ -16,8 +16,6 @@
* works that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
-
package at.gv.egiz.eaaf.core.impl.idp.auth.builder;
import java.security.InvalidKeyException;
@@ -27,22 +25,26 @@ import java.security.PrivateKey;
import java.security.PublicKey;
import java.text.SimpleDateFormat;
import java.util.Date;
+
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.NoSuchPaddingException;
-import at.gv.egiz.eaaf.core.api.data.EAAFConstants;
-import at.gv.egiz.eaaf.core.exceptions.EaafBuilderException;
-import at.gv.egiz.eaaf.core.impl.data.Pair;
+
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.util.Base64Utils;
+import at.gv.egiz.eaaf.core.api.data.EaafConstants;
+import at.gv.egiz.eaaf.core.exceptions.EaafBuilderException;
+import at.gv.egiz.eaaf.core.impl.data.Pair;
+
/**
* Builder for the bPK, as defined in
- * "Ableitung f¨r die bereichsspezifische Personenkennzeichnung"
version
- * 1.0.1
from "reference.e-government.gv.at"
.
+ * "Ableitung f¨r die bereichsspezifische Personenkennzeichnung"
+ * version 1.0.1
from
+ * "reference.e-government.gv.at"
.
*
*/
public class BpkBuilder {
@@ -51,58 +53,60 @@ public class BpkBuilder {
/**
* Calculates an area specific unique person-identifier from a baseID.
*
- * @param baseID baseId from user but never null
- * @param targetIdentifier target identifier for area specific identifier calculation but never
- * null
- * @return Pair consists of (unique person identifier for this target, targetArea) but never null
+ * @param baseID baseId from user but never null
+ * @param targetIdentifier target identifier for area specific identifier
+ * calculation but never null
+ * @return Pair consists of (unique person identifier for this target,
+ * targetArea) but never null
* @throws EaafBuilderException if some input data are not valid
*/
public static Pair
- * "IdentityLink"
is the translation of "Personenbindung"
.
+ * Data contained in an identity link issued by BMI, relevant to the MOA ID
+ * component.
+ * "IdentityLink"
is the translation of
+ * "Personenbindung"
.
*
* @author Paul Ivancsics
* @version $Id$
@@ -59,41 +46,44 @@ public class IdentityLink implements Serializable, IIdentityLink {
private static final long serialVersionUID = 1L;
/**
- * "identificationValue"
is the translation of "Stammzahl"
.
+ * "identificationValue"
is the translation of
+ * "Stammzahl"
.
*/
private String identificationValue;
/**
- * "identificationType"
type of the identificationValue in the IdentityLink.
+ * "identificationType"
type of the identificationValue in the
+ * IdentityLink.
*/
private String identificationType;
/**
- * first name
+ * first name.
*/
private String givenName;
/**
- * family name
+ * family name.
*/
private String familyName;
/**
- * date of birth
+ * date of birth.
*/
private String dateOfBirth;
/**
- * the original saml:Assertion-Element
+ * the original saml:Assertion-Element.
*/
private transient Element samlAssertion;
/**
- * the serializes saml:Assertion
+ * the serializes saml:Assertion.
*/
private String serializedSamlAssertion;
/**
* Element
- * /saml:Assertion/saml:AttributeStatement/saml:Subject/saml:SubjectConfirmation/saml:SubjectConfirmationData/pr:Person
+ * /saml:Assertion/saml:AttributeStatement/saml:Subject
+ * /saml:SubjectConfirmation/saml:SubjectConfirmationData/pr:Person.
*/
private transient Element prPerson = null;
/**
- * we need for each dsig:Reference Element all transformation elements
+ * we need for each dsig:Reference Element all transformation elements.
*/
private transient Element[] dsigReferenceTransforms = null;
@@ -103,14 +93,15 @@ public class IdentityLink implements Serializable, IIdentityLink {
private String issueInstant;
/**
- * we need all public keys stored in the identity link
+ * we need all public keys stored in the identity link.
*/
private PublicKey[] publicKey;
/**
- * Constructor for IdentityLink
+ * Constructor for IdentityLink.
*/
- public IdentityLink() {}
+ public IdentityLink() {
+ }
/*
* (non-Javadoc)
@@ -157,7 +148,8 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#getIdentificationValue()
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#getIdentificationValue()
*/
@Override
public String getIdentificationValue() {
@@ -177,7 +169,9 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setDateOfBirth(java.lang.String)
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setDateOfBirth(java.lang.
+ * String)
*/
@Override
public void setDateOfBirth(final String dateOfBirth) {
@@ -187,7 +181,9 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setFamilyName(java.lang.String)
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setFamilyName(java.lang.
+ * String)
*/
@Override
public void setFamilyName(final String familyName) {
@@ -197,7 +193,8 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setGivenName(java.lang.String)
+ * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setGivenName(java.lang.
+ * String)
*/
@Override
public void setGivenName(final String givenName) {
@@ -207,7 +204,9 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setIdentificationValue(java.lang.String)
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setIdentificationValue(java.
+ * lang.String)
*/
@Override
public void setIdentificationValue(final String identificationValue) {
@@ -217,7 +216,9 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setIdentificationType(java.lang.String)
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setIdentificationType(java.
+ * lang.String)
*/
@Override
public void setIdentificationType(final String identificationType) {
@@ -248,7 +249,8 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#getSerializedSamlAssertion()
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#getSerializedSamlAssertion()
*/
@Override
public String getSerializedSamlAssertion() {
@@ -258,7 +260,9 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setSamlAssertion(org.w3c.dom.Element)
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setSamlAssertion(org.w3c.dom
+ * .Element)
*/
@Override
public void setSamlAssertion(final Element samlAssertion)
@@ -270,7 +274,8 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#getDsigReferenceTransforms()
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#getDsigReferenceTransforms()
*/
@Override
public Element[] getDsigReferenceTransforms() {
@@ -287,8 +292,8 @@ public class IdentityLink implements Serializable, IIdentityLink {
* (non-Javadoc)
*
* @see
- * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setDsigReferenceTransforms(org.w3c.dom.Element
- * [])
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setDsigReferenceTransforms(
+ * org.w3c.dom.Element [])
*/
@Override
public void setDsigReferenceTransforms(final Element[] dsigReferenceTransforms) {
@@ -317,7 +322,9 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setPublicKey(java.security.PublicKey[])
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setPublicKey(java.security.
+ * PublicKey[])
*/
@Override
public void setPublicKey(final PublicKey[] publicKey) {
@@ -346,7 +353,9 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setPrPerson(org.w3c.dom.Element)
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setPrPerson(org.w3c.dom.
+ * Element)
*/
@Override
public void setPrPerson(final Element prPerson) {
@@ -366,7 +375,9 @@ public class IdentityLink implements Serializable, IIdentityLink {
/*
* (non-Javadoc)
*
- * @see at.gv.egovernment.moa.id.auth.data.IIdentityLink#setIssueInstant(java.lang.String)
+ * @see
+ * at.gv.egovernment.moa.id.auth.data.IIdentityLink#setIssueInstant(java.lang.
+ * String)
*/
@Override
public void setIssueInstant(final String issueInstant) {
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/SimpleIdentityLinkAssertionParser.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/SimpleIdentityLinkAssertionParser.java
index 220469d3..acb877c2 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/SimpleIdentityLinkAssertionParser.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/SimpleIdentityLinkAssertionParser.java
@@ -1,22 +1,5 @@
-/*******************************************************************************
- * 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
+ * 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
@@ -31,7 +14,7 @@
* 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.egiz.eaaf.core.impl.idp.auth.data;
@@ -40,17 +23,19 @@ import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
-import at.gv.egiz.eaaf.core.api.data.XMLNamespaceConstants;
+
+import org.springframework.util.Base64Utils;
+import org.w3c.dom.Element;
+import org.w3c.dom.traversal.NodeIterator;
+
+import at.gv.egiz.eaaf.core.api.data.XmlNamespaceConstants;
import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink;
import at.gv.egiz.eaaf.core.exceptions.EaafParserException;
import at.gv.egiz.eaaf.core.impl.utils.DomUtils;
import at.gv.egiz.eaaf.core.impl.utils.XPathUtils;
-import org.springframework.util.Base64Utils;
-import org.w3c.dom.Element;
-import org.w3c.dom.traversal.NodeIterator;
/**
- * Parses MDS from an identity link <saml:Assertion>
+ * Parses MDS from an identity link. <saml:Assertion>
* This IDL parser extract NO key information!
*
*/
@@ -60,56 +45,59 @@ public class SimpleIdentityLinkAssertionParser {
// XPath namespace prefix shortcuts
//
- /** Xpath prefix for reaching PersonData Namespaces */
- private static final String PDATA = XMLNamespaceConstants.PD_PREFIX + ":";
- /** Xpath prefix for reaching SAML Namespaces */
- private static final String SAML = XMLNamespaceConstants.SAML_PREFIX + ":";
- /** Xpath prefix for reaching XML-DSIG Namespaces */
- private static final String DSIG = XMLNamespaceConstants.DSIG_PREFIX + ":";
- /** Xpath expression to the root element */
+ /** Xpath prefix for reaching PersonData Namespaces. */
+ private static final String PDATA = XmlNamespaceConstants.PD_PREFIX + ":";
+ /** Xpath prefix for reaching SAML Namespaces. */
+ private static final String SAML = XmlNamespaceConstants.SAML_PREFIX + ":";
+ /** Xpath prefix for reaching XML-DSIG Namespaces. */
+ private static final String DSIG = XmlNamespaceConstants.DSIG_PREFIX + ":";
+ /** Xpath expression to the root element. */
private static final String ROOT = "";
- /** Xpath expression to the SAMLSubjectConfirmationData element */
+ /** Xpath expression to the SAMLSubjectConfirmationData element. */
private static final String SAML_SUBJECT_CONFIRMATION_DATA_XPATH =
ROOT + SAML + "AttributeStatement/" + SAML + "Subject/" + SAML + "SubjectConfirmation/" + SAML
+ "SubjectConfirmationData";
- /** Xpath expression to the PersonData element */
+ /** Xpath expression to the PersonData element. */
public static final String PERSON_XPATH =
SAML_SUBJECT_CONFIRMATION_DATA_XPATH + "/" + PDATA + "Person";
- /** Xpath expression to the PersonData GivenName element */
+ /** Xpath expression to the PersonData GivenName element. */
public static final String PERSON_GIVEN_NAME_XPATH =
PERSON_XPATH + "/" + PDATA + "Name/" + PDATA + "GivenName";
- /** Xpath expression to the PersonData FamilyName element */
+ /** Xpath expression to the PersonData FamilyName element. */
public static final String PERSON_FAMILY_NAME_XPATH =
PERSON_XPATH + "/" + PDATA + "Name/" + PDATA + "FamilyName";
- /** Xpath expression to the PersonData DateOfBirth element */
+ /** Xpath expression to the PersonData DateOfBirth element. */
public static final String PERSON_DATE_OF_BIRTH_XPATH =
PERSON_XPATH + "/" + PDATA + "DateOfBirth";
- /** Xpath expression to the Identification Value element */
+ /** Xpath expression to the Identification Value element. */
public static final String PERSON_IDENT_VALUE_XPATH =
PERSON_XPATH + "/" + PDATA + "Identification/" + PDATA + "Value";
- /** Xpath expression to the Identification Value element */
+ /** Xpath expression to the Identification Value element. */
public static final String PERSON_IDENT_TYPE_XPATH =
PERSON_XPATH + "/" + PDATA + "Identification/" + PDATA + "Type";
- /** Xpath expression to the DSIG X509Certificate element */
+ /** Xpath expression to the DSIG X509Certificate element. */
private static final String DSIG_CERTIFICATES_XPATH = ROOT + DSIG + "Signature/" + DSIG
+ "KeyInfo/" + DSIG + "X509Data/" + DSIG + "X509Certificate";
- /** Xpath expression to the DSIG Transforms element */
+ /** Xpath expression to the DSIG Transforms element. */
private static final String DSIG_REFERENCE_TRANSFORMATION_XPATH =
ROOT + DSIG + "Signature/" + DSIG + "SignedInfo/" + DSIG + "Reference/" + DSIG + "Transforms";
- /** The IssueInstant attribute of the SAML assertion */
+ /** The IssueInstant attribute of the SAML assertion. */
private static final String ISSUE_INSTANT_ATTR = "IssueInstant";
public static final String ASSERTIONID = "AssertionID";
- /** This is the root element of the XML-Document provided by the Security Layer Card */
+ /**
+ * This is the root element of the XML-Document provided by the Security Layer
+ * Card.
+ */
private Element assertionElem;
/**
- * Constructor for IdentityLinkAssertionParser
. A DOM-representation of the incoming
- * String will be created
+ * Constructor for IdentityLinkAssertionParser
. A
+ * DOM-representation of the incoming String will be created
*
* @param xmlAssertion <saml:Assertion>
as String
* @throws EaafParserException on any parsing error
@@ -120,7 +108,7 @@ public class SimpleIdentityLinkAssertionParser {
assertionElem = DomUtils.parseXmlValidating(s);
} catch (final Throwable t) {
- throw new EaafParserException("parser.01", new Object[] {t.toString()}, t);
+ throw new EaafParserException("parser.01", new Object[] { t.toString() }, t);
}
}
@@ -136,8 +124,8 @@ public class SimpleIdentityLinkAssertionParser {
}
/**
- * Constructor for IdentityLinkAssertionParser
. A DOM-representation of the incoming
- * Inputstream will be created
+ * Constructor for IdentityLinkAssertionParser
. A
+ * DOM-representation of the incoming Inputstream will be created
*
* @param xmlAssertion <saml:Assertion>
as InputStream
* @throws EaafParserException on any parsing error
@@ -148,13 +136,13 @@ public class SimpleIdentityLinkAssertionParser {
assertionElem = DomUtils.parseXmlValidating(xmlAssertion);
} catch (final Throwable t) {
- throw new EaafParserException("parser.01", new Object[] {t.toString()}, t);
+ throw new EaafParserException("parser.01", new Object[] { t.toString() }, t);
}
}
/**
- * Parses the identity link from the <saml:Assertion>
+ * Parses the identity link from the <saml:Assertion>
.
*
* @return Identity link
* @throws EaafParserException on any parsing error
@@ -199,7 +187,7 @@ public class SimpleIdentityLinkAssertionParser {
// identityLink.setPublicKey(getPublicKeys());
} catch (final Throwable t) {
- throw new EaafParserException("parser.01", new Object[] {t.toString()}, t);
+ throw new EaafParserException("parser.01", new Object[] { t.toString() }, t);
}
return identityLink;
@@ -207,10 +195,10 @@ public class SimpleIdentityLinkAssertionParser {
/**
* Parses a string array of decoded base64 certificates from the
- * <InfoboxReadResponse>
found in the dsig-signature
+ * <InfoboxReadResponse>
found in the dsig-signature.
*
* @return String[] with raw-certificates from the dsig-signature keyinfo
- * @throws Exception
+ * @throws Exception In case of an error
*/
public String[] getCertificates() throws Exception {
final List certs = new ArrayList();
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java
index c785e1cb..3d093a9f 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/modules/AbstractAuthServletTask.java
@@ -27,11 +27,24 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.fileupload.FileItem;
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.FileUploadException;
+import org.apache.commons.fileupload.disk.DiskFileItemFactory;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.lang3.ArrayUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.core.io.ResourceLoader;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.IRequestStorage;
-import at.gv.egiz.eaaf.core.api.data.EAAFConstants;
+import at.gv.egiz.eaaf.core.api.data.EaafConstants;
import at.gv.egiz.eaaf.core.api.idp.IConfiguration;
import at.gv.egiz.eaaf.core.api.idp.auth.services.IProtocolAuthenticationService;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
@@ -41,20 +54,10 @@ import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
import at.gv.egiz.eaaf.core.impl.idp.controller.ProtocolFinalizationController;
import at.gv.egiz.eaaf.core.impl.idp.process.springweb.AbstractTask;
import at.gv.egiz.eaaf.core.impl.utils.DataUrlBuilder;
-import org.apache.commons.fileupload.FileItem;
-import org.apache.commons.fileupload.FileItemFactory;
-import org.apache.commons.fileupload.FileUploadException;
-import org.apache.commons.fileupload.disk.DiskFileItemFactory;
-import org.apache.commons.fileupload.servlet.ServletFileUpload;
-import org.apache.commons.lang3.ArrayUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.core.io.ResourceLoader;
/**
- * Task based counterpart to {@link AuthServlet}, providing the same utility methods (error
- * handling, parameter parsing etc.).
+ * Task based counterpart to {@link AuthServlet}, providing the same utility
+ * methods (error handling, parameter parsing etc.).
*
- *This handler start a protocol-specific error handling. - *
+ *+ * This handler start a protocol-specific error handling. + *
* - * @param req http request + * @param req http request * @param resp http response - * @param e exception + * @param e exception * @throws IOException in case of an exception handling error */ - @ExceptionHandler({EaafException.class}) + @ExceptionHandler({ EaafException.class }) public void eaafExceptionHandler(final HttpServletRequest req, final HttpServletResponse resp, final Exception e) throws IOException { try { @@ -102,15 +104,15 @@ public abstract class AbstractController { * This handler wrote an internal server error into http response * * - * @param resp http response + * @param resp http response * @param exception exception * @throws IOException In case of an internal error. */ - @ExceptionHandler({Exception.class}) + @ExceptionHandler({ Exception.class }) public void genericExceptionHandler(final HttpServletResponse resp, final Exception exception) throws IOException { log.error("Internel Server Error.", exception); - resp.setContentType(EAAFConstants.CONTENTTYPE_HTML_UTF8); + resp.setContentType(EaafConstants.CONTENTTYPE_HTML_UTF8); resp.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Internal Server Error!" + "(Errorcode=9199" + " | Description=" + StringEscapeUtils.escapeHtml4(StringEscapeUtils.escapeEcmaScript(exception.getMessage())) @@ -125,13 +127,13 @@ public abstract class AbstractController { * This handler wrote an internal server error into http response * * - * @param resp http response + * @param resp http response * @param exception exception */ - @ExceptionHandler({IOException.class}) + @ExceptionHandler({ IOException.class }) public void ioExceptionHandler(final HttpServletResponse resp, final Throwable exception) { log.error("Internel Server Error.", exception); - resp.setContentType(EAAFConstants.CONTENTTYPE_HTML_UTF8); + resp.setContentType(EaafConstants.CONTENTTYPE_HTML_UTF8); resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } @@ -144,7 +146,8 @@ public abstract class AbstractController { final Throwable extractedException = extractOriginalExceptionFromProcessException(exceptionThrown); - // extract pendingRequestID and originalException if it was a TaskExecutionException + // extract pendingRequestID and originalException if it was a + // TaskExecutionException if (extractedException instanceof TaskExecutionException) { // set original exception loggedException = ((TaskExecutionException) extractedException).getOriginalException(); @@ -164,14 +167,14 @@ public abstract class AbstractController { } try { - // switch to protocol-finalize method to generate a protocol-specific error message + // switch to protocol-finalize method to generate a protocol-specific error + // message // log error directly in debug mode if (log.isDebugEnabled()) { log.warn(loggedException.getMessage(), loggedException); } - // put exception into transaction store for redirect final String key = Random.nextLongRandom(); if (pendingReq != null) { @@ -187,7 +190,7 @@ public abstract class AbstractController { String redirectUrl = null; redirectUrl = ServletUtils.getBaseUrl(req); redirectUrl += "/" + ProtocolFinalizationController.ENDPOINT_ERRORHANDLING + "?" - + EAAFConstants.PARAM_HTTP_ERROR_CODE + "=" + key; + + EaafConstants.PARAM_HTTP_ERROR_CODE + "=" + key; resp.setContentType("text/html"); resp.setStatus(302); @@ -206,14 +209,12 @@ public abstract class AbstractController { } - - /** * Extracts a TaskExecutionException of a ProcessExecutionExeception Stacktrace. * * @param exception error - * @return Return the latest TaskExecutionExecption if exists, otherwise the latest - * ProcessExecutionException + * @return Return the latest TaskExecutionExecption if exists, otherwise the + * latest ProcessExecutionException */ private Throwable extractOriginalExceptionFromProcessException(final Throwable exception) { Throwable exholder = exception; @@ -238,6 +239,4 @@ public abstract class AbstractController { } } - - } diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractProcessEngineSignalController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractProcessEngineSignalController.java index 9ff468d3..098bca4c 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractProcessEngineSignalController.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/AbstractProcessEngineSignalController.java @@ -20,20 +20,23 @@ package at.gv.egiz.eaaf.core.impl.idp.controller; import java.io.IOException; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.text.StringEscapeUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; + import at.gv.egiz.eaaf.core.api.IRequest; import at.gv.egiz.eaaf.core.api.IRequestStorage; import at.gv.egiz.eaaf.core.api.IStatusMessenger; -import at.gv.egiz.eaaf.core.api.data.EAAFConstants; +import at.gv.egiz.eaaf.core.api.data.EaafConstants; import at.gv.egiz.eaaf.core.api.idp.process.ProcessEngine; import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.exceptions.EaafIllegalStateException; import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils; -import org.apache.commons.text.StringEscapeUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; /** * Servlet that resumes a suspended process (in case of asynchronous tasks). @@ -65,7 +68,7 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont log.info("No PendingRequest with Id: " + pendingRequestID + " Maybe, a transaction timeout occure."); throw new EaafException(IStatusMessenger.CODES_INTERNAL_ERROR_AUTH_TIMEOUT, - new Object[] {pendingRequestID}); + new Object[] { pendingRequestID }); } @@ -75,7 +78,7 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont // process instance is mandatory if (pendingReq.getProcessInstanceId() == null) { throw new EaafIllegalStateException( - new Object[] {"MOA session does not provide process instance id."}); + new Object[] { "MOA session does not provide process instance id." }); } @@ -91,22 +94,22 @@ public abstract class AbstractProcessEngineSignalController extends AbstractCont } - } /** - * Retrieves the current pending-request id from the HttpServletRequest parameter + * Retrieves the current pending-request id from the HttpServletRequest + * parameter * * - * Note that this class/method can be overwritten by modules providing their own strategy of - * retrieving the respective pending-request id. + * Note that this class/method can be overwritten by modules providing their own + * strategy of retrieving the respective pending-request id. * * @param request The unterlying HttpServletRequest. * @return The current pending-request id. */ public String getPendingRequestId(final HttpServletRequest request) { return StringEscapeUtils - .escapeHtml4(request.getParameter(EAAFConstants.PARAM_HTTP_TARGET_PENDINGREQUESTID)); + .escapeHtml4(request.getParameter(EaafConstants.PARAM_HTTP_TARGET_PENDINGREQUESTID)); } diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java index 7b350c3b..51a8aefd 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/ProtocolFinalizationController.java @@ -20,15 +20,10 @@ package at.gv.egiz.eaaf.core.impl.idp.controller; import java.io.IOException; + import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import at.gv.egiz.components.eventlog.api.EventConstants; -import at.gv.egiz.eaaf.core.api.IRequest; -import at.gv.egiz.eaaf.core.api.IRequestStorage; -import at.gv.egiz.eaaf.core.api.IStatusMessenger; -import at.gv.egiz.eaaf.core.api.data.EAAFConstants; -import at.gv.egiz.eaaf.core.api.data.ExceptionContainer; -import at.gv.egiz.eaaf.core.exceptions.EaafException; + import org.apache.commons.text.StringEscapeUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -37,6 +32,14 @@ import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import at.gv.egiz.components.eventlog.api.EventConstants; +import at.gv.egiz.eaaf.core.api.IRequest; +import at.gv.egiz.eaaf.core.api.IRequestStorage; +import at.gv.egiz.eaaf.core.api.IStatusMessenger; +import at.gv.egiz.eaaf.core.api.data.EaafConstants; +import at.gv.egiz.eaaf.core.api.data.ExceptionContainer; +import at.gv.egiz.eaaf.core.exceptions.EaafException; + /** * Protocol finialization end-point. * @@ -55,17 +58,17 @@ public class ProtocolFinalizationController extends AbstractController { /** * End-Point to handle errors. * - * @param req http request + * @param req http request * @param resp http response * @throws EaafException In case of an internal error - * @throws IOException In case of a servlet error + * @throws IOException In case of a servlet error */ - @RequestMapping(value = ENDPOINT_ERRORHANDLING, method = {RequestMethod.GET}) + @RequestMapping(value = ENDPOINT_ERRORHANDLING, method = { RequestMethod.GET }) public void errorHandling(final HttpServletRequest req, final HttpServletResponse resp) throws EaafException, IOException { // receive an authentication error final String errorid = - StringEscapeUtils.escapeHtml4(req.getParameter(EAAFConstants.PARAM_HTTP_ERROR_CODE)); + StringEscapeUtils.escapeHtml4(req.getParameter(EaafConstants.PARAM_HTTP_ERROR_CODE)); if (errorid != null) { IRequest pendingReq = null; try { @@ -127,25 +130,25 @@ public class ProtocolFinalizationController extends AbstractController { /** * End-Point to finalize authentication protocol. * - * @param req http request + * @param req http request * @param resp http response * @throws EaafException In case of an internal error - * @throws IOException In case of a servlet error + * @throws IOException In case of a servlet error */ - @RequestMapping(value = ENDPOINT_FINALIZEPROTOCOL, method = {RequestMethod.GET}) + @RequestMapping(value = ENDPOINT_FINALIZEPROTOCOL, method = { RequestMethod.GET }) public void finalizeAuthProtocol(final HttpServletRequest req, final HttpServletResponse resp) throws EaafException, IOException { // read pendingRequest from http request final String pendingRequestID = StringEscapeUtils - .escapeHtml4(req.getParameter(EAAFConstants.PARAM_HTTP_TARGET_PENDINGREQUESTID)); + .escapeHtml4(req.getParameter(EaafConstants.PARAM_HTTP_TARGET_PENDINGREQUESTID)); final IRequest pendingReq = requestStorage.getPendingRequest(pendingRequestID); if (pendingReq == null) { log.error("No PendingRequest with ID " + pendingRequestID + " found.!"); protAuthService.handleErrorNoRedirect( new EaafException(IStatusMessenger.CODES_INTERNAL_ERROR_AUTH_TIMEOUT, - new Object[] {pendingRequestID,}), + new Object[] { pendingRequestID, }), req, resp, false); } else { diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java index 88dae874..07fc652a 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/controller/protocols/RequestImpl.java @@ -28,13 +28,22 @@ import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; import java.util.UUID; + import javax.annotation.Nonnull; import javax.servlet.http.HttpServletRequest; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.lang.NonNull; +import org.springframework.lang.Nullable; +import org.springframework.util.Assert; + import at.gv.egiz.eaaf.core.api.IRequest; -import at.gv.egiz.eaaf.core.api.data.EAAFConstants; +import at.gv.egiz.eaaf.core.api.data.EaafConstants; import at.gv.egiz.eaaf.core.api.idp.IConfiguration; import at.gv.egiz.eaaf.core.api.idp.IConfigurationWithSP; -import at.gv.egiz.eaaf.core.api.idp.IspConfiguration; +import at.gv.egiz.eaaf.core.api.idp.ISpConfiguration; import at.gv.egiz.eaaf.core.exceptions.EaafAuthenticationException; import at.gv.egiz.eaaf.core.exceptions.EaafException; import at.gv.egiz.eaaf.core.exceptions.EaafStorageException; @@ -42,12 +51,6 @@ import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper; import at.gv.egiz.eaaf.core.impl.utils.HttpUtils; import at.gv.egiz.eaaf.core.impl.utils.Random; import at.gv.egiz.eaaf.core.impl.utils.TransactionIdUtils; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.lang.NonNull; -import org.springframework.lang.Nullable; -import org.springframework.util.Assert; public abstract class RequestImpl implements IRequest, Serializable { @@ -70,7 +73,7 @@ public abstract class RequestImpl implements IRequest, Serializable { private String requestedServiceProviderIdentifer; private String idpAuthUrl = null; - private IspConfiguration spConfiguration = null; + private ISpConfiguration spConfiguration = null; private boolean passiv = false; private boolean force = false; @@ -89,11 +92,10 @@ public abstract class RequestImpl implements IRequest, Serializable { private final Map- * This method sets the pending-request object of the task implementation and starts the - * {@code execute} method of the task + * This method sets the pending-request object of the task implementation and + * starts the {@code execute} method of the task *
* - * @param pendingReq The pending-request object (never {@code null}). + * @param pendingReq The pending-request object (never {@code null}). * @param executionContext The execution context (never {@code null}). - * @param request The HttpServletRequest (never {@code null}). - * @param response The HttpServletResponse (never {@code null}). - * @return The pending-request object, because Process-management works recursive + * @param request The HttpServletRequest (never {@code null}). + * @param response The HttpServletResponse (never {@code null}). + * @return The pending-request object, because Process-management works + * recursive * - * @throws IllegalStateException Thrown in case the task is being run within the required - * environment. Refer to javadoc for further information. - * @throws Exception Thrown in case of error executing the task. + * @throws IllegalStateException Thrown in case the task is being run within the + * required environment. Refer to javadoc for + * further information. + * @throws Exception Thrown in case of error executing the task. */ protected abstract IRequest internalExecute(IRequest pendingReq, ExecutionContext executionContext, HttpServletRequest request, HttpServletResponse response) throws TaskExecutionException; - - } diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/SpringWebExpressionEvaluator.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/SpringWebExpressionEvaluator.java index c723a728..afcc0a58 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/SpringWebExpressionEvaluator.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/process/springweb/SpringWebExpressionEvaluator.java @@ -22,12 +22,10 @@ package at.gv.egiz.eaaf.core.impl.idp.process.springweb; import java.io.Serializable; import java.util.Map; import java.util.Objects; + import javax.annotation.PostConstruct; import javax.servlet.http.HttpServletRequest; -import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; -import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluationContext; -import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluator; -import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition; + import org.apache.commons.lang3.BooleanUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -39,13 +37,21 @@ import org.springframework.expression.ExpressionParser; import org.springframework.expression.spel.standard.SpelExpressionParser; import org.springframework.expression.spel.support.StandardEvaluationContext; +import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; +import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluationContext; +import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluator; +import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition; + /** - * Expression evaluator for processing {@link Transition} conditions allowing to. + * Expression evaluator for processing {@link Transition} conditions allowing + * to. *- * The parsing methods in this class make use of some features internal to the Xerces DOM parser, - * mainly for performance reasons. As soon as JAXP (currently at version 1.2) is better at schema - * handling, it should be used as the parser interface. - *
+ *+ * The parsing methods in this class make use of some features internal to the + * Xerces DOM parser, mainly for performance reasons. As soon as JAXP (currently + * at version 1.2) is better at schema handling, it should be used as the parser + * interface. + *
* */ public class DomUtils { @@ -103,7 +105,8 @@ public class DomUtils { private static final String EXTERNAL_SCHEMA_LOCATION_PROPERTY = "http://apache.org/xml/properties/schema/external-schemaLocation"; /** - * Property URI for providing the external schema location for elements without a namespace. + * Property URI for providing the external schema location for elements without + * a namespace. */ private static final String EXTERNAL_NO_NAMESPACE_SCHEMA_LOCATION_PROPERTY = "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation"; @@ -117,8 +120,6 @@ public class DomUtils { public static final String DISALLOW_DOCTYPE_FEATURE = "http://apache.org/xml/features/disallow-doctype-decl"; - - /** Property URI for the Xerces grammar pool. */ private static final String GRAMMAR_POOL = org.apache.xerces.impl.Constants.XERCES_PROPERTY_PREFIX + org.apache.xerces.impl.Constants.XMLGRAMMAR_POOL_PROPERTY; @@ -129,8 +130,8 @@ public class DomUtils { /** Xerces schema grammar pool. */ private static XMLGrammarPool grammarPool = new XMLGrammarPoolImpl(); /** - * Set holding the NamespaceURIs of the grammarPool, to prevent multiple entries of same grammars - * to the pool. + * Set holding the NamespaceURIs of the grammarPool, to prevent multiple entries + * of same grammars to the pool. */ private static Set grammarNamespaces; @@ -140,12 +141,13 @@ public class DomUtils { } /** - * Preparse a schema and add it to the schema pool. The method only adds the schema to the pool if - * a schema having the samesystemId
(namespace URI) is not already present in the
- * pool.
+ * Preparse a schema and add it to the schema pool. The method only adds the
+ * schema to the pool if a schema having the same systemId
+ * (namespace URI) is not already present in the pool.
*
- * @param inputStream An InputStream
providing the contents of the schema.
- * @param systemId The systemId (namespace URI) to use for the schema.
+ * @param inputStream An InputStream
providing the contents of the
+ * schema.
+ * @param systemId The systemId (namespace URI) to use for the schema.
* @throws IOException An error occurred reading the schema.
*/
public static void addSchemaToPool(final InputStream inputStream, final String systemId)
@@ -178,24 +180,32 @@ public class DomUtils {
/**
* Parse an XML document from an InputStream
.
*
- *
- * It uses a MOAEntityResolver
as the EntityResolver
and a
- * MOAErrorHandler
as the ErrorHandler
.
- *
+ * It uses a MOAEntityResolver
as the EntityResolver
+ * and a MOAErrorHandler
as the ErrorHandler
.
+ *
InputStream
containing 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.
- * @param parserFeatures Map of features that should be set into XML parser
+ * @param inputStream The InputStream
+ * containing 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.
+ * @param parserFeatures Map of features that should be set
+ * into XML parser
* @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.
+ * @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(final InputStream inputStream, final boolean validating,
final String externalSchemaLocations, final String externalNoNamespaceSchemaLocation,
@@ -209,24 +219,31 @@ public class DomUtils {
/**
* Parse an XML document from a String
.
*
- *
- * It uses a MOAEntityResolver
as the EntityResolver
and a
- * MOAErrorHandler
as the ErrorHandler
.
- *
+ * It uses a MOAEntityResolver
as the EntityResolver
+ * and a MOAErrorHandler
as the ErrorHandler
.
+ *
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.
+ * @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.
+ * @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(final String xmlString, final String encoding,
final boolean validating, final String externalSchemaLocations,
@@ -241,24 +258,31 @@ public class DomUtils {
/**
* Parse an XML document from a String
.
*
- *
- * It uses a MOAEntityResolver
as the EntityResolver
and a
- * MOAErrorHandler
as the ErrorHandler
.
- *
+ * It uses a MOAEntityResolver
as the EntityResolver
+ * and a MOAErrorHandler
as the ErrorHandler
.
+ *
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.
+ * @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.
+ * @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(final String xmlString, final String encoding,
final boolean validating, final String externalSchemaLocations,
@@ -273,18 +297,25 @@ public class DomUtils {
/**
* Parse an UTF-8 encoded XML document from a String
.
*
- * @param xmlString The String
containing 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.
+ * @param xmlString The String
containing
+ * 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.
+ * @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(final String xmlString, final boolean validating,
final String externalSchemaLocations, final String externalNoNamespaceSchemaLocation)
@@ -297,22 +328,33 @@ public class DomUtils {
/**
* Parse an XML document from an InputStream
.
*
- * @param inputStream The InputStream
containing 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.
- * @param entityResolver An EntityResolver
to resolve external entities (schemas and
- * DTDs). If null
, it will not be set.
- * @param errorHandler An ErrorHandler
to decide what to do with parsing errors. If
- * null
, it will not be set.
+ * @param inputStream The InputStream
+ * containing 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.
+ * @param entityResolver An EntityResolver
to
+ * resolve external entities (schemas
+ * and DTDs). If null
, it
+ * will not be set.
+ * @param errorHandler An ErrorHandler
to
+ * decide what to do with parsing
+ * errors. If null
, it
+ * will not be set.
* @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.
+ * @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(final InputStream inputStream, final boolean validating,
final String externalSchemaLocations, final String externalNoNamespaceSchemaLocation,
@@ -330,8 +372,8 @@ public class DomUtils {
// }
// }
-
- // if Debug is enabled make a copy of inputStream to enable debug output in case of SAXException
+ // if Debug is enabled make a copy of inputStream to enable debug output in case
+ // of SAXException
byte[] buffer = null;
ByteArrayInputStream baStream = null;
if (true == log.isDebugEnabled()) {
@@ -340,8 +382,6 @@ public class DomUtils {
}
-
-
// create the DOM parser
if (symbolTable != null) {
parser = new DOMParser(symbolTable, grammarPool);
@@ -379,8 +419,8 @@ public class DomUtils {
}
// 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) {
if (externalSchemaLocations != null) {
@@ -423,9 +463,9 @@ public class DomUtils {
*
* @param inputStream data to parse
* @return Element
- * @throws SAXException In case of an error
- * @throws IOException In case of an error
- * @throws ParserConfigurationException In case of an error
+ * @throws SAXException In case of an error
+ * @throws IOException In case of an error
+ * @throws ParserConfigurationException In case of an error
*/
public static Document parseDocumentSimple(final InputStream inputStream)
throws SAXException, IOException, ParserConfigurationException {
@@ -446,62 +486,56 @@ public class DomUtils {
return parser.getDocument();
}
-
-
-
-
-
-
-
-
-
-
/**
* A convenience method to parse an XML document validating.
*
* @param inputStream The InputStream
containing the XML document.
* @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.
+ * @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(final InputStream inputStream)
throws ParserConfigurationException, SAXException, IOException {
return DomUtils
- .parseDocument(inputStream, true, XMLNamespaceConstants.ALL_SCHEMA_LOCATIONS, null, null)
+ .parseDocument(inputStream, true, XmlNamespaceConstants.ALL_SCHEMA_LOCATIONS, null, null)
.getDocumentElement();
}
/**
* A convenience method to parse an XML document validating.
*
- * @param inputStream The InputStream
containing the XML document.
+ * @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.
+ * @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(final InputStream inputStream,
final MapInputStream
containing the XML document.
* @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.
+ * @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 parseXmlNonValidating(final InputStream inputStream)
throws ParserConfigurationException, SAXException, IOException {
- return DomUtils.parseDocument(inputStream, false, XMLNamespaceConstants.ALL_SCHEMA_LOCATIONS,
+ return DomUtils.parseDocument(inputStream, false, XmlNamespaceConstants.ALL_SCHEMA_LOCATIONS,
null, Collections.unmodifiableMap(new HashMapString
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 true
, if the element
validates against the schemas declared
- * in it.
- * @throws SAXException An error occurred parsing the document.
- * @throws IOException An error occurred reading the document from its serialized representation.
+ * @param element The element to validate.
+ * @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 true
, if the element
validates against the
+ * schemas declared in it.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document
+ * from its serialized representation.
* @throws ParserConfigurationException An error occurred configuring the XML
- * @throws TransformerException An error occurred serializing the element.
+ * @throws TransformerException An error occurred serializing the
+ * element.
*/
public static boolean validateElement(final Element element, final String externalSchemaLocations,
final String externalNoNamespaceSchemaLocation)
@@ -552,7 +592,6 @@ public class DomUtils {
parser.setFeature(EXTERNAL_GENERAL_ENTITIES_FEATURE, false);
parser.setFeature(DISALLOW_DOCTYPE_FEATURE, true);
-
if (externalSchemaLocations != null) {
parser.setProperty(EXTERNAL_SCHEMA_LOCATION_PROPERTY, externalSchemaLocations);
}
@@ -569,23 +608,28 @@ public class DomUtils {
return true;
}
-
/**
* Schema validate a given DOM element.
*
- * @param element The element to validate.
- * @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 true
, if the element
validates against the schemas declared
- * in it.
- * @throws SAXException An error occurred parsing the document.
- * @throws IOException An error occurred reading the document from its serialized representation.
+ * @param element The element to validate.
+ * @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 true
, if the element
validates against the
+ * schemas declared in it.
+ * @throws SAXException An error occurred parsing the document.
+ * @throws IOException An error occurred reading the document
+ * from its serialized representation.
* @throws ParserConfigurationException An error occurred configuring the XML
- * @throws TransformerException An error occurred serializing the element.
+ * @throws TransformerException An error occurred serializing the
+ * element.
*/
public static boolean validateElement(final Element element, final String externalSchemaLocations,
final String externalNoNamespaceSchemaLocation, final EntityResolver entityResolver)
@@ -628,32 +672,35 @@ public class DomUtils {
/**
* Serialize the given DOM node.
*
- *+ *
* The node will be serialized using the UTF-8 encoding. - *
+ * * * @param node The node to serialize. * @return String TheString
representation of the given DOM node.
- * @throws TransformerException An error occurred transforming the node to a String
.
- * @throws IOException An IO error occurred writing the node to a byte array.
+ * @throws TransformerException An error occurred transforming the node to a
+ * String
.
+ * @throws IOException An IO error occurred writing the node to a byte
+ * array.
*/
public static String serializeNode(final Node node) throws TransformerException, IOException {
return new String(serializeNode(node, "UTF-8", false), "UTF-8");
}
-
/**
* Serialize the given DOM node.
*
- *+ *
* The node will be serialized using the UTF-8 encoding. - *
+ * * - * @param node The node to serialize. + * @param node The node to serialize. * @param omitXmlDeclaration The boolean value for omitting the XML Declaration. * @return String TheString
representation of the given DOM node.
- * @throws TransformerException An error occurred transforming the node to a String
.
- * @throws IOException An IO error occurred writing the node to a byte array.
+ * @throws TransformerException An error occurred transforming the node to a
+ * String
.
+ * @throws IOException An IO error occurred writing the node to a byte
+ * array.
*/
public static String serializeNode(final Node node, final boolean omitXmlDeclaration)
throws TransformerException, IOException {
@@ -663,16 +710,18 @@ public class DomUtils {
/**
* Serialize the given DOM node.
*
- *+ *
* The node will be serialized using the UTF-8 encoding. - *
+ * * - * @param node The node to serialize. + * @param node The node to serialize. * @param omitXmlDeclaration The boolean value for omitting the XML Declaration. - * @param lineSeperator Sets the line seperator String of the parser + * @param lineSeperator Sets the line seperator String of the parser * @return String TheString
representation of the given DOM node.
- * @throws TransformerException An error occurred transforming the node to a String
.
- * @throws IOException An IO error occurred writing the node to a byte array.
+ * @throws TransformerException An error occurred transforming the node to a
+ * String
.
+ * @throws IOException An IO error occurred writing the node to a byte
+ * array.
*/
public static String serializeNode(final Node node, final boolean omitXmlDeclaration,
final String lineSeperator) throws TransformerException, IOException {
@@ -682,12 +731,14 @@ public class DomUtils {
/**
* Serialize the given DOM node to a byte array.
*
- * @param node The node to serialize.
+ * @param node The node to serialize.
* @param xmlEncoding The XML encoding to use.
- * @return The serialized node, as a byte array. Using a compatible encoding this can easily be
- * converted into a String
.
- * @throws TransformerException An error occurred transforming the node to a byte array.
- * @throws IOException An IO error occurred writing the node to a byte array.
+ * @return The serialized node, as a byte array. Using a compatible encoding
+ * this can easily be converted into a String
.
+ * @throws TransformerException An error occurred transforming the node to a
+ * byte array.
+ * @throws IOException An IO error occurred writing the node to a byte
+ * array.
*/
public static byte[] serializeNode(final Node node, final String xmlEncoding)
throws TransformerException, IOException {
@@ -697,31 +748,34 @@ public class DomUtils {
/**
* Serialize the given DOM node to a byte array.
*
- * @param node The node to serialize.
- * @param xmlEncoding The XML encoding to use.
+ * @param node The node to serialize.
+ * @param xmlEncoding The XML encoding to use.
* @param omitDeclaration The boolean value for omitting the XML Declaration.
- * @return The serialized node, as a byte array. Using a compatible encoding this can easily be
- * converted into a String
.
- * @throws TransformerException An error occurred transforming the node to a byte array.
- * @throws IOException An IO error occurred writing the node to a byte array.
+ * @return The serialized node, as a byte array. Using a compatible encoding
+ * this can easily be converted into a String
.
+ * @throws TransformerException An error occurred transforming the node to a
+ * byte array.
+ * @throws IOException An IO error occurred writing the node to a byte
+ * array.
*/
public static byte[] serializeNode(final Node node, final String xmlEncoding,
final boolean omitDeclaration) throws TransformerException, IOException {
return serializeNode(node, xmlEncoding, omitDeclaration, null);
}
-
/**
* Serialize the given DOM node to a byte array.
*
- * @param node The node to serialize.
- * @param xmlEncoding The XML encoding to use.
+ * @param node The node to serialize.
+ * @param xmlEncoding The XML encoding to use.
* @param omitDeclaration The boolean value for omitting the XML Declaration.
- * @param lineSeperator Sets the line seperator String of the parser
- * @return The serialized node, as a byte array. Using a compatible encoding this can easily be
- * converted into a String
.
- * @throws TransformerException An error occurred transforming the node to a byte array.
- * @throws IOException An IO error occurred writing the node to a byte array.
+ * @param lineSeperator Sets the line seperator String of the parser
+ * @return The serialized node, as a byte array. Using a compatible encoding
+ * this can easily be converted into a String
.
+ * @throws TransformerException An error occurred transforming the node to a
+ * byte array.
+ * @throws IOException An IO error occurred writing the node to a byte
+ * array.
*/
public static byte[] serializeNode(final Node node, final String xmlEncoding,
final boolean omitDeclaration, final String lineSeperator)
@@ -737,7 +791,7 @@ public class DomUtils {
transformer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, omit);
if (null != lineSeperator) {
transformer.setOutputProperty("{http://xml.apache.org/xalan}line-separator", lineSeperator);
- // does not work for xalan <= 2.5.1
+ // does not work for xalan <= 2.5.1
}
transformer.transform(new DOMSource(node), new StreamResult(bos));
@@ -750,15 +804,15 @@ public class DomUtils {
/**
* Return the text that a node contains.
*
- *+ *
* This routine: *
*String
value to
- * String
value mapping).
+ * @return The namespace prefix to namespace URL mapping ( a String
+ * value to String
value mapping).
*/
public static Map getNamespaceDeclarations(Node node) {
final Map nsDecls = new HashMap();
@@ -822,8 +877,8 @@ public class DomUtils {
}
/**
- * Add all namespace declarations declared in the parent(s) of a given element and used in the
- * subtree of the given element to the given element.
+ * Add all namespace declarations declared in the parent(s) of a given element
+ * and used in the subtree of the given element to the given element.
*
* @param context The element to which to add the namespaces.
*/
@@ -843,7 +898,7 @@ public class DomUtils {
final String nsUri = (String) e.getValue();
final String nsAttrName = "".equals(prefix) ? "xmlns" : "xmlns:" + prefix;
- context.setAttributeNS(XMLNamespaceConstants.XMLNS_NS_URI, nsAttrName, nsUri);
+ context.setAttributeNS(XmlNamespaceConstants.XMLNS_NS_URI, nsAttrName, nsUri);
}
}
}
@@ -853,8 +908,8 @@ public class DomUtils {
* Collect all the namespace URIs used in the subtree of a given element.
*
* @param context The element that should be searched for namespace URIs.
- * @return All namespace URIs used in the subtree of context
, including the ones used
- * in context
itself.
+ * @return All namespace URIs used in the subtree of context
,
+ * including the ones used in context
itself.
*/
public static Set collectNamespaceUris(final Element context) {
final Set result = new HashSet();
@@ -867,8 +922,8 @@ public class DomUtils {
* A recursive method to do the work of collectNamespaceURIs
.
*
* @param context The context element to evaluate.
- * @param result The result, passed as a parameter to avoid unnecessary instantiations of
- * Set
.
+ * @param result The result, passed as a parameter to avoid unnecessary
+ * instantiations of Set
.
*/
private static void collectNamespaceUrisImpl(final Element context, final Set result) {
final NamedNodeMap attrs = context.getAttributes();
@@ -878,14 +933,14 @@ public class DomUtils {
// add the namespace of the context element
nsUri = context.getNamespaceURI();
- if (nsUri != null && nsUri != XMLNamespaceConstants.XMLNS_NS_URI) {
+ if (nsUri != null && nsUri != XmlNamespaceConstants.XMLNS_NS_URI) {
result.add(nsUri);
}
// add all namespace URIs from attributes
for (i = 0; i < attrs.getLength(); i++) {
nsUri = attrs.item(i).getNamespaceURI();
- if (nsUri != null && nsUri != XMLNamespaceConstants.XMLNS_NS_URI) {
+ if (nsUri != null && nsUri != XmlNamespaceConstants.XMLNS_NS_URI) {
result.add(nsUri);
}
}
@@ -901,12 +956,12 @@ public class DomUtils {
}
/**
- * Check, that each attribute node in the given NodeList
has its parent in the
- * NodeList
as well.
+ * Check, that each attribute node in the given NodeList
has its
+ * parent in the NodeList
as well.
*
* @param nodes The NodeList
to check.
- * @return true
, if each attribute node in nodes
has its parent in
- * nodes
as well.
+ * @return true
, if each attribute node in nodes
has
+ * its parent in nodes
as well.
*/
public static boolean checkAttributeParentsInNodeList(final NodeList nodes) {
final Set nodeSet = new HashSet();
@@ -939,15 +994,19 @@ public class DomUtils {
}
/**
- * Convert an unstructured NodeList
into a DocumentFragment
.
+ * Convert an unstructured NodeList
into a
+ * DocumentFragment
.
*
- * @param nodeList Contains the node list to be converted into a DOM DocumentFragment.
- * @return the resulting DocumentFragment. The DocumentFragment will be backed by a new DOM
- * Document, i.e. all noded of the node list will be cloned.
- * @throws ParserConfigurationException An error occurred creating the DocumentFragment.
+ * @param nodeList Contains the node list to be converted into a DOM
+ * DocumentFragment.
+ * @return the resulting DocumentFragment. The DocumentFragment will be backed
+ * by a new DOM Document, i.e. all noded of the node list will be
+ * cloned.
+ * @throws ParserConfigurationException An error occurred creating the
+ * DocumentFragment.
* @precondition The nodes in the node list appear in document order
- * @precondition for each Attr node in the node list, the owning Element is in the node list as
- * well.
+ * @precondition for each Attr node in the node list, the owning Element is in
+ * the node list as well.
* @precondition each Element or Attr node in the node list is namespace aware.
*/
public static DocumentFragment nodeList2DocumentFragment(final NodeList nodeList)
@@ -973,10 +1032,10 @@ public class DomUtils {
/**
* Helper method for the nodeList2DocumentFragment
.
*
- * @param nodeList The NodeList
to convert.
- * @param currPos The current position in the nodeList
.
- * @param result The resulting DocumentFragment
.
- * @param currOrgElem The current original element.
+ * @param nodeList The NodeList
to convert.
+ * @param currPos The current position in the nodeList
.
+ * @param result The resulting DocumentFragment
.
+ * @param currOrgElem The current original element.
* @param currClonedElem The current cloned element.
* @return The current position.
*/
@@ -1052,7 +1111,7 @@ public class DomUtils {
}
default: {
- log.trace("Node type: {} not supported", currentNode.getNodeType());
+ log.trace("Node type: {} not supported", currentNode.getNodeType());
// All other nodes will be ignored
}
}
@@ -1067,20 +1126,20 @@ public class DomUtils {
* Check, if the given attribute is a namespace declaration.
*
* @param attr The attribute to check.
- * @return true
, if the attribute is a namespace declaration, false
- * otherwise.
+ * @return true
, if the attribute is a namespace declaration,
+ * false
otherwise.
*/
private static boolean isNamespaceDeclaration(final Attr attr) {
- return XMLNamespaceConstants.XMLNS_NS_URI.equals(attr.getNamespaceURI());
+ return XmlNamespaceConstants.XMLNS_NS_URI.equals(attr.getNamespaceURI());
}
/**
* Check, if a given DOM element is an ancestor of a given node.
*
* @param candAnc The DOM element to check for being the ancestor.
- * @param cand The node to check for being the child.
- * @return true
, if candAnc
is an (indirect) ancestor of
- * cand
; false
otherwise.
+ * @param cand The node to check for being the child.
+ * @return true
, if candAnc
is an (indirect) ancestor
+ * of cand
; false
otherwise.
*/
public static boolean isAncestor(final Element candAnc, final Node cand) {
Node currPar = cand.getParentNode();
@@ -1098,8 +1157,9 @@ public class DomUtils {
* Selects the (first) element from a node list and returns it.
*
* @param nl The NodeList to get the element from.
- * @return The (first) element included in the node list or null
if the node list is
- * null
or empty or no element is included in the list.
+ * @return The (first) element included in the node list or null
if
+ * the node list is null
or empty or no element is included
+ * in the list.
*/
public static Element getElementFromNodeList(final NodeList nl) {
if (nl == null || nl.getLength() == 0) {
@@ -1119,8 +1179,8 @@ public class DomUtils {
*
* @param parent The element to get the child elements from.
*
- * @return A list including all child elements of the given element. Maybe empty if the parent
- * element has no child elements.
+ * @return A list including all child elements of the given element. Maybe empty
+ * if the parent element has no child elements.
*/
public static List getChildElements(final Element parent) {
final Vector v = new Vector();
@@ -1153,5 +1213,4 @@ public class DomUtils {
return out.toByteArray();
}
-
}
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java
index 6139e914..5a7dadc7 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/EaafDomEntityResolver.java
@@ -17,19 +17,20 @@
* works that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
-
package at.gv.egiz.eaaf.core.impl.utils;
import java.io.InputStream;
-import at.gv.egiz.eaaf.core.api.data.XMLNamespaceConstants;
+
import org.apache.xerces.util.URI;
import org.apache.xerces.util.URI.MalformedURIException;
import org.xml.sax.EntityResolver;
import org.xml.sax.InputSource;
+import at.gv.egiz.eaaf.core.api.data.XmlNamespaceConstants;
+
/**
- * An EntityResolver
that looks up entities stored as local resources.
+ * An EntityResolver
that looks up entities stored as local
+ * resources.
*
* * The following DTDs are mapped to local resources: @@ -39,25 +40,27 @@ import org.xml.sax.InputSource; * *
* - * For all other resources, an attempt is made to resolve them as resources, either absolute or - * relative toConstants.SCHEMA_ROOT
.
+ * For all other resources, an attempt is made to resolve them as resources,
+ * either absolute or relative to Constants.SCHEMA_ROOT
.
*
*/
public class EaafDomEntityResolver implements EntityResolver {
/**
* Resolve an entity.
- *
- * The systemId
parameter is used to perform the lookup of the entity as a resource,
- * either by interpreting the systemId
as an absolute resource path, or by appending
- * the last path component of systemId
to Constants.SCHEMA_ROOT
.
- *
+ * The systemId
parameter is used to perform the lookup of the
+ * entity as a resource, either by interpreting the systemId
as an
+ * absolute resource path, or by appending the last path component of
+ * systemId
to Constants.SCHEMA_ROOT
.
+ *
InputSource
from which the entity can be read, or null
, if
- * the entity could not be found.
- * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String, java.lang.String)
+ * @return An InputSource
from which the entity can be read, or
+ * null
, if the entity could not be found.
+ * @see org.xml.sax.EntityResolver#resolveEntity(java.lang.String,
+ * java.lang.String)
*/
@Override
public InputSource resolveEntity(final String publicId, String systemId) {
@@ -68,10 +71,10 @@ public class EaafDomEntityResolver implements EntityResolver {
// check if we can resolve some standard dtd's
if (publicId.equalsIgnoreCase("-//W3C//DTD XMLSchema 200102//EN")) {
return new InputSource(
- getClass().getResourceAsStream(XMLNamespaceConstants.SCHEMA_ROOT + "XMLSchema.dtd"));
+ getClass().getResourceAsStream(XmlNamespaceConstants.SCHEMA_ROOT + "XMLSchema.dtd"));
} else if (publicId.equalsIgnoreCase("datatypes")) {
return new InputSource(
- getClass().getResourceAsStream(XMLNamespaceConstants.SCHEMA_ROOT + "datatypes.dtd"));
+ getClass().getResourceAsStream(XmlNamespaceConstants.SCHEMA_ROOT + "datatypes.dtd"));
}
} else if (systemId != null) {
// get the URI path
@@ -100,7 +103,7 @@ public class EaafDomEntityResolver implements EntityResolver {
slashPos = systemId.lastIndexOf('/');
if (slashPos >= 0 && systemId.length() > slashPos) {
systemId = systemId.substring(slashPos + 1, systemId.length());
- stream = getClass().getResourceAsStream(XMLNamespaceConstants.SCHEMA_ROOT + systemId);
+ stream = getClass().getResourceAsStream(XmlNamespaceConstants.SCHEMA_ROOT + systemId);
if (stream != null) {
final InputSource source = new InputSource(stream);
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/XPathUtils.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/XPathUtils.java
index d6745c78..3adbe3f5 100644
--- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/XPathUtils.java
+++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/utils/XPathUtils.java
@@ -17,14 +17,11 @@
* works that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
-
package at.gv.egiz.eaaf.core.impl.utils;
import java.util.List;
import java.util.Map;
-import at.gv.egiz.eaaf.core.api.data.XMLNamespaceConstants;
-import at.gv.egiz.eaaf.core.exceptions.XPathException;
+
import org.jaxen.JaxenException;
import org.jaxen.NamespaceContext;
import org.jaxen.Navigator;
@@ -37,6 +34,9 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.traversal.NodeIterator;
+import at.gv.egiz.eaaf.core.api.data.XmlNamespaceConstants;
+import at.gv.egiz.eaaf.core.exceptions.XPathException;
+
/**
* Utility methods to evaluate XPath expressions on DOM nodes.
*
@@ -46,7 +46,8 @@ import org.w3c.dom.traversal.NodeIterator;
public class XPathUtils {
/**
- * The XPath expression selecting all nodes under a given root (including the root node itself).
+ * The XPath expression selecting all nodes under a given root (including the
+ * root node itself).
*/
public static final String ALL_NODES_XPATH = "(.//. | .//@* | .//namespace::*)";
@@ -57,49 +58,50 @@ public class XPathUtils {
static {
final SimpleNamespaceContext ctx = new SimpleNamespaceContext();
- ctx.addNamespace(XMLNamespaceConstants.MOA_PREFIX, XMLNamespaceConstants.MOA_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.MOA_CONFIG_PREFIX,
- XMLNamespaceConstants.MOA_CONFIG_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.MOA_ID_CONFIG_PREFIX,
- XMLNamespaceConstants.MOA_ID_CONFIG_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.SL10_PREFIX, XMLNamespaceConstants.SL10_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.SL11_PREFIX, XMLNamespaceConstants.SL11_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.SL12_PREFIX, XMLNamespaceConstants.SL12_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.ECDSA_PREFIX, XMLNamespaceConstants.ECDSA_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.PD_PREFIX, XMLNamespaceConstants.PD_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.SAML_PREFIX, XMLNamespaceConstants.SAML_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.SAMLP_PREFIX, XMLNamespaceConstants.SAMLP_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.DSIG_PREFIX, XMLNamespaceConstants.DSIG_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.XSLT_PREFIX, XMLNamespaceConstants.XSLT_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.XSI_PREFIX, XMLNamespaceConstants.XSI_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.DSIG_FILTER2_PREFIX,
- XMLNamespaceConstants.DSIG_FILTER2_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.DSIG_EC_PREFIX, XMLNamespaceConstants.DSIG_EC_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.MD_PREFIX, XMLNamespaceConstants.MD_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.MDP_PREFIX, XMLNamespaceConstants.MDP_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.MVV_PREFIX, XMLNamespaceConstants.MVV_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.STB_PREFIX, XMLNamespaceConstants.STB_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.WRR_PREFIX, XMLNamespaceConstants.WRR_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.STORK_PREFIX, XMLNamespaceConstants.STORK_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.STORKP_PREFIX, XMLNamespaceConstants.STORKP_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.SAML2_PREFIX, XMLNamespaceConstants.SAML2_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.SAML2P_PREFIX, XMLNamespaceConstants.SAML2P_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.XENC_PREFIX, XMLNamespaceConstants.XENC_NS_URI);
- ctx.addNamespace(XMLNamespaceConstants.XADES_1_1_1_NS_PREFIX,
- XMLNamespaceConstants.XADES_1_1_1_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.MOA_PREFIX, XmlNamespaceConstants.MOA_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.MOA_CONFIG_PREFIX,
+ XmlNamespaceConstants.MOA_CONFIG_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.MOA_ID_CONFIG_PREFIX,
+ XmlNamespaceConstants.MOA_ID_CONFIG_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.SL10_PREFIX, XmlNamespaceConstants.SL10_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.SL11_PREFIX, XmlNamespaceConstants.SL11_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.SL12_PREFIX, XmlNamespaceConstants.SL12_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.ECDSA_PREFIX, XmlNamespaceConstants.ECDSA_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.PD_PREFIX, XmlNamespaceConstants.PD_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.SAML_PREFIX, XmlNamespaceConstants.SAML_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.SAMLP_PREFIX, XmlNamespaceConstants.SAMLP_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.DSIG_PREFIX, XmlNamespaceConstants.DSIG_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.XSLT_PREFIX, XmlNamespaceConstants.XSLT_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.XSI_PREFIX, XmlNamespaceConstants.XSI_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.DSIG_FILTER2_PREFIX,
+ XmlNamespaceConstants.DSIG_FILTER2_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.DSIG_EC_PREFIX, XmlNamespaceConstants.DSIG_EC_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.MD_PREFIX, XmlNamespaceConstants.MD_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.MDP_PREFIX, XmlNamespaceConstants.MDP_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.MVV_PREFIX, XmlNamespaceConstants.MVV_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.STB_PREFIX, XmlNamespaceConstants.STB_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.WRR_PREFIX, XmlNamespaceConstants.WRR_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.STORK_PREFIX, XmlNamespaceConstants.STORK_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.STORKP_PREFIX, XmlNamespaceConstants.STORKP_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.SAML2_PREFIX, XmlNamespaceConstants.SAML2_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.SAML2P_PREFIX, XmlNamespaceConstants.SAML2P_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.XENC_PREFIX, XmlNamespaceConstants.XENC_NS_URI);
+ ctx.addNamespace(XmlNamespaceConstants.XADES_1_1_1_NS_PREFIX,
+ XmlNamespaceConstants.XADES_1_1_1_NS_URI);
NS_CONTEXT = ctx;
}
/**
- * Return a NodeIterator
over the nodes matching the XPath expression.
+ * Return a NodeIterator
over the nodes matching the XPath
+ * expression.
*
- *
- * All namespace URIs and prefixes declared in the Constants
interface are used for
- * resolving namespaces.
- *
+ * All namespace URIs and prefixes declared in the Constants
+ * interface are used for resolving namespaces.
+ *
NodeIterator
over the nodes matching the XPath expression.
+ * Return a NodeIterator
over the nodes matching the XPath
+ * expression.
*
- * @param contextNode The root node from which to evaluate the XPath expression.
- * @param namespaceElement An element from which to build the namespace mapping for evaluating the
- * XPath expression
- * @param exp The XPath expression to evaluate.
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceElement An element from which to build the namespace mapping
+ * for evaluating the XPath expression
+ * @param exp The XPath expression to evaluate.
* @return An iterator over the resulting nodes.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
@@ -134,12 +138,15 @@ public class XPathUtils {
}
/**
- * Return a NodeIterator
over the nodes matching the XPath expression.
+ * Return a NodeIterator
over the nodes matching the XPath
+ * expression.
*
- * @param contextNode The root node from which to evaluate the XPath expression.
- * @param namespaceMapping A namespace prefix to namespace URI mapping (String
to
- * String
) for evaluating the XPath expression.
- * @param exp The XPath expression to evaluate.
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceMapping A namespace prefix to namespace URI mapping
+ * (String
to String
) for
+ * evaluating the XPath expression.
+ * @param exp The XPath expression to evaluate.
* @return An iterator over the resulting nodes.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
@@ -152,12 +159,14 @@ public class XPathUtils {
}
/**
- * Return a NodeIterator
over the nodes matching the XPath expression.
+ * Return a NodeIterator
over the nodes matching the XPath
+ * expression.
*
* @param contextNode The root node from which to evaluate the XPath expression.
- * @param nsContext The NamespaceContext
for resolving namespace prefixes to
- * namespace URIs for evaluating the XPath expression.
- * @param exp The XPath expression to evaluate.
+ * @param nsContext The NamespaceContext
for resolving namespace
+ * prefixes to namespace URIs for evaluating the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
* @return An iterator over the resulting nodes.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
@@ -179,13 +188,15 @@ public class XPathUtils {
}
/**
- * Return a NodeList
of all the nodes matching the XPath expression.
- *
- * All namespace URIs and prefixes declared in the Constants
interface are used for
- * resolving namespaces.
- *
NodeList
of all the nodes matching the XPath
+ * expression.
+ *
+ * All namespace URIs and prefixes declared in the Constants
+ * interface are used for resolving namespaces.
+ *
NodeList
containing the matching nodes.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
@@ -196,12 +207,14 @@ public class XPathUtils {
}
/**
- * Return a NodeList
of all the nodes matching the XPath expression.
+ * Return a NodeList
of all the nodes matching the XPath
+ * expression.
*
- * @param contextNode The root node from which to evaluate the XPath expression.
- * @param namespaceElement An element from which to build the namespace mapping for evaluating the
- * XPath expression
- * @param exp The XPath expression to evaluate.
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceElement An element from which to build the namespace mapping
+ * for evaluating the XPath expression
+ * @param exp The XPath expression to evaluate.
* @return A NodeList
containing the matching nodes.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
@@ -221,12 +234,15 @@ public class XPathUtils {
}
/**
- * Return a NodeList
of all the nodes matching the XPath expression.
+ * Return a NodeList
of all the nodes matching the XPath
+ * expression.
*
- * @param contextNode The root node from which to evaluate the XPath expression.
- * @param namespaceMapping A namespace prefix to namespace URI mapping (String
to
- * String
) for evaluating the XPath expression.
- * @param exp The XPath expression to evaluate.
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceMapping A namespace prefix to namespace URI mapping
+ * (String
to String
) for
+ * evaluating the XPath expression.
+ * @param exp The XPath expression to evaluate.
* @return A NodeList
containing the matching nodes.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
@@ -239,12 +255,14 @@ public class XPathUtils {
}
/**
- * Return a NodeList
of all the nodes matching the XPath expression.
+ * Return a NodeList
of all the nodes matching the XPath
+ * expression.
*
* @param contextNode The root node from which to evaluate the XPath expression.
- * @param nsContext The NamespaceContext
for resolving namespace prefixes to
- * namespace URIs for evaluating the XPath expression.
- * @param exp The XPath expression to evaluate.
+ * @param nsContext The NamespaceContext
for resolving namespace
+ * prefixes to namespace URIs for evaluating the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
* @return A NodeList
containing the matching nodes.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
@@ -265,14 +283,15 @@ public class XPathUtils {
/**
* Select the first node matching an XPath expression.
- *
- * All namespace URIs and prefixes declared in the Constants
interface are used for
- * resolving namespaces.
- *
+ * All namespace URIs and prefixes declared in the Constants
+ * interface are used for resolving namespaces.
+ *
null
, if no node
- * matched.
+ * @param exp The XPath expression to evaluate.
+ * @return Node The first node matching the XPath expression, or
+ * null
, if no node matched.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
public static Node selectSingleNode(final Node contextNode, final String exp)
@@ -284,12 +303,13 @@ public class XPathUtils {
/**
* Select the first node matching an XPath expression.
*
- * @param contextNode The root node from which to evaluate the XPath expression.
- * @param namespaceElement An element from which to build the namespace mapping for evaluating the
- * XPath expression
- * @param exp The XPath expression to evaluate.
- * @return Node The first node matching the XPath expression, or null
, if no node
- * matched.
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceElement An element from which to build the namespace mapping
+ * for evaluating the XPath expression
+ * @param exp The XPath expression to evaluate.
+ * @return Node The first node matching the XPath expression, or
+ * null
, if no node matched.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
public static Node selectSingleNode(final Node contextNode, final Element namespaceElement,
@@ -309,12 +329,14 @@ public class XPathUtils {
/**
* Select the first node matching an XPath expression.
*
- * @param contextNode The root node from which to evaluate the XPath expression.
- * @param namespaceMapping A namespace prefix to namespace URI mapping (String
to
- * String
) for evaluating the XPath expression.
- * @param exp The XPath expression to evaluate.
- * @return Node The first node matching the XPath expression, or null
, if no node
- * matched.
+ * @param contextNode The root node from which to evaluate the XPath
+ * expression.
+ * @param namespaceMapping A namespace prefix to namespace URI mapping
+ * (String
to String
) for
+ * evaluating the XPath expression.
+ * @param exp The XPath expression to evaluate.
+ * @return Node The first node matching the XPath expression, or
+ * null
, if no node matched.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
public static Node selectSingleNode(final Node contextNode, final Map namespaceMapping,
@@ -329,11 +351,12 @@ public class XPathUtils {
* Select the first node matching an XPath expression.
*
* @param contextNode The root node from which to evaluate the XPath expression.
- * @param nsContext The NamespaceContext
for resolving namespace prefixes to
- * namespace URIs for evaluating the XPath expression.
- * @param exp The XPath expression to evaluate.
- * @return Node The first node matching the XPath expression, or null
, if no node
- * matched.
+ * @param nsContext The NamespaceContext
for resolving namespace
+ * prefixes to namespace URIs for evaluating the XPath
+ * expression.
+ * @param exp The XPath expression to evaluate.
+ * @return Node The first node matching the XPath expression, or
+ * null
, if no node matched.
* @throws XPathException An error occurred evaluating the XPath expression.
*/
public static Node selectSingleNode(final Node contextNode, final NamespaceContext nsContext,
@@ -351,14 +374,16 @@ public class XPathUtils {
}
/**
- * Return the value of a DOM element whose location is given by an XPath expression.
+ * Return the value of a DOM element whose location is given by an XPath
+ * expression.
*
- * @param root The root element from which to evaluate the XPath.
- * @param xpath The XPath expression pointing to the element whose value to return.
- * @param def The default value to return, if no element can be found using the given
- * xpath
.
- * @return The element value, if it can be located using the xpath
. Otherwise,
- * def
is returned.
+ * @param root The root element from which to evaluate the XPath.
+ * @param xpath The XPath expression pointing to the element whose value to
+ * return.
+ * @param def The default value to return, if no element can be found using
+ * the given xpath
.
+ * @return The element value, if it can be located using the xpath
.
+ * Otherwise, def
is returned.
*/
public static String getElementValue(final Element root, final String xpath, final String def) {
@@ -367,14 +392,16 @@ public class XPathUtils {
}
/**
- * Return the value of a DOM attribute whose location is given by an XPath expression.
+ * Return the value of a DOM attribute whose location is given by an XPath
+ * expression.
*
- * @param root The root element from which to evaluate the XPath.
- * @param xpath The XPath expression pointing to the attribute whose value to return.
- * @param def The default value to return, if no attribute can be found using the given
- * xpath
.
- * @return The element value, if it can be located using the xpath
. Otherwise,
- * def
is returned.
+ * @param root The root element from which to evaluate the XPath.
+ * @param xpath The XPath expression pointing to the attribute whose value to
+ * return.
+ * @param def The default value to return, if no attribute can be found using
+ * the given xpath
.
+ * @return The element value, if it can be located using the xpath
.
+ * Otherwise, def
is returned.
*/
public static String getAttributeValue(final Element root, final String xpath, final String def) {
@@ -383,31 +410,36 @@ public class XPathUtils {
}
/**
- * Returns the namespace prefix used within XPathUtils
for referring to the namespace
- * of the specified (Security Layer command) element.
- *
- * This namespace prefix can be used in various XPath expression evaluation methods within
- * XPathUtils
without explicitely binding it to the particular namespace.
- *
XPathUtils
for
+ * referring to the namespace of the specified (Security Layer command) element.
+ *
+ * This namespace prefix can be used in various XPath expression evaluation
+ * methods within XPathUtils
without explicitely binding it to the
+ * particular namespace.
+ *
XPathUtils
for referring to the namespace
- * of the specified (Security Layer command) element.
+ * @return the namespace prefix used within XPathUtils
for
+ * referring to the namespace of the specified (Security Layer command)
+ * element.
*
- * throws XpathException If the specified element has a namespace other than the ones
- * known by this implementation as valid Security Layer namespaces (cf.
- * @link Constants#SL10_NS_URI, @link Constants#SL11_NS_URI, @link Constants#SL12_NS_URI).
+ * throws XpathException If the specified element has a namespace other
+ * than the ones known by this implementation as valid Security Layer
+ * namespaces (cf.
+ * @link Constants#SL10_NS_URI, @link Constants#SL11_NS_URI, @link
+ * Constants#SL12_NS_URI).
*/
public static String getSlPrefix(final Element contextElement) throws XPathException {
final String sLNamespace = contextElement.getNamespaceURI();
String slPrefix = null;
- if (sLNamespace.equals(XMLNamespaceConstants.SL10_NS_URI)) {
- slPrefix = XMLNamespaceConstants.SL10_PREFIX;
- } else if (sLNamespace.equals(XMLNamespaceConstants.SL12_NS_URI)) {
- slPrefix = XMLNamespaceConstants.SL12_PREFIX;
- } else if (sLNamespace.equals(XMLNamespaceConstants.SL11_NS_URI)) {
- slPrefix = XMLNamespaceConstants.SL11_PREFIX;
+ if (sLNamespace.equals(XmlNamespaceConstants.SL10_NS_URI)) {
+ slPrefix = XmlNamespaceConstants.SL10_PREFIX;
+ } else if (sLNamespace.equals(XmlNamespaceConstants.SL12_NS_URI)) {
+ slPrefix = XmlNamespaceConstants.SL12_PREFIX;
+ } else if (sLNamespace.equals(XmlNamespaceConstants.SL11_NS_URI)) {
+ slPrefix = XmlNamespaceConstants.SL11_PREFIX;
} else {
throw new XPathException("XPath operation FAILED. Reason: ");
}
@@ -415,36 +447,38 @@ public class XPathUtils {
return slPrefix;
}
-
/**
- * Return the SecurityLayer namespace prefix of the context element. If the context element is not
- * the element that lies within the SecurityLayer namespace. The Securitylayer namespace is
- * derived from the xmlns:sl10
, sl11
or sl
attribute of the
- * context element.
- *
+ * Return the SecurityLayer namespace prefix of the context element. If the
+ * context element is not the element that lies within the SecurityLayer
+ * namespace. The Securitylayer namespace is derived from the
+ * xmlns:sl10
, sl11
or sl
attribute of
+ * the context element.
+ *
* The returned prefix is needed for evaluating XPATH expressions. - *
- * @param contextElement The element to get a prefix for the Securitylayer namespace, that is used - * within the corresponding document. + * + * + * @param contextElement The element to get a prefix for the Securitylayer + * namespace, that is used within the corresponding + * document. * - * @return The stringsl10
, sl11
or sl
, depending on the
- * SecurityLayer namespace of the contextElement.
+ * @return The string sl10
, sl11
or sl
,
+ * depending on the SecurityLayer namespace of the contextElement.
*
- * throws XPathException If no (vlalid) SecurityLayer namespace prefix or namespace is
- * defined.
+ * throws XPathException If no (vlalid) SecurityLayer namespace prefix
+ * or namespace is defined.
*/
public static String getSlPrefixFromNoRoot(final Element contextElement) throws XPathException {
- String slPrefix = checkSLnsDeclaration(contextElement, XMLNamespaceConstants.SL10_PREFIX,
- XMLNamespaceConstants.SL10_NS_URI);
+ String slPrefix = checkSLnsDeclaration(contextElement, XmlNamespaceConstants.SL10_PREFIX,
+ XmlNamespaceConstants.SL10_NS_URI);
if (slPrefix == null) {
- slPrefix = checkSLnsDeclaration(contextElement, XMLNamespaceConstants.SL11_PREFIX,
- XMLNamespaceConstants.SL11_NS_URI);
+ slPrefix = checkSLnsDeclaration(contextElement, XmlNamespaceConstants.SL11_PREFIX,
+ XmlNamespaceConstants.SL11_NS_URI);
}
if (slPrefix == null) {
- slPrefix = checkSLnsDeclaration(contextElement, XMLNamespaceConstants.SL12_PREFIX,
- XMLNamespaceConstants.SL12_NS_URI);
+ slPrefix = checkSLnsDeclaration(contextElement, XmlNamespaceConstants.SL12_PREFIX,
+ XmlNamespaceConstants.SL12_NS_URI);
}
return slPrefix;
@@ -452,15 +486,18 @@ public class XPathUtils {
}
/**
- * Checks if the context element has an attribute xmlns:slPrefix
and if the prefix of
- * that attribute corresponds with a valid SecurityLayer namespace.
+ * Checks if the context element has an attribute xmlns:slPrefix
+ * and if the prefix of that attribute corresponds with a valid SecurityLayer
+ * namespace.
*
* @param contextElement The element to be checked.
- * @param slPrefix The prefix which should be checked. Must be a valid SecurityLayer namespace
- * prefix.
- * @param slNameSpace The SecurityLayer namespace that corresponds to the specified prefix.
+ * @param slPrefix The prefix which should be checked. Must be a valid
+ * SecurityLayer namespace prefix.
+ * @param slNameSpace The SecurityLayer namespace that corresponds to the
+ * specified prefix.
*
- * @return The valid SecurityLayer prefix or null
if this prefix is not used.
+ * @return The valid SecurityLayer prefix or null
if this prefix is
+ * not used.
* @throws XPathException In case of an error
*/
private static String checkSLnsDeclaration(final Element contextElement, final String slPrefix,
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/AuthenticationDataBuilderTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/AuthenticationDataBuilderTest.java
index b91eaf21..072dbb95 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/AuthenticationDataBuilderTest.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/AuthenticationDataBuilderTest.java
@@ -3,12 +3,7 @@ package at.gv.egiz.eaaf.core.impl.idp.auth;
import java.io.ByteArrayInputStream;
import java.util.HashMap;
import java.util.Map;
-import at.gv.egiz.eaaf.core.api.idp.IAuthData;
-import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper;
-import at.gv.egiz.eaaf.core.impl.idp.auth.data.SimpleIdentityLinkAssertionParser;
-import at.gv.egiz.eaaf.core.impl.idp.module.test.DummyConfiguration;
-import at.gv.egiz.eaaf.core.impl.idp.module.test.DummySpConfiguration;
-import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl;
+
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
@@ -16,6 +11,13 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.util.Base64Utils;
+import at.gv.egiz.eaaf.core.api.idp.IAuthData;
+import at.gv.egiz.eaaf.core.impl.idp.auth.data.AuthProcessDataWrapper;
+import at.gv.egiz.eaaf.core.impl.idp.auth.data.SimpleIdentityLinkAssertionParser;
+import at.gv.egiz.eaaf.core.impl.idp.module.test.DummyConfiguration;
+import at.gv.egiz.eaaf.core.impl.idp.module.test.DummySpConfiguration;
+import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl;
+
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/SpringTest-context_eaaf_core.xml")
public class AuthenticationDataBuilderTest {
@@ -27,115 +29,112 @@ public class AuthenticationDataBuilderTest {
public static final String DUMMY_IDL_2 =
"PHNhbWw6QXNzZXJ0aW9uIEFzc2VydGlvbklEPSJlbGdhdGVzdC5lZ2l6Lmd2LmF0LUFzc2VydGlvbklEWFhYxZB6Z8O8"
- + "cl9YWFhUw7x6ZWvDp2kiIElzc3VlSW5zdGFudD0iMjAxOS0wMy0wNFQxNTo1MzowNCswMTowMCIgSXNzdWVyPSJodH"
- + "RwOi8vcG9ydGFsLmJtaS5ndi5hdC9yZWYvc3pyL2lzc3VlciIgTWFqb3JWZXJzaW9uPSIxIiBNaW5vclZlcnNpb249"
- + "IjAiIHhtbG5zOmRzaWc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiIHhtbG5zOmVjZHNhPSJodH"
- + "RwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSMiIHhtbG5zOnByPSJodHRwOi8vcmVmZXJlbmNlLmUt"
- + "Z292ZXJubWVudC5ndi5hdC9uYW1lc3BhY2UvcGVyc29uZGF0YS8yMDAyMDIyOCMiIHhtbG5zOnNhbWw9InVybjpvYX"
- + "NpczpuYW1lczp0YzpTQU1MOjEuMDphc3NlcnRpb24iIHhtbG5zOnNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hN"
- + "TFNjaGVtYS1pbnN0YW5jZSI+Cgk8c2FtbDpBdHRyaWJ1dGVTdGF0ZW1lbnQ+CgkJPHNhbWw6U3ViamVjdD4KCQkJPH"
- + "NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj4KCQkJCTxzYW1sOkNvbmZpcm1hdGlvbk1ldGhvZD51cm46b2FzaXM6bmFt"
- + "ZXM6dGM6U0FNTDoxLjA6Y206c2VuZGVyLXZvdWNoZXM8L3NhbWw6Q29uZmlybWF0aW9uTWV0aG9kPgoJCQkJPHNhbW"
- + "w6U3ViamVjdENvbmZpcm1hdGlvbkRhdGE+CgkJCQkJPHByOlBlcnNvbiBzaTp0eXBlPSJwcjpQaHlzaWNhbFBlcnNv"
- + "blR5cGUiPjxwcjpJZGVudGlmaWNhdGlvbj48cHI6VmFsdWU+UlV4SFFWUmxjM1JRUWpCWVdGakZrSHBudzd4eVgxaF"
- + "lXRlREdkhwbGE4T25hUT09PC9wcjpWYWx1ZT48cHI6VHlwZT51cm46cHVibGljaWQ6Z3YuYXQ6YmFzZWlkPC9wcjpU"
- + "eXBlPjwvcHI6SWRlbnRpZmljYXRpb24+PHByOk5hbWU+PHByOkdpdmVuTmFtZT5YWFjFkHonZ8O8cjwvcHI6R2l2ZW"
- + "5OYW1lPjxwcjpGYW1pbHlOYW1lIHByaW1hcnk9InVuZGVmaW5lZCI+WFhYVMO8emVrw6dpPC9wcjpGYW1pbHlOYW1l"
- + "PjwvcHI6TmFtZT48cHI6RGF0ZU9mQmlydGg+MTk3My0wNi0wNDwvcHI6RGF0ZU9mQmlydGg+PC9wcjpQZXJzb24+Cg"
- + "kJCQk8L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbkRhdGE+CgkJCTwvc2FtbDpTdWJqZWN0Q29uZmlybWF0aW9uPgoJ"
- + "CTwvc2FtbDpTdWJqZWN0PgoJCTxzYW1sOkF0dHJpYnV0ZSBBdHRyaWJ1dGVOYW1lPSJDaXRpemVuUHVibGljS2V5Ii"
- + "BBdHRyaWJ1dGVOYW1lc3BhY2U9InVybjpwdWJsaWNpZDpndi5hdDpuYW1lc3BhY2VzOmlkZW50aXR5bGluazoxLjIi"
- + "PjxzYW1sOkF0dHJpYnV0ZVZhbHVlPjxkc2lnOlJTQUtleVZhbHVlPjxkc2lnOk1vZHVsdXM+L1VLUkZIYkFhRWtnVm"
- + "RnTTFTRE9KaldIcUszN3JKWVN0UHF0VVh6bzlWTm9yTzgzWW95emE5YjBkcDdtdVM4b2paMjRZRVBMUUZ3WQpCSVpk"
- + "bTROSHJBNXZsVlZrRGV1Qng2bVRwRXBldTdkMkUzd3VZbVFXTjQxUXhWajZPcFhvSHRzek9jajd1Rm9mem1SR09PVU"
- + "IzNUxDCkg2QzBMTFpJNTU5a3BPbmFxa2RLbU83dnduYVE0eTEwcHpCdjJ3U3BTZnY0djlIV3NCYUYxUWtYNmlmQ3lB"
- + "bklLS3FKczR6S1RuK2EKR0kvS0FKOXdoam9GQk9yd1MzTlFpK1ZSVGxPYTdKdHdxeHBJZUYrT3c0R2wzaWdVb2szaG"
- + "tsYlUyeElYcG5VeXNQYWhqUTBMNm5ORApZVHVmUC9jRmxrNWkvR1BZdmtONjJHd0Z4Rko1bDBoL1A3QWtJaCtWZmRC"
- + "L0Q3SFVYaC9PV2dmek9MK2ZFRGdiL1dHM1BNenlObVFNCm5QQkdQb21hdGFOREtla0hhNUYwOUxFUHR5L0ZwMDUxLz"
- + "FEUTZUMXhzamZ5ZG11aVZsWDZIRUZqZjFkYmQ4cUtGRm5TQ3NxRHBQdUQKR0hNcStKS0lmN25HQWtYSWxraTA1Nzd1"
- + "bzM0MmxaeHBUVlRGVkFGdkJHS0Z6azNlQzMyT0NwOUo8L2RzaWc6TW9kdWx1cz48ZHNpZzpFeHBvbmVudD5BUUFCPC"
- + "9kc2lnOkV4cG9uZW50PjwvZHNpZzpSU0FLZXlWYWx1ZT48L3NhbWw6QXR0cmlidXRlVmFsdWU+PC9zYW1sOkF0dHJp"
- + "YnV0ZT48c2FtbDpBdHRyaWJ1dGUgQXR0cmlidXRlTmFtZT0iQ2l0aXplblB1YmxpY0tleSIgQXR0cmlidXRlTmFtZX"
- + "NwYWNlPSJ1cm46cHVibGljaWQ6Z3YuYXQ6bmFtZXNwYWNlczppZGVudGl0eWxpbms6MS4yIj48c2FtbDpBdHRyaWJ1"
- + "dGVWYWx1ZT48ZHNpZzpSU0FLZXlWYWx1ZT48ZHNpZzpNb2R1bHVzPnlQWGJhcEZhYXBycWlmVXVJaUxzR0FMaVdTTG"
- + "RsUGNRN0VGZGZ5UzM0RVNJNGEyQnMwbUxTbm5FY1djeHJjWlgzcmxJUXBKaklwb1UKQStSRG9sNVBrU3BoSENMNkl2"
- + "SVFNZmtreEg1Z0s2akN6VFNWOVJFVm1xUlRFMXNxUmNCUUduRFlwMjZwSFFoYzBHSG13NnVqeCtQTwp1dlE2Mm9hUU"
- + "lxUXZ0T2ZLWFBReXlXTDE5clhXOTcrRUcweTBLd2VpOHRWY01uamJ5ZEtNL3Z5d01Fb3FFcU1mMEYrR0tjd3A3ZW50"
- + "ClpzcnVEVEgrY0tJYnBXdUpLZzAwVUhraG45QWZkYlBXdzZWOWUrQmhxU0lYcTBoaEhmSkNBdzZwWXVYaVY2dE9ESl"
- + "BGdnUxN1diQnQKV3B1ejJOR1RMU3Y3NXJlaklCa09TMk5MS0FmV3JhVmhUaDY3Vnc9PTwvZHNpZzpNb2R1bHVzPjxk"
- + "c2lnOkV4cG9uZW50PkFRQUI8L2RzaWc6RXhwb25lbnQ+PC9kc2lnOlJTQUtleVZhbHVlPjwvc2FtbDpBdHRyaWJ1dG"
- + "VWYWx1ZT48L3NhbWw6QXR0cmlidXRlPgoJPC9zYW1sOkF0dHJpYnV0ZVN0YXRlbWVudD4KPGRzaWc6U2lnbmF0dXJl"
- + "IHhtbG5zOmRzaWc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPjxkc2lnOlNpZ25lZEluZm8+PG"
- + "RzaWc6Q2Fub25pY2FsaXphdGlvbk1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMTAveG1s"
- + "LWV4Yy1jMTRuIyIvPjxkc2lnOlNpZ25hdHVyZU1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMD"
- + "AvMDkveG1sZHNpZyNyc2Etc2hhMSIvPjxkc2lnOlJlZmVyZW5jZSBVUkk9IiI+PGRzaWc6VHJhbnNmb3Jtcz48ZHNp"
- + "ZzpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14cGF0aC0xOTk5MTExNi"
- + "I+PGRzaWc6WFBhdGg+bm90KGFuY2VzdG9yLW9yLXNlbGY6OnByOklkZW50aWZpY2F0aW9uKTwvZHNpZzpYUGF0aD48"
- + "L2RzaWc6VHJhbnNmb3JtPjxkc2lnOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMD"
- + "kveG1sZHNpZyNlbnZlbG9wZWQtc2lnbmF0dXJlIi8+PC9kc2lnOlRyYW5zZm9ybXM+PGRzaWc6RGlnZXN0TWV0aG9k"
- + "IEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI3NoYTEiLz48ZHNpZzpEaWdlc3RWYW"
- + "x1ZT43TmZyRUJKZGw4NTRyZG1BaDFjdFEyWDdXTWM9PC9kc2lnOkRpZ2VzdFZhbHVlPjwvZHNpZzpSZWZlcmVuY2U+"
- + "PGRzaWc6UmVmZXJlbmNlIFR5cGU9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNNYW5pZmVzdCIgVV"
- + "JJPSIjbWFuaWZlc3QiPjxkc2lnOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAv"
- + "MDkveG1sZHNpZyNzaGExIi8+PGRzaWc6RGlnZXN0VmFsdWU+aGZnOHphM21ZcXU1UVNiVXpYSHhEZTUvU05FPTwvZH"
- + "NpZzpEaWdlc3RWYWx1ZT48L2RzaWc6UmVmZXJlbmNlPjwvZHNpZzpTaWduZWRJbmZvPjxkc2lnOlNpZ25hdHVyZVZh"
- + "bHVlPm11V2IzOVRhZ0NkM053V2N1NWlrRUp1SnBaZG5lZFJEY2RtMTdJWnYrT0VWRXRxeWxSdXIvd1g2QUdVQ1UvUF"
- + "UKWm5DdWROR1ZwQ0hMWXpIaXBONWM4b2JtbmhsbElOb1NFTk81b3Y1amlNb05Lb2RBZXhKSU42bVpPREJkL1RtVApt"
- + "NzBWaVd5ckdVTGJJWWwvd2hsdjFsZ2EzSjhjeDhLU29QejhTd05MMnF3VWoydG8vQWhnNGtjSmxxT3MyNVlNCk5YL3"
- + "dhSW53NkRSN05HQ0pvRStaWlNwcEh3d1FtNnYrOUhZOUU4NnNlQkFBUHhJOU0xako0WldiMzI5akZ0aUEKcXZiOHM2"
- + "anhyMmxsOHVWYWdxWENZaFg5K1dOUXdheXFZTCtPdzhPcGxVem9OMVRpS2hSbVFLWkl3S1lDMVo4eQpLK3ZqQWxRTz"
- + "JhT05zNEhVaG9SNmQyNmUvTVUxZmJlWEhxVHpyZmI5R1hXSHl0dFRkanhiemtaQTFGODJsUUZvCjUrVnpjTUhRUmc3"
- + "c0RKODY1Wk1zM3BwY2VoLzlaU2ZvT2Y1SFlEUFl1V2VjT0RpZ1pRWVh0TVlwdVBRVGsrQ20KczlaSkd6QlYybGVtZk"
- + "5DOVFVNzh0Zm42cDFVWnJTTG5zWGFYbVVjOEVjNTNQaUhBT3Z6blh0QjVjRW5hV2daMgp1TGVGOEtTUmw2SjBlTlE5"
- + "SkRQZ1NOMHNmYWxiVkNkaENUTlFtclJ0T2pVZjNlN3UzeElNelJ1Zm4wb2o2SHRwCnQzaEVESFhuSS9kTk1scHBSSX"
- + "l4cGQxbFo5bXJYZklLcnJMZVdxdGd3cFB1OTRoVUhRL2VKejFrMy9IM0h6M2QKWkR4dkFFYzNTRERkb1FXeS9HUGZp"
- + "cXNwRWZjbGd0SkNKQ2E4L2t2dTdSVT08L2RzaWc6U2lnbmF0dXJlVmFsdWU+PGRzaWc6S2V5SW5mbz48ZHNpZzpYNT"
- + "A5RGF0YT48ZHNpZzpYNTA5Q2VydGlmaWNhdGU+TUlJRlpEQ0NBMHlnQXdJQkFnSUpBSmF2K3plcVUvRE1NQTBHQ1Nx"
- + "R1NJYjNEUUVCQ3dVQU1Gd3hDekFKQmdOVgpCQVlUQWtGVU1RMHdDd1lEVlFRS0V3UkZSMGxhTVJZd0ZBWURWUVFMRX"
- + "cxVGIyWjBkMkZ5WlVOaGNtUnpNU1l3CkpBWURWUVFERkIxVVpYTjBYMU52Wm5SM1lYSmxZMkZ5WkhOZlNVUk1YMU5w"
- + "WjI1bGNqQWVGdzB4TmpFd01UZ3gKTURNNU1EZGFGdzB4T1RBM01UUXhNRE01TURkYU1Gd3hDekFKQmdOVkJBWVRBa0"
- + "ZVTVEwd0N3WURWUVFLRXdSRgpSMGxhTVJZd0ZBWURWUVFMRXcxVGIyWjBkMkZ5WlVOaGNtUnpNU1l3SkFZRFZRUURG"
- + "QjFVWlhOMFgxTnZablIzCllYSmxZMkZ5WkhOZlNVUk1YMU5wWjI1bGNqQ0NBaUl3RFFZSktvWklodmNOQVFFQkJRQU"
- + "RnZ0lQQURDQ0Fnb0MKZ2dJQkFMa0xndCtNRlR4TGZSemNFSVowYnljSUZnN2cvSFBON1FXSVo2N2JIenJiNmVoZWJ6"
- + "RjlWaW56RFpYQwprZktXZFVKYmtOU3VXS1dycDJYNjJmN29HaGRxSzB5RmMrRGxvK09wSURnUWlXQ3BCZktKbzhjUF"
- + "dzaUFtTnVUCnhXVmFnVTVmYUkxaDd4dnZPVk15YldlOTJuaXZmcUxPdUV4Nld2WC9Vb0lhd1JIVjJWbVBHRmdab2NN"
- + "NUcwWDYKYlVWRXBxeEFhM3FPSWxScjBwb0IrUkEwUEE4NmhScFJZYWwvT3I5M0Q4QmZRSDVsOHpWOVFjdlBlL0tlSl"
- + "NwSgpIZ0dXbUVzNTkzTHROdUExUnYxaURwdXUxMHk3QzJGZU1CdmNVcFJrUjdXQWo3dklZVnRRSUxYQ2gxRmhmTjFi"
- + "CkhnNnhMVlR5c2hsZ1VuN0FSUUpZb0ozdG9nZEdhbURSbG5LVTJyWE45ajg4VHc2ZkFkY0N2V2JXVnRqeThwTmoKV0"
- + "xrVkpNbEZXZGZPNi81TEF2YTFIeFJPTWhGeDdRT1BoT3plbWV0Q3RUMmZJNEZUQWs5VnlmOXdUVVFPTDhzcQpLNzN0"
- + "MUE0MTlsWVM4V3VVQ3pIRHhMdWpMaVR1d29JVWd6TU4vYnFNRVpyb2dQTFkyS2o0dm1aTVo0Z1UyUFU3Cll3K1hmYW"
- + "5nMysveUsxZ1lORWVicGR2UGk4U1ZVQW51cy9DZm1kd2RuOU8vbmFXaUJwamMwNkdKdk1iZWdqeHcKb1BCTTVjMFNr"
- + "Q1I1eENheWdaTDJPQnBSTUtnZGZyazRrMHBqNVpVbSttdHJPR29qdFJaSkVaUUNCcFZQazF5RAozTDQvWjRBWm9mT2"
- + "84ZFNrVVIreEpOMG9LbklkZm5kdkJ4TkY0c3hZNEl3T3ZGUnJBZ01CQUFHaktUQW5NQWtHCkExVWRFd1FDTUFBd0N3"
- + "WURWUjBQQkFRREFnV2dNQTBHQnlvb0FBb0JCd0VFQWdVQU1BMEdDU3FHU0liM0RRRUIKQ3dVQUE0SUNBUUJjRUQ3dE"
- + "U4cW1Bd0ZCZGh5b3oxRDh5b2RFWm1tZFhad2tzQS9rSStvKzV3UXM2WS9xdnc3agorZUJ2bGN0eVhDWFdoMWVGZWIv"
- + "RmFpQTVDcG9hazhOYy9vWTdUL3lCajVnZktIbE5xVlQxb3dhQmtIc0VZTUJ2CmFVWHh5RENibkZNem5KZmt4amJ2Rm"
- + "JRZGQxaGNlSmh0OER4K2lrcEI2TUpIcUhJRXJ5MFdXZ2YzSmRONVBFcnIKQVRuZGpCRTRCYVRaMnE2c0N2K1NkSzYw"
- + "TWswbVlBNmw2blNDOWVCOEc5QzRiQTFjUUVPdTYrRlBtRnpTa2lJRgp0ZW1BMXRqUW5oeEtaWmlnenhJTjNFUUFucS"
- + "8yM2pmK0NreEF0NUdrcFVqcUY1YnFLSTFuZXJKT2duNEptNWo2CnNQWkdwR2xsekhMQmF5YmZZNjNBejRzRVJDMjhP"
- + "bHFGdzF2eFFzNGhXSVdOV0VBTUYzT3o0K3BZZzRPSUloNUMKTnIxYXFKZ3NzV2ZPWnJYMktTejJ2cXJab1U2N3pxOD"
- + "RNUWNKVFNtZ0tWQmI5T25yQzV0WW41WVZVbHlkUFBqcgpVbTBpSGxXQzBNRmlJZ1N6eDZUaTJIblBnYzBVSHNBNklw"
- + "U1RvK1V1ZllZTkRpRkNzc1JidTRyMC9TeXE0TVAzCmdoWVhkUDlUajBGSVN6MlR2TTZZUWZ6SGVqOTRiWmNWTnduRj"
- + "RwV0VuR1p0QmJOVnZKUnc5aUpISGtEV0xpWU0KMUI3M3pzNytwQThZZ0txRXhESFhjMVNob3U1SHZTdVRYU21hVE1V"
- + "SHJDa2hvdEhmcHFZaHJKaUFtSitPZnROdgo2b3hNUGZOaFpnMDFlT290bTFKK1dWMm1KYmdjUFROU0MxT05jU0ZkUT"
- + "V2WlpMTDI0SjJIY3c9PTwvZHNpZzpYNTA5Q2VydGlmaWNhdGU+PC9kc2lnOlg1MDlEYXRhPjwvZHNpZzpLZXlJbmZv"
- + "Pjxkc2lnOk9iamVjdD48ZHNpZzpNYW5pZmVzdCBJZD0ibWFuaWZlc3QiPjxkc2lnOlJlZmVyZW5jZSBVUkk9IiI+PG"
- + "RzaWc6VHJhbnNmb3Jtcz48ZHNpZzpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5"
- + "L1JFQy14cGF0aC0xOTk5MTExNiI+PGRzaWc6WFBhdGggeG1sbnM6ZHNpZz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC"
- + "8wOS94bWxkc2lnIyI+bm90KGFuY2VzdG9yLW9yLXNlbGY6OmRzaWc6U2lnbmF0dXJlKTwvZHNpZzpYUGF0aD48L2Rz"
- + "aWc6VHJhbnNmb3JtPjwvZHNpZzpUcmFuc2Zvcm1zPjxkc2lnOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly"
- + "93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNzaGExIi8+PGRzaWc6RGlnZXN0VmFsdWU+QXN4VHprWmRBWUM0U0s1"
- + "cTh5c0pLVDd5ZHVRPTwvZHNpZzpEaWdlc3RWYWx1ZT48L2RzaWc6UmVmZXJlbmNlPjwvZHNpZzpNYW5pZmVzdD48L2"
- + "RzaWc6T2JqZWN0PjwvZHNpZzpTaWduYXR1cmU+PC9zYW1sOkFzc2VydGlvbj4=";
+ + "cl9YWFhUw7x6ZWvDp2kiIElzc3VlSW5zdGFudD0iMjAxOS0wMy0wNFQxNTo1MzowNCswMTowMCIgSXNzdWVyPSJodH"
+ + "RwOi8vcG9ydGFsLmJtaS5ndi5hdC9yZWYvc3pyL2lzc3VlciIgTWFqb3JWZXJzaW9uPSIxIiBNaW5vclZlcnNpb249"
+ + "IjAiIHhtbG5zOmRzaWc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiIHhtbG5zOmVjZHNhPSJodH"
+ + "RwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSMiIHhtbG5zOnByPSJodHRwOi8vcmVmZXJlbmNlLmUt"
+ + "Z292ZXJubWVudC5ndi5hdC9uYW1lc3BhY2UvcGVyc29uZGF0YS8yMDAyMDIyOCMiIHhtbG5zOnNhbWw9InVybjpvYX"
+ + "NpczpuYW1lczp0YzpTQU1MOjEuMDphc3NlcnRpb24iIHhtbG5zOnNpPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxL1hN"
+ + "TFNjaGVtYS1pbnN0YW5jZSI+Cgk8c2FtbDpBdHRyaWJ1dGVTdGF0ZW1lbnQ+CgkJPHNhbWw6U3ViamVjdD4KCQkJPH"
+ + "NhbWw6U3ViamVjdENvbmZpcm1hdGlvbj4KCQkJCTxzYW1sOkNvbmZpcm1hdGlvbk1ldGhvZD51cm46b2FzaXM6bmFt"
+ + "ZXM6dGM6U0FNTDoxLjA6Y206c2VuZGVyLXZvdWNoZXM8L3NhbWw6Q29uZmlybWF0aW9uTWV0aG9kPgoJCQkJPHNhbW"
+ + "w6U3ViamVjdENvbmZpcm1hdGlvbkRhdGE+CgkJCQkJPHByOlBlcnNvbiBzaTp0eXBlPSJwcjpQaHlzaWNhbFBlcnNv"
+ + "blR5cGUiPjxwcjpJZGVudGlmaWNhdGlvbj48cHI6VmFsdWU+UlV4SFFWUmxjM1JRUWpCWVdGakZrSHBudzd4eVgxaF"
+ + "lXRlREdkhwbGE4T25hUT09PC9wcjpWYWx1ZT48cHI6VHlwZT51cm46cHVibGljaWQ6Z3YuYXQ6YmFzZWlkPC9wcjpU"
+ + "eXBlPjwvcHI6SWRlbnRpZmljYXRpb24+PHByOk5hbWU+PHByOkdpdmVuTmFtZT5YWFjFkHonZ8O8cjwvcHI6R2l2ZW"
+ + "5OYW1lPjxwcjpGYW1pbHlOYW1lIHByaW1hcnk9InVuZGVmaW5lZCI+WFhYVMO8emVrw6dpPC9wcjpGYW1pbHlOYW1l"
+ + "PjwvcHI6TmFtZT48cHI6RGF0ZU9mQmlydGg+MTk3My0wNi0wNDwvcHI6RGF0ZU9mQmlydGg+PC9wcjpQZXJzb24+Cg"
+ + "kJCQk8L3NhbWw6U3ViamVjdENvbmZpcm1hdGlvbkRhdGE+CgkJCTwvc2FtbDpTdWJqZWN0Q29uZmlybWF0aW9uPgoJ"
+ + "CTwvc2FtbDpTdWJqZWN0PgoJCTxzYW1sOkF0dHJpYnV0ZSBBdHRyaWJ1dGVOYW1lPSJDaXRpemVuUHVibGljS2V5Ii"
+ + "BBdHRyaWJ1dGVOYW1lc3BhY2U9InVybjpwdWJsaWNpZDpndi5hdDpuYW1lc3BhY2VzOmlkZW50aXR5bGluazoxLjIi"
+ + "PjxzYW1sOkF0dHJpYnV0ZVZhbHVlPjxkc2lnOlJTQUtleVZhbHVlPjxkc2lnOk1vZHVsdXM+L1VLUkZIYkFhRWtnVm"
+ + "RnTTFTRE9KaldIcUszN3JKWVN0UHF0VVh6bzlWTm9yTzgzWW95emE5YjBkcDdtdVM4b2paMjRZRVBMUUZ3WQpCSVpk"
+ + "bTROSHJBNXZsVlZrRGV1Qng2bVRwRXBldTdkMkUzd3VZbVFXTjQxUXhWajZPcFhvSHRzek9jajd1Rm9mem1SR09PVU"
+ + "IzNUxDCkg2QzBMTFpJNTU5a3BPbmFxa2RLbU83dnduYVE0eTEwcHpCdjJ3U3BTZnY0djlIV3NCYUYxUWtYNmlmQ3lB"
+ + "bklLS3FKczR6S1RuK2EKR0kvS0FKOXdoam9GQk9yd1MzTlFpK1ZSVGxPYTdKdHdxeHBJZUYrT3c0R2wzaWdVb2szaG"
+ + "tsYlUyeElYcG5VeXNQYWhqUTBMNm5ORApZVHVmUC9jRmxrNWkvR1BZdmtONjJHd0Z4Rko1bDBoL1A3QWtJaCtWZmRC"
+ + "L0Q3SFVYaC9PV2dmek9MK2ZFRGdiL1dHM1BNenlObVFNCm5QQkdQb21hdGFOREtla0hhNUYwOUxFUHR5L0ZwMDUxLz"
+ + "FEUTZUMXhzamZ5ZG11aVZsWDZIRUZqZjFkYmQ4cUtGRm5TQ3NxRHBQdUQKR0hNcStKS0lmN25HQWtYSWxraTA1Nzd1"
+ + "bzM0MmxaeHBUVlRGVkFGdkJHS0Z6azNlQzMyT0NwOUo8L2RzaWc6TW9kdWx1cz48ZHNpZzpFeHBvbmVudD5BUUFCPC"
+ + "9kc2lnOkV4cG9uZW50PjwvZHNpZzpSU0FLZXlWYWx1ZT48L3NhbWw6QXR0cmlidXRlVmFsdWU+PC9zYW1sOkF0dHJp"
+ + "YnV0ZT48c2FtbDpBdHRyaWJ1dGUgQXR0cmlidXRlTmFtZT0iQ2l0aXplblB1YmxpY0tleSIgQXR0cmlidXRlTmFtZX"
+ + "NwYWNlPSJ1cm46cHVibGljaWQ6Z3YuYXQ6bmFtZXNwYWNlczppZGVudGl0eWxpbms6MS4yIj48c2FtbDpBdHRyaWJ1"
+ + "dGVWYWx1ZT48ZHNpZzpSU0FLZXlWYWx1ZT48ZHNpZzpNb2R1bHVzPnlQWGJhcEZhYXBycWlmVXVJaUxzR0FMaVdTTG"
+ + "RsUGNRN0VGZGZ5UzM0RVNJNGEyQnMwbUxTbm5FY1djeHJjWlgzcmxJUXBKaklwb1UKQStSRG9sNVBrU3BoSENMNkl2"
+ + "SVFNZmtreEg1Z0s2akN6VFNWOVJFVm1xUlRFMXNxUmNCUUduRFlwMjZwSFFoYzBHSG13NnVqeCtQTwp1dlE2Mm9hUU"
+ + "lxUXZ0T2ZLWFBReXlXTDE5clhXOTcrRUcweTBLd2VpOHRWY01uamJ5ZEtNL3Z5d01Fb3FFcU1mMEYrR0tjd3A3ZW50"
+ + "ClpzcnVEVEgrY0tJYnBXdUpLZzAwVUhraG45QWZkYlBXdzZWOWUrQmhxU0lYcTBoaEhmSkNBdzZwWXVYaVY2dE9ESl"
+ + "BGdnUxN1diQnQKV3B1ejJOR1RMU3Y3NXJlaklCa09TMk5MS0FmV3JhVmhUaDY3Vnc9PTwvZHNpZzpNb2R1bHVzPjxk"
+ + "c2lnOkV4cG9uZW50PkFRQUI8L2RzaWc6RXhwb25lbnQ+PC9kc2lnOlJTQUtleVZhbHVlPjwvc2FtbDpBdHRyaWJ1dG"
+ + "VWYWx1ZT48L3NhbWw6QXR0cmlidXRlPgoJPC9zYW1sOkF0dHJpYnV0ZVN0YXRlbWVudD4KPGRzaWc6U2lnbmF0dXJl"
+ + "IHhtbG5zOmRzaWc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyMiPjxkc2lnOlNpZ25lZEluZm8+PG"
+ + "RzaWc6Q2Fub25pY2FsaXphdGlvbk1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMTAveG1s"
+ + "LWV4Yy1jMTRuIyIvPjxkc2lnOlNpZ25hdHVyZU1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMD"
+ + "AvMDkveG1sZHNpZyNyc2Etc2hhMSIvPjxkc2lnOlJlZmVyZW5jZSBVUkk9IiI+PGRzaWc6VHJhbnNmb3Jtcz48ZHNp"
+ + "ZzpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14cGF0aC0xOTk5MTExNi"
+ + "I+PGRzaWc6WFBhdGg+bm90KGFuY2VzdG9yLW9yLXNlbGY6OnByOklkZW50aWZpY2F0aW9uKTwvZHNpZzpYUGF0aD48"
+ + "L2RzaWc6VHJhbnNmb3JtPjxkc2lnOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMD"
+ + "kveG1sZHNpZyNlbnZlbG9wZWQtc2lnbmF0dXJlIi8+PC9kc2lnOlRyYW5zZm9ybXM+PGRzaWc6RGlnZXN0TWV0aG9k"
+ + "IEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnI3NoYTEiLz48ZHNpZzpEaWdlc3RWYW"
+ + "x1ZT43TmZyRUJKZGw4NTRyZG1BaDFjdFEyWDdXTWM9PC9kc2lnOkRpZ2VzdFZhbHVlPjwvZHNpZzpSZWZlcmVuY2U+"
+ + "PGRzaWc6UmVmZXJlbmNlIFR5cGU9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNNYW5pZmVzdCIgVV"
+ + "JJPSIjbWFuaWZlc3QiPjxkc2lnOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDAv"
+ + "MDkveG1sZHNpZyNzaGExIi8+PGRzaWc6RGlnZXN0VmFsdWU+aGZnOHphM21ZcXU1UVNiVXpYSHhEZTUvU05FPTwvZH"
+ + "NpZzpEaWdlc3RWYWx1ZT48L2RzaWc6UmVmZXJlbmNlPjwvZHNpZzpTaWduZWRJbmZvPjxkc2lnOlNpZ25hdHVyZVZh"
+ + "bHVlPm11V2IzOVRhZ0NkM053V2N1NWlrRUp1SnBaZG5lZFJEY2RtMTdJWnYrT0VWRXRxeWxSdXIvd1g2QUdVQ1UvUF"
+ + "UKWm5DdWROR1ZwQ0hMWXpIaXBONWM4b2JtbmhsbElOb1NFTk81b3Y1amlNb05Lb2RBZXhKSU42bVpPREJkL1RtVApt"
+ + "NzBWaVd5ckdVTGJJWWwvd2hsdjFsZ2EzSjhjeDhLU29QejhTd05MMnF3VWoydG8vQWhnNGtjSmxxT3MyNVlNCk5YL3"
+ + "dhSW53NkRSN05HQ0pvRStaWlNwcEh3d1FtNnYrOUhZOUU4NnNlQkFBUHhJOU0xako0WldiMzI5akZ0aUEKcXZiOHM2"
+ + "anhyMmxsOHVWYWdxWENZaFg5K1dOUXdheXFZTCtPdzhPcGxVem9OMVRpS2hSbVFLWkl3S1lDMVo4eQpLK3ZqQWxRTz"
+ + "JhT05zNEhVaG9SNmQyNmUvTVUxZmJlWEhxVHpyZmI5R1hXSHl0dFRkanhiemtaQTFGODJsUUZvCjUrVnpjTUhRUmc3"
+ + "c0RKODY1Wk1zM3BwY2VoLzlaU2ZvT2Y1SFlEUFl1V2VjT0RpZ1pRWVh0TVlwdVBRVGsrQ20KczlaSkd6QlYybGVtZk"
+ + "5DOVFVNzh0Zm42cDFVWnJTTG5zWGFYbVVjOEVjNTNQaUhBT3Z6blh0QjVjRW5hV2daMgp1TGVGOEtTUmw2SjBlTlE5"
+ + "SkRQZ1NOMHNmYWxiVkNkaENUTlFtclJ0T2pVZjNlN3UzeElNelJ1Zm4wb2o2SHRwCnQzaEVESFhuSS9kTk1scHBSSX"
+ + "l4cGQxbFo5bXJYZklLcnJMZVdxdGd3cFB1OTRoVUhRL2VKejFrMy9IM0h6M2QKWkR4dkFFYzNTRERkb1FXeS9HUGZp"
+ + "cXNwRWZjbGd0SkNKQ2E4L2t2dTdSVT08L2RzaWc6U2lnbmF0dXJlVmFsdWU+PGRzaWc6S2V5SW5mbz48ZHNpZzpYNT"
+ + "A5RGF0YT48ZHNpZzpYNTA5Q2VydGlmaWNhdGU+TUlJRlpEQ0NBMHlnQXdJQkFnSUpBSmF2K3plcVUvRE1NQTBHQ1Nx"
+ + "R1NJYjNEUUVCQ3dVQU1Gd3hDekFKQmdOVgpCQVlUQWtGVU1RMHdDd1lEVlFRS0V3UkZSMGxhTVJZd0ZBWURWUVFMRX"
+ + "cxVGIyWjBkMkZ5WlVOaGNtUnpNU1l3CkpBWURWUVFERkIxVVpYTjBYMU52Wm5SM1lYSmxZMkZ5WkhOZlNVUk1YMU5w"
+ + "WjI1bGNqQWVGdzB4TmpFd01UZ3gKTURNNU1EZGFGdzB4T1RBM01UUXhNRE01TURkYU1Gd3hDekFKQmdOVkJBWVRBa0"
+ + "ZVTVEwd0N3WURWUVFLRXdSRgpSMGxhTVJZd0ZBWURWUVFMRXcxVGIyWjBkMkZ5WlVOaGNtUnpNU1l3SkFZRFZRUURG"
+ + "QjFVWlhOMFgxTnZablIzCllYSmxZMkZ5WkhOZlNVUk1YMU5wWjI1bGNqQ0NBaUl3RFFZSktvWklodmNOQVFFQkJRQU"
+ + "RnZ0lQQURDQ0Fnb0MKZ2dJQkFMa0xndCtNRlR4TGZSemNFSVowYnljSUZnN2cvSFBON1FXSVo2N2JIenJiNmVoZWJ6"
+ + "RjlWaW56RFpYQwprZktXZFVKYmtOU3VXS1dycDJYNjJmN29HaGRxSzB5RmMrRGxvK09wSURnUWlXQ3BCZktKbzhjUF"
+ + "dzaUFtTnVUCnhXVmFnVTVmYUkxaDd4dnZPVk15YldlOTJuaXZmcUxPdUV4Nld2WC9Vb0lhd1JIVjJWbVBHRmdab2NN"
+ + "NUcwWDYKYlVWRXBxeEFhM3FPSWxScjBwb0IrUkEwUEE4NmhScFJZYWwvT3I5M0Q4QmZRSDVsOHpWOVFjdlBlL0tlSl"
+ + "NwSgpIZ0dXbUVzNTkzTHROdUExUnYxaURwdXUxMHk3QzJGZU1CdmNVcFJrUjdXQWo3dklZVnRRSUxYQ2gxRmhmTjFi"
+ + "CkhnNnhMVlR5c2hsZ1VuN0FSUUpZb0ozdG9nZEdhbURSbG5LVTJyWE45ajg4VHc2ZkFkY0N2V2JXVnRqeThwTmoKV0"
+ + "xrVkpNbEZXZGZPNi81TEF2YTFIeFJPTWhGeDdRT1BoT3plbWV0Q3RUMmZJNEZUQWs5VnlmOXdUVVFPTDhzcQpLNzN0"
+ + "MUE0MTlsWVM4V3VVQ3pIRHhMdWpMaVR1d29JVWd6TU4vYnFNRVpyb2dQTFkyS2o0dm1aTVo0Z1UyUFU3Cll3K1hmYW"
+ + "5nMysveUsxZ1lORWVicGR2UGk4U1ZVQW51cy9DZm1kd2RuOU8vbmFXaUJwamMwNkdKdk1iZWdqeHcKb1BCTTVjMFNr"
+ + "Q1I1eENheWdaTDJPQnBSTUtnZGZyazRrMHBqNVpVbSttdHJPR29qdFJaSkVaUUNCcFZQazF5RAozTDQvWjRBWm9mT2"
+ + "84ZFNrVVIreEpOMG9LbklkZm5kdkJ4TkY0c3hZNEl3T3ZGUnJBZ01CQUFHaktUQW5NQWtHCkExVWRFd1FDTUFBd0N3"
+ + "WURWUjBQQkFRREFnV2dNQTBHQnlvb0FBb0JCd0VFQWdVQU1BMEdDU3FHU0liM0RRRUIKQ3dVQUE0SUNBUUJjRUQ3dE"
+ + "U4cW1Bd0ZCZGh5b3oxRDh5b2RFWm1tZFhad2tzQS9rSStvKzV3UXM2WS9xdnc3agorZUJ2bGN0eVhDWFdoMWVGZWIv"
+ + "RmFpQTVDcG9hazhOYy9vWTdUL3lCajVnZktIbE5xVlQxb3dhQmtIc0VZTUJ2CmFVWHh5RENibkZNem5KZmt4amJ2Rm"
+ + "JRZGQxaGNlSmh0OER4K2lrcEI2TUpIcUhJRXJ5MFdXZ2YzSmRONVBFcnIKQVRuZGpCRTRCYVRaMnE2c0N2K1NkSzYw"
+ + "TWswbVlBNmw2blNDOWVCOEc5QzRiQTFjUUVPdTYrRlBtRnpTa2lJRgp0ZW1BMXRqUW5oeEtaWmlnenhJTjNFUUFucS"
+ + "8yM2pmK0NreEF0NUdrcFVqcUY1YnFLSTFuZXJKT2duNEptNWo2CnNQWkdwR2xsekhMQmF5YmZZNjNBejRzRVJDMjhP"
+ + "bHFGdzF2eFFzNGhXSVdOV0VBTUYzT3o0K3BZZzRPSUloNUMKTnIxYXFKZ3NzV2ZPWnJYMktTejJ2cXJab1U2N3pxOD"
+ + "RNUWNKVFNtZ0tWQmI5T25yQzV0WW41WVZVbHlkUFBqcgpVbTBpSGxXQzBNRmlJZ1N6eDZUaTJIblBnYzBVSHNBNklw"
+ + "U1RvK1V1ZllZTkRpRkNzc1JidTRyMC9TeXE0TVAzCmdoWVhkUDlUajBGSVN6MlR2TTZZUWZ6SGVqOTRiWmNWTnduRj"
+ + "RwV0VuR1p0QmJOVnZKUnc5aUpISGtEV0xpWU0KMUI3M3pzNytwQThZZ0txRXhESFhjMVNob3U1SHZTdVRYU21hVE1V"
+ + "SHJDa2hvdEhmcHFZaHJKaUFtSitPZnROdgo2b3hNUGZOaFpnMDFlT290bTFKK1dWMm1KYmdjUFROU0MxT05jU0ZkUT"
+ + "V2WlpMTDI0SjJIY3c9PTwvZHNpZzpYNTA5Q2VydGlmaWNhdGU+PC9kc2lnOlg1MDlEYXRhPjwvZHNpZzpLZXlJbmZv"
+ + "Pjxkc2lnOk9iamVjdD48ZHNpZzpNYW5pZmVzdCBJZD0ibWFuaWZlc3QiPjxkc2lnOlJlZmVyZW5jZSBVUkk9IiI+PG"
+ + "RzaWc6VHJhbnNmb3Jtcz48ZHNpZzpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5"
+ + "L1JFQy14cGF0aC0xOTk5MTExNiI+PGRzaWc6WFBhdGggeG1sbnM6ZHNpZz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC"
+ + "8wOS94bWxkc2lnIyI+bm90KGFuY2VzdG9yLW9yLXNlbGY6OmRzaWc6U2lnbmF0dXJlKTwvZHNpZzpYUGF0aD48L2Rz"
+ + "aWc6VHJhbnNmb3JtPjwvZHNpZzpUcmFuc2Zvcm1zPjxkc2lnOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly"
+ + "93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNzaGExIi8+PGRzaWc6RGlnZXN0VmFsdWU+QXN4VHprWmRBWUM0U0s1"
+ + "cTh5c0pLVDd5ZHVRPTwvZHNpZzpEaWdlc3RWYWx1ZT48L2RzaWc6UmVmZXJlbmNlPjwvZHNpZzpNYW5pZmVzdD48L2"
+ + "RzaWc6T2JqZWN0PjwvZHNpZzpTaWduYXR1cmU+PC9zYW1sOkFzc2VydGlvbj4=";
@Test
public void dummyTest() throws Exception {
-
}
-
-
@Test
public void buildAuthDataWithIdlOnly_2_without_flag() throws Exception {
buildAuthDataWithIdlOnly_2(null, "XXXŐz'gür", "XXXTüzekçi");
@@ -143,7 +142,6 @@ public class AuthenticationDataBuilderTest {
}
-
@Test
public void buildAuthDataWithIdlOnly_2_with_flag_true() throws Exception {
buildAuthDataWithIdlOnly_2(true, "XXXŐz'gür", "XXXTüzekçi");
@@ -203,7 +201,6 @@ public class AuthenticationDataBuilderTest {
throw new Exception("DateOfBirth wrong");
}
-
if (!authData.getIdentificationValue()
.equals("RUxHQVRlc3RQQjBYWFjFkHpnw7xyX1hYWFTDvHpla8OnaQ==")) {
throw new Exception("baseId wrong");
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/IdentityLinkTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/IdentityLinkTest.java
index db97f4ca..16c2079a 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/IdentityLinkTest.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/IdentityLinkTest.java
@@ -20,82 +20,84 @@ import at.gv.egiz.eaaf.core.impl.idp.auth.data.SimpleIdentityLinkAssertionParser
@RunWith(BlockJUnit4ClassRunner.class)
public class IdentityLinkTest {
-
- private IdentityLink idl = null;
-
- /**
- * jUnit test set-up.
- * @throws EaafParserException In case of an error
- * @throws UnsupportedEncodingException In case of an unsupported encoding
- */
- @Before
- public void testInit() throws EaafParserException, UnsupportedEncodingException {
- idl = (IdentityLink) new SimpleIdentityLinkAssertionParser(
- new ByteArrayInputStream(Base64Utils.decode(AuthenticationDataBuilderTest.DUMMY_IDL_2.getBytes("UTF-8")))).parseIdentityLink();
-
- }
-
- @Test
- public void checkElement() {
- Assert.assertNotNull("DateOfBirth", idl.getDateOfBirth());
- Assert.assertNotNull("FamilyName", idl.getFamilyName());
- Assert.assertNotNull("GivenNamae", idl.getGivenName());
- Assert.assertNotNull("baseIdType", idl.getIdentificationType());
- Assert.assertNotNull("baseid", idl.getIdentificationValue());
- Assert.assertNotNull("IssuerInstant", idl.getIssueInstant());
- Assert.assertNotNull("name", idl.getName());
- Assert.assertNotNull("prPerson", idl.getPrPerson());
- Assert.assertNotNull("Assertion element", idl.getSamlAssertion());
- Assert.assertNotNull("Assertion serialized", idl.getSerializedSamlAssertion());
- Assert.assertNotNull("Transform ref", idl.getDsigReferenceTransforms());
- Assert.assertEquals("Transform Size not match", 1, idl.getDsigReferenceTransforms().length);
-
- }
-
- @Test
- public void checkPubKeys() {
- PublicKey[] publicKey = new RSAPublicKey[2];
- publicKey[0] = generatePubKey();
- publicKey[1] = generatePubKey();
-
- idl.setPublicKey(publicKey );
-
- Assert.assertNotNull("PubKey", idl.getPublicKey());
- Assert.assertEquals("PubKeys not match", publicKey.length, idl.getPublicKey().length);
-
- }
-
- private PublicKey generatePubKey() {
- return new RSAPublicKey() {
- private static final long serialVersionUID = 1L;
-
- @Override
- public BigInteger getModulus() {
- return new BigInteger(RandomStringUtils.randomNumeric(10));
- }
-
- @Override
- public String getFormat() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public byte[] getEncoded() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public String getAlgorithm() {
- // TODO Auto-generated method stub
- return null;
- }
-
- @Override
- public BigInteger getPublicExponent() {
- return new BigInteger(RandomStringUtils.randomNumeric(2));
- }
- };
- }
+
+ private IdentityLink idl = null;
+
+ /**
+ * jUnit test set-up.
+ *
+ * @throws EaafParserException In case of an error
+ * @throws UnsupportedEncodingException In case of an unsupported encoding
+ */
+ @Before
+ public void testInit() throws EaafParserException, UnsupportedEncodingException {
+ idl = (IdentityLink) new SimpleIdentityLinkAssertionParser(
+ new ByteArrayInputStream(Base64Utils.decode(AuthenticationDataBuilderTest.DUMMY_IDL_2.getBytes(
+ "UTF-8")))).parseIdentityLink();
+
+ }
+
+ @Test
+ public void checkElement() {
+ Assert.assertNotNull("DateOfBirth", idl.getDateOfBirth());
+ Assert.assertNotNull("FamilyName", idl.getFamilyName());
+ Assert.assertNotNull("GivenNamae", idl.getGivenName());
+ Assert.assertNotNull("baseIdType", idl.getIdentificationType());
+ Assert.assertNotNull("baseid", idl.getIdentificationValue());
+ Assert.assertNotNull("IssuerInstant", idl.getIssueInstant());
+ Assert.assertNotNull("name", idl.getName());
+ Assert.assertNotNull("prPerson", idl.getPrPerson());
+ Assert.assertNotNull("Assertion element", idl.getSamlAssertion());
+ Assert.assertNotNull("Assertion serialized", idl.getSerializedSamlAssertion());
+ Assert.assertNotNull("Transform ref", idl.getDsigReferenceTransforms());
+ Assert.assertEquals("Transform Size not match", 1, idl.getDsigReferenceTransforms().length);
+
+ }
+
+ @Test
+ public void checkPubKeys() {
+ final PublicKey[] publicKey = new RSAPublicKey[2];
+ publicKey[0] = generatePubKey();
+ publicKey[1] = generatePubKey();
+
+ idl.setPublicKey(publicKey);
+
+ Assert.assertNotNull("PubKey", idl.getPublicKey());
+ Assert.assertEquals("PubKeys not match", publicKey.length, idl.getPublicKey().length);
+
+ }
+
+ private PublicKey generatePubKey() {
+ return new RSAPublicKey() {
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public BigInteger getModulus() {
+ return new BigInteger(RandomStringUtils.randomNumeric(10));
+ }
+
+ @Override
+ public String getFormat() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public byte[] getEncoded() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public String getAlgorithm() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+ @Override
+ public BigInteger getPublicExponent() {
+ return new BigInteger(RandomStringUtils.randomNumeric(2));
+ }
+ };
+ }
}
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/TestAuthenticationDataBuilder.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/TestAuthenticationDataBuilder.java
index 3e21c211..229076a6 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/TestAuthenticationDataBuilder.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/auth/TestAuthenticationDataBuilder.java
@@ -2,7 +2,7 @@ package at.gv.egiz.eaaf.core.impl.idp.auth;
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.IAuthData;
-import at.gv.egiz.eaaf.core.api.idp.IspConfiguration;
+import at.gv.egiz.eaaf.core.api.idp.ISpConfiguration;
import at.gv.egiz.eaaf.core.api.idp.auth.data.IAuthProcessDataContainer;
import at.gv.egiz.eaaf.core.exceptions.EaafAuthenticationException;
import at.gv.egiz.eaaf.core.exceptions.EaafBuilderException;
@@ -45,7 +45,7 @@ public class TestAuthenticationDataBuilder extends AbstractAuthenticationDataBui
@Override
protected Pair@@ -61,11 +63,11 @@ public class CreateSaml1AssertionTask implements Task { public IRequest execute(final IRequest penReq, final ExecutionContext executionContext) throws TaskExecutionException { Objects.requireNonNull(executionContext.get("IdentityLink")); - assert (Boolean.TRUE - .equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated")))); + assert Boolean.TRUE + .equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated"))); Objects.requireNonNull(executionContext.get("SignedAuthBlock")); - assert (Boolean.TRUE - .equals(Objects.requireNonNull(executionContext.get("isSignedAuthBlockValidated")))); + assert Boolean.TRUE + .equals(Objects.requireNonNull(executionContext.get("isSignedAuthBlockValidated"))); log.debug("Using IdentityLink and signed auth block in order to create SAML1 assertion."); diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/GetIdentityLinkTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/GetIdentityLinkTask.java index 93fcf6db..b4f3d7c8 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/GetIdentityLinkTask.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/GetIdentityLinkTask.java @@ -22,15 +22,17 @@ package at.gv.egiz.eaaf.core.impl.idp.process.spring.test.task; import java.io.IOException; import java.io.InputStream; import java.util.Objects; -import at.gv.egiz.eaaf.core.api.IRequest; -import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; -import at.gv.egiz.eaaf.core.api.idp.process.Task; -import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; + import org.apache.commons.io.IOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import at.gv.egiz.eaaf.core.api.IRequest; +import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; +import at.gv.egiz.eaaf.core.api.idp.process.Task; +import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; + /** * A dummy task simulating the retrieval of an IdentityLink. *
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/SelectBkuTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/SelectBkuTask.java index a6e2ac2c..4d1edd53 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/SelectBkuTask.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/SelectBkuTask.java @@ -19,13 +19,14 @@ package at.gv.egiz.eaaf.core.impl.idp.process.spring.test.task; -import at.gv.egiz.eaaf.core.api.IRequest; -import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; -import at.gv.egiz.eaaf.core.api.idp.process.Task; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import at.gv.egiz.eaaf.core.api.IRequest; +import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; +import at.gv.egiz.eaaf.core.api.idp.process.Task; + /** * A dummy task simulating a bku selection. * diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/SignAuthBlockTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/SignAuthBlockTask.java index 41beefc8..16c375c9 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/SignAuthBlockTask.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/SignAuthBlockTask.java @@ -22,15 +22,17 @@ package at.gv.egiz.eaaf.core.impl.idp.process.spring.test.task; import java.io.IOException; import java.io.InputStream; import java.util.Objects; -import at.gv.egiz.eaaf.core.api.IRequest; -import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; -import at.gv.egiz.eaaf.core.api.idp.process.Task; -import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; + import org.apache.commons.io.IOUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import at.gv.egiz.eaaf.core.api.IRequest; +import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; +import at.gv.egiz.eaaf.core.api.idp.process.Task; +import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException; + /** * A dummy task simulating the signature of an auth block. * @@ -62,8 +64,8 @@ public class SignAuthBlockTask implements Task { public IRequest execute(final IRequest penReq, final ExecutionContext executionContext) throws TaskExecutionException { Objects.requireNonNull(executionContext.get("IdentityLink")); - assert (Boolean.TRUE - .equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated")))); + assert Boolean.TRUE + .equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated"))); Objects.requireNonNull(executionContext.get("bkuURL")); log.debug("Using validated IdentityLink and bkuURL in order to sign auth block."); diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/ValidateIdentityLinkTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/ValidateIdentityLinkTask.java index 1a2cf5ee..be1bfb01 100644 --- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/ValidateIdentityLinkTask.java +++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/ValidateIdentityLinkTask.java @@ -20,13 +20,15 @@ package at.gv.egiz.eaaf.core.impl.idp.process.spring.test.task; import java.util.Objects; -import at.gv.egiz.eaaf.core.api.IRequest; -import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; -import at.gv.egiz.eaaf.core.api.idp.process.Task; + import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import at.gv.egiz.eaaf.core.api.IRequest; +import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext; +import at.gv.egiz.eaaf.core.api.idp.process.Task; + /** * Dummy task simulating the validation of an IdentityLink. *
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/ValidateSignedAuthBlockTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/ValidateSignedAuthBlockTask.java
index f07920cd..6e42d19c 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/ValidateSignedAuthBlockTask.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/spring/test/task/ValidateSignedAuthBlockTask.java
@@ -20,13 +20,15 @@
package at.gv.egiz.eaaf.core.impl.idp.process.spring.test.task;
import java.util.Objects;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.api.idp.process.Task;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.stereotype.Service;
/**
* A dummy task simulating the validation of an auth block.
@@ -57,8 +59,8 @@ public class ValidateSignedAuthBlockTask implements Task {
public IRequest execute(final IRequest penReq, final ExecutionContext executionContext)
throws TaskExecutionException {
Objects.requireNonNull(executionContext.get("IdentityLink"));
- assert (Boolean.TRUE
- .equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated"))));
+ assert Boolean.TRUE
+ .equals(Objects.requireNonNull(executionContext.get("isIdentityLinkValidated")));
Objects.requireNonNull(executionContext.get("SignedAuthBlock"));
log.debug(
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/BooleanStringExpressionEvaluator.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/BooleanStringExpressionEvaluator.java
index aa079f86..4540a01d 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/BooleanStringExpressionEvaluator.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/BooleanStringExpressionEvaluator.java
@@ -20,9 +20,11 @@
package at.gv.egiz.eaaf.core.impl.idp.process.test;
import java.util.Objects;
+
+import org.apache.commons.lang3.BooleanUtils;
+
import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluationContext;
import at.gv.egiz.eaaf.core.api.idp.process.ExpressionEvaluator;
-import org.apache.commons.lang3.BooleanUtils;
/**
* Expression evaluator that guesses the boolean value from a String. Refer to
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/HalloWeltTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/HalloWeltTask.java
index 40892476..eadb023d 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/HalloWeltTask.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/HalloWeltTask.java
@@ -19,10 +19,11 @@
package at.gv.egiz.eaaf.core.impl.idp.process.test;
+import org.springframework.stereotype.Service;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.api.idp.process.Task;
-import org.springframework.stereotype.Service;
/**
* Simple task that just outputs a "Hallo World" text to the console.
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/HelloWorldTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/HelloWorldTask.java
index ce49e33d..e3e01b90 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/HelloWorldTask.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/HelloWorldTask.java
@@ -19,10 +19,11 @@
package at.gv.egiz.eaaf.core.impl.idp.process.test;
+import org.springframework.stereotype.Service;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.api.idp.process.Task;
-import org.springframework.stereotype.Service;
/**
* Simple task that just outputs a "Hello World" text to the console.
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessDefinitionParserTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessDefinitionParserTest.java
index 2238ad09..56259663 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessDefinitionParserTest.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessDefinitionParserTest.java
@@ -24,8 +24,12 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
+
import java.io.IOException;
import java.io.InputStream;
+
+import org.junit.Test;
+
import at.gv.egiz.eaaf.core.impl.idp.process.ProcessDefinitionParser;
import at.gv.egiz.eaaf.core.impl.idp.process.ProcessDefinitionParserException;
import at.gv.egiz.eaaf.core.impl.idp.process.model.EndEvent;
@@ -34,7 +38,6 @@ import at.gv.egiz.eaaf.core.impl.idp.process.model.ProcessNode;
import at.gv.egiz.eaaf.core.impl.idp.process.model.StartEvent;
import at.gv.egiz.eaaf.core.impl.idp.process.model.TaskInfo;
import at.gv.egiz.eaaf.core.impl.idp.process.model.Transition;
-import org.junit.Test;
public class ProcessDefinitionParserTest {
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java
index 9e8ce781..7ce4c6b3 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ProcessEngineTest.java
@@ -22,16 +22,10 @@ package at.gv.egiz.eaaf.core.impl.idp.process.test;
import static at.gv.egiz.eaaf.core.impl.idp.process.ProcessInstanceState.NOT_STARTED;
import static at.gv.egiz.eaaf.core.impl.idp.process.ProcessInstanceState.SUSPENDED;
import static org.junit.Assert.assertEquals;
+
import java.io.IOException;
import java.io.InputStream;
-import at.gv.egiz.eaaf.core.api.idp.process.ProcessEngine;
-import at.gv.egiz.eaaf.core.exceptions.ProcessExecutionException;
-import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
-import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl;
-import at.gv.egiz.eaaf.core.impl.idp.process.ProcessDefinitionParser;
-import at.gv.egiz.eaaf.core.impl.idp.process.ProcessDefinitionParserException;
-import at.gv.egiz.eaaf.core.impl.idp.process.ProcessEngineImpl;
-import at.gv.egiz.eaaf.core.impl.idp.process.ProcessInstance;
+
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Assert;
import org.junit.Before;
@@ -42,6 +36,15 @@ import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import at.gv.egiz.eaaf.core.api.idp.process.ProcessEngine;
+import at.gv.egiz.eaaf.core.exceptions.ProcessExecutionException;
+import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
+import at.gv.egiz.eaaf.core.impl.idp.module.test.TestRequestImpl;
+import at.gv.egiz.eaaf.core.impl.idp.process.ProcessDefinitionParser;
+import at.gv.egiz.eaaf.core.impl.idp.process.ProcessDefinitionParserException;
+import at.gv.egiz.eaaf.core.impl.idp.process.ProcessEngineImpl;
+import at.gv.egiz.eaaf.core.impl.idp.process.ProcessInstance;
+
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/process/spring/test/SpringExpressionAwareProcessEngineTest-context.xml")
public class ProcessEngineTest {
@@ -57,7 +60,7 @@ public class ProcessEngineTest {
/**
* jUnit test set-up.
*
- * @throws IOException in case of an error
+ * @throws IOException in case of an error
* @throws ProcessDefinitionParserException in case of an error
*/
@Before
@@ -203,7 +206,6 @@ public class ProcessEngineTest {
"Wrong Exception in TaskExecutionException");
}
-
}
@Test
@@ -229,7 +231,6 @@ public class ProcessEngineTest {
}
-
}
@Test(expected = IllegalArgumentException.class)
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/StopProcessFlagTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/StopProcessFlagTask.java
index 2ef58729..e2fd80a8 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/StopProcessFlagTask.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/StopProcessFlagTask.java
@@ -19,10 +19,11 @@
package at.gv.egiz.eaaf.core.impl.idp.process.test;
+import org.springframework.stereotype.Service;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.api.idp.process.Task;
-import org.springframework.stereotype.Service;
/**
* Simple task that just outputs a "Hello World" text to the console.
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ThrowExceptionTask.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ThrowExceptionTask.java
index 639121d6..759e3460 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ThrowExceptionTask.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/idp/process/test/ThrowExceptionTask.java
@@ -19,11 +19,12 @@
package at.gv.egiz.eaaf.core.impl.idp.process.test;
+import org.springframework.stereotype.Service;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
import at.gv.egiz.eaaf.core.api.idp.process.Task;
import at.gv.egiz.eaaf.core.exceptions.TaskExecutionException;
-import org.springframework.stereotype.Service;
/**
* Simple task that just outputs a "Hello World" text to the console.
diff --git a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtilsTest.java b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtilsTest.java
index d5ce24c5..36406304 100644
--- a/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtilsTest.java
+++ b/eaaf_core/src/test/java/at/gv/egiz/eaaf/core/impl/utils/KeyValueUtilsTest.java
@@ -8,6 +8,7 @@ import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;
+
import org.apache.commons.lang3.RandomStringUtils;
import org.junit.Assert;
import org.junit.Test;
@@ -442,5 +443,4 @@ public class KeyValueUtilsTest {
}
-
}
diff --git a/eaaf_core/src/test/resources/process/spring/test/SampleProcessDefinitionForSAML1Authentication.xml b/eaaf_core/src/test/resources/process/spring/test/SampleProcessDefinitionForSAML1Authentication.xml
index 2eec2b70..da3955e6 100644
--- a/eaaf_core/src/test/resources/process/spring/test/SampleProcessDefinitionForSAML1Authentication.xml
+++ b/eaaf_core/src/test/resources/process/spring/test/SampleProcessDefinitionForSAML1Authentication.xml
@@ -1,61 +1,58 @@
-
-
-
- * Manly used for SAML2 POST-Binding
- *
+ * Manly used for SAML2 POST-Binding
+ *
- * Check if Single Sign-On is allowed for the current pending request and the requested service
- * provider Set IRequest.needSingleSignOnFunctionality() to true if SSO is allowed
+ * Check if Single Sign-On is allowed for the current pending request and the
+ * requested service provider Set IRequest.needSingleSignOnFunctionality() to
+ * true if SSO is allowed
*
- * The process-flow engine will stop execution when the task that sets this flag is finished
+ * The process-flow engine will stop execution when the task that sets this flag
+ * is finished
*
+ *
* Example: http://www.ref.gv.at/ns/names/agiz/pvp/secclass/0-3
* http://www.stork.gov.eu/1.0/citizenQAALevel/4
- *Signatur der Anmeldedaten
-
- Mit meiner elektronischen Signatur beantrage ich,
-
-
-
- Datum und Uhrzeit:
-
- HPI(**):
- wbPK(*):
-
- Ich bin weiters ermächtigt als
- wbPK(*) des Vollmachtgebers:
-
-
-
- Signatur der Anmeldedaten
+
+
+ Mit meiner elektronischen Signatur
+ beantrage ich,
+
+
+
+
+ Datum und Uhrzeit:
+
+
+ HPI(**):
+
+
+ wbPK(*):
+
+
+
+ Ich bin weiters ermächtigt als
+
+
+ wbPK(*) des Vollmachtgebers:
+
+
+
+
+ Signatur der Anmeldedaten
-
- Mit meiner elektronischen Signatur beantrage ich,
-
-
-
- Datum und Uhrzeit:
-
- HPI(**):
- wbPK(*):
-
- Ich bin weiters ermächtigt als
- wbPK(*) des Vollmachtgebers:
-
-
-
- Signatur der Anmeldedaten
+
+
+ Mit meiner elektronischen Signatur beantrage ich,
+
+
+
+
+ Datum und Uhrzeit:
+
+
+ HPI(**):
+
+
+ wbPK(*):
+
+
+
+ Ich bin weiters ermächtigt als
+
+
+ wbPK(*) des Vollmachtgebers:
+
+
+
+
+ null
if no message was fround
*/
@@ -67,7 +66,6 @@ public interface IStatusMessenger {
*/
String getResponseErrorCode(Throwable throwable);
-
/**
* Map internal to external errorCode.
*
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFConfigConstants.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFConfigConstants.java
deleted file mode 100644
index d3529592..00000000
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFConfigConstants.java
+++ /dev/null
@@ -1,28 +0,0 @@
-/*******************************************************************************
- * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
- * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.2 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:
- * https://joinup.ec.europa.eu/news/understanding-eupl-v12
- *
- * 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.egiz.eaaf.core.api.data;
-
-public class EAAFConfigConstants {
-
- public static final String SERVICE_UNIQUEIDENTIFIER = "uniqueID"; // publicURLPrefix
-}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFConstants.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFConstants.java
deleted file mode 100644
index dda3703a..00000000
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFConstants.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*******************************************************************************
- * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
- * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.2 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:
- * https://joinup.ec.europa.eu/news/understanding-eupl-v12
- *
- * 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.egiz.eaaf.core.api.data;
-
-
-public class EAAFConstants {
-
- public static final String CONTENTTYPE_HTML_UTF8 = "text/html; charset=UTF-8";
-
- // http request parameters for process management
- public static final String PARAM_HTTP_TARGET_PENDINGREQUESTID = "pendingid";
- public static final String PARAM_HTTP_ERROR_CODE = "errorid";
- public static final String PARAM_HTTP_STOP_PROCESS = "stopAuthProcess";
-
-
- public static final String EIDAS_LOA_PREFIX = "http://eidas.europa.eu/LoA/";
- public static final String EIDAS_LOA_LOW = EIDAS_LOA_PREFIX + "low";
- public static final String EIDAS_LOA_SUBSTANTIAL = EIDAS_LOA_PREFIX + "substantial";
- public static final String EIDAS_LOA_HIGH = EIDAS_LOA_PREFIX + "high";
-
- public static final String EIDAS_LOA_MATCHING_MINIMUM = "minimum";
- public static final String EIDAS_LOA_MATCHING_EXACT = "exact";
-
- // Austrian specific prefixes for pseudonyms of users
- public static final String URN_PART_WBPK = "wbpk+";
- public static final String URN_PART_EIDAS = "eidasid+";
-
-
- public static final String URN_PREFIX = "urn:publicid:gv.at";
- public static final String URN_PREFIX_BASEID = URN_PREFIX + ":baseid";
- public static final String URN_PREFIX_CDID = URN_PREFIX + ":cdid+";
- public static final String URN_PREFIX_BPK = URN_PREFIX_CDID + "bpk";
- public static final String URN_PREFIX_WBPK = URN_PREFIX + ":" + URN_PART_WBPK;
- public static final String URN_PREFIX_EIDAS = URN_PREFIX + ":" + URN_PART_EIDAS;
- public static final String URN_PREFIX_OW_BPK = URN_PREFIX_CDID + "OW";
-
-
- // Authentication process data_constants
- public static final String UNIQUESESSIONIDENTIFIER = "eaaf_uniqueSessionIdentifier";
- public static final String AUTH_DATA_CREATED = "eaaf_authdata_created";
-
-
- public static final String PROCESS_ENGINE_PREFIX = "PARAMS_";
- public static final String PROCESS_ENGINE_PENDINGREQUESTID =
- PROCESS_ENGINE_PREFIX + PARAM_HTTP_TARGET_PENDINGREQUESTID;
- public static final String PROCESS_ENGINE_SERVICE_PROVIDER_ENTITYID =
- PROCESS_ENGINE_PREFIX + "uniqueSPId";
- public static final String PROCESS_ENGINE_SSL_CLIENT_CERTIFICATE =
- PROCESS_ENGINE_PREFIX + "holderofkey_cert";
- public static final String PROCESS_ENGINE_REQUIRES_NO_POSTAUTH_REDIRECT =
- PROCESS_ENGINE_PREFIX + "requireNoPostAuthRedirect";
- public static final String PROCESSCONTEXT_SWITCH_LANGUAGE = "changeLanguage";
-
- public static final int ALLOWED_TIME_JITTER = 5; // minutes
- public static final String COUNTRYCODE_AUSTRIA = "AT";
-
- public static final String TESTCREDENTIALROOTOID = "1.2.40.0.10.2.4.1";
-
-}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFEventCodes.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFEventCodes.java
deleted file mode 100644
index e25c05b5..00000000
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EAAFEventCodes.java
+++ /dev/null
@@ -1,5 +0,0 @@
-package at.gv.egiz.eaaf.core.api.data;
-
-public class EAAFEventCodes {
- public static final int PROCESS_STOPPED_BY_USER = 4102;
-}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafConfigConstants.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafConfigConstants.java
new file mode 100644
index 00000000..99537ffa
--- /dev/null
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafConfigConstants.java
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
+ * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.2 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:
+ * https://joinup.ec.europa.eu/news/understanding-eupl-v12
+ *
+ * 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.egiz.eaaf.core.api.data;
+
+public class EaafConfigConstants {
+
+ public static final String SERVICE_UNIQUEIDENTIFIER = "uniqueID"; // publicURLPrefix
+}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafConstants.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafConstants.java
new file mode 100644
index 00000000..8a5c9cb1
--- /dev/null
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafConstants.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
+ * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.2 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:
+ * https://joinup.ec.europa.eu/news/understanding-eupl-v12
+ *
+ * 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.egiz.eaaf.core.api.data;
+
+public class EaafConstants {
+
+ public static final String CONTENTTYPE_HTML_UTF8 = "text/html; charset=UTF-8";
+
+ // http request parameters for process management
+ public static final String PARAM_HTTP_TARGET_PENDINGREQUESTID = "pendingid";
+ public static final String PARAM_HTTP_ERROR_CODE = "errorid";
+ public static final String PARAM_HTTP_STOP_PROCESS = "stopAuthProcess";
+
+ public static final String EIDAS_LOA_PREFIX = "http://eidas.europa.eu/LoA/";
+ public static final String EIDAS_LOA_LOW = EIDAS_LOA_PREFIX + "low";
+ public static final String EIDAS_LOA_SUBSTANTIAL = EIDAS_LOA_PREFIX + "substantial";
+ public static final String EIDAS_LOA_HIGH = EIDAS_LOA_PREFIX + "high";
+
+ public static final String EIDAS_LOA_MATCHING_MINIMUM = "minimum";
+ public static final String EIDAS_LOA_MATCHING_EXACT = "exact";
+
+ // Austrian specific prefixes for pseudonyms of users
+ public static final String URN_PART_WBPK = "wbpk+";
+ public static final String URN_PART_EIDAS = "eidasid+";
+
+ public static final String URN_PREFIX = "urn:publicid:gv.at";
+ public static final String URN_PREFIX_BASEID = URN_PREFIX + ":baseid";
+ public static final String URN_PREFIX_CDID = URN_PREFIX + ":cdid+";
+ public static final String URN_PREFIX_BPK = URN_PREFIX_CDID + "bpk";
+ public static final String URN_PREFIX_WBPK = URN_PREFIX + ":" + URN_PART_WBPK;
+ public static final String URN_PREFIX_EIDAS = URN_PREFIX + ":" + URN_PART_EIDAS;
+ public static final String URN_PREFIX_OW_BPK = URN_PREFIX_CDID + "OW";
+
+ // Authentication process data_constants
+ public static final String UNIQUESESSIONIDENTIFIER = "eaaf_uniqueSessionIdentifier";
+ public static final String AUTH_DATA_CREATED = "eaaf_authdata_created";
+
+ public static final String PROCESS_ENGINE_PREFIX = "PARAMS_";
+ public static final String PROCESS_ENGINE_PENDINGREQUESTID = PROCESS_ENGINE_PREFIX
+ + PARAM_HTTP_TARGET_PENDINGREQUESTID;
+ public static final String PROCESS_ENGINE_SERVICE_PROVIDER_ENTITYID = PROCESS_ENGINE_PREFIX + "uniqueSPId";
+ public static final String PROCESS_ENGINE_SSL_CLIENT_CERTIFICATE = PROCESS_ENGINE_PREFIX + "holderofkey_cert";
+ public static final String PROCESS_ENGINE_REQUIRES_NO_POSTAUTH_REDIRECT = PROCESS_ENGINE_PREFIX
+ + "requireNoPostAuthRedirect";
+ public static final String PROCESSCONTEXT_SWITCH_LANGUAGE = "changeLanguage";
+
+ public static final int ALLOWED_TIME_JITTER = 5; // minutes
+ public static final String COUNTRYCODE_AUSTRIA = "AT";
+
+ public static final String TESTCREDENTIALROOTOID = "1.2.40.0.10.2.4.1";
+
+}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafEventCodes.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafEventCodes.java
new file mode 100644
index 00000000..74f79239
--- /dev/null
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/EaafEventCodes.java
@@ -0,0 +1,5 @@
+package at.gv.egiz.eaaf.core.api.data;
+
+public class EaafEventCodes {
+ public static final int PROCESS_STOPPED_BY_USER = 4102;
+}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExceptionContainer.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExceptionContainer.java
index 69268562..80c7094c 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExceptionContainer.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExceptionContainer.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
* cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
*
@@ -11,15 +11,12 @@
* 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.egiz.eaaf.core.api.data;
import java.io.Serializable;
@@ -27,6 +24,8 @@ import java.io.Serializable;
import at.gv.egiz.eaaf.core.api.IRequest;
/**
+ * AuthProcess exception containter for Front-Channel exception handling.
+ *
* @author tlenz
*
*/
@@ -36,9 +35,11 @@ public class ExceptionContainer implements Serializable {
private Throwable exceptionThrown = null;
private IRequest pendingReq = null;
-
/**
+ * Create an exception container.
*
+ * @param pendingReq Pending request that has an exception
+ * @param exception error
*/
public ExceptionContainer(final IRequest pendingReq, final Throwable exception) {
this.pendingReq = pendingReq;
@@ -47,6 +48,8 @@ public class ExceptionContainer implements Serializable {
}
/**
+ * Get the error.
+ *
* @return the exceptionThrown
*/
public Throwable getExceptionThrown() {
@@ -59,6 +62,8 @@ public class ExceptionContainer implements Serializable {
}
/**
+ * Get the unique sessionId for this error.
+ *
* @return the uniqueSessionID
*/
public String getUniqueSessionID() {
@@ -70,6 +75,8 @@ public class ExceptionContainer implements Serializable {
}
/**
+ * Get the unique transactionId for this error.
+ *
* @return the uniqueTransactionID
*/
public String getUniqueTransactionID() {
@@ -81,6 +88,8 @@ public class ExceptionContainer implements Serializable {
}
/**
+ * Get the service-provider identifier.
+ *
* @return the uniqueServiceProviderId
*/
public String getUniqueServiceProviderId() {
@@ -91,6 +100,4 @@ public class ExceptionContainer implements Serializable {
}
}
-
-
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExtendedPVPAttributeDefinitions.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExtendedPVPAttributeDefinitions.java
deleted file mode 100644
index b895ab7d..00000000
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExtendedPVPAttributeDefinitions.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************
- * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
- * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.2 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:
- * https://joinup.ec.europa.eu/news/understanding-eupl-v12
- *
- * 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.egiz.eaaf.core.api.data;
-
-public interface ExtendedPVPAttributeDefinitions extends PVPAttributeDefinitions {
-
- String SP_UNIQUEID_NAME = "urn:eidgvat:attributes.ServiceProviderUniqueId";
- String SP_UNIQUEID_FRIENDLY_NAME = "ServiceProvider-UniqueId";
-
- String SP_FRIENDLYNAME_NAME =
- "urn:eidgvat:attributes.ServiceProviderFriendlyName";
- String SP_FRIENDLYNAME_FRIENDLY_NAME = "ServiceProvider-FriendlyName";
-
- String SP_COUNTRYCODE_NAME =
- "urn:eidgvat:attributes.ServiceProviderCountryCode";
- String SP_COUNTRYCODE_FRIENDLY_NAME = "ServiceProvider-CountryCode";
-
- String SP_USESMANDATES_NAME =
- "urn:eidgvat:attributes.ServiceProviderMandateProfiles";
- String SP_USESMANDATES_FRIENDLY_NAME = "ServiceProvider-MandateProfiles";
-
- /* Attributes for E-ID */
- String EID_ENCRYPTED_SOURCEID_NAME = "urn:eidgvat:attributes.vsz.value";
- String EID_ENCRYPTED_SOURCEID_FRIENDLY_NAME = "vSZ";
-
- String EID_ENCRYPTED_SOURCEID_TYPE_NAME = "urn:eidgvat:attributes.vsz.type";
- String EID_ENCRYPTED_SOURCEID_TYPE_FRIENDLY_NAME = "vSZ-Type";
-
-
-}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExtendedPvpAttributeDefinitions.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExtendedPvpAttributeDefinitions.java
new file mode 100644
index 00000000..f5865067
--- /dev/null
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ExtendedPvpAttributeDefinitions.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
+ * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.2 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:
+ * https://joinup.ec.europa.eu/news/understanding-eupl-v12
+ *
+ * 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.egiz.eaaf.core.api.data;
+
+public interface ExtendedPvpAttributeDefinitions extends PvpAttributeDefinitions {
+
+ String SP_UNIQUEID_NAME = "urn:eidgvat:attributes.ServiceProviderUniqueId";
+ String SP_UNIQUEID_FRIENDLY_NAME = "ServiceProvider-UniqueId";
+
+ String SP_FRIENDLYNAME_NAME = "urn:eidgvat:attributes.ServiceProviderFriendlyName";
+ String SP_FRIENDLYNAME_FRIENDLY_NAME = "ServiceProvider-FriendlyName";
+
+ String SP_COUNTRYCODE_NAME = "urn:eidgvat:attributes.ServiceProviderCountryCode";
+ String SP_COUNTRYCODE_FRIENDLY_NAME = "ServiceProvider-CountryCode";
+
+ String SP_USESMANDATES_NAME = "urn:eidgvat:attributes.ServiceProviderMandateProfiles";
+ String SP_USESMANDATES_FRIENDLY_NAME = "ServiceProvider-MandateProfiles";
+
+ /* Attributes for E-ID */
+ String EID_ENCRYPTED_SOURCEID_NAME = "urn:eidgvat:attributes.vsz.value";
+ String EID_ENCRYPTED_SOURCEID_FRIENDLY_NAME = "vSZ";
+
+ String EID_ENCRYPTED_SOURCEID_TYPE_NAME = "urn:eidgvat:attributes.vsz.type";
+ String EID_ENCRYPTED_SOURCEID_TYPE_FRIENDLY_NAME = "vSZ-Type";
+
+}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ILoALevelMapper.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ILoALevelMapper.java
index 3abf39e7..91fb1bf7 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ILoALevelMapper.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/ILoALevelMapper.java
@@ -1,4 +1,4 @@
-/*******************************************************************************
+/*
* Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
* cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
*
@@ -11,42 +11,38 @@
* 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.egiz.eaaf.core.api.data;
public interface ILoALevelMapper {
/**
- * Map an arbitrary QAA level to eIDAS LoA
- *
- * @param qaa, but not null
+ * Map an arbitrary QAA level to eIDAS LoA.
+ *
+ * @param qaa but not null
* @return An eIDAS LoA if there is a mapping, otherwise null
*/
- String mapToeIDASLoA(String qaa);
+ String mapToEidasLoa(String qaa);
/**
- * Map an arbitrary QAA level to PVP SecClass
- *
- * @param qaa, but not null
+ * Map an arbitrary QAA level to PVP SecClass.
+ *
+ * @param qaa but not null
* @return A PVP SecClass if there is a mapping, otherwise null
*/
String mapToSecClass(String qaa);
-
/**
- * Map an an arbitrary eIDAS LoA to STORK QAA Level
- *
- * @param eidasqaaLevel
+ * Map an an arbitrary eIDAS LoA to STORK QAA Level.
+ *
+ * @param eidasqaaLevel eIDAS LoA for mapping
* @return A STORK QAA level
*/
@Deprecated
- String mapeIDASQAAToSTORKQAA(String eidasqaaLevel);
+ String mapEidasQaaToStorkQaa(String eidasqaaLevel);
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/PVPAttributeDefinitions.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/PVPAttributeDefinitions.java
deleted file mode 100644
index 7604299e..00000000
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/PVPAttributeDefinitions.java
+++ /dev/null
@@ -1,380 +0,0 @@
-/*******************************************************************************
- * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
- * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.2 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:
- * https://joinup.ec.europa.eu/news/understanding-eupl-v12
- *
- * 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.egiz.eaaf.core.api.data;
-
-public interface PVPAttributeDefinitions {
-
- String URN_OID_PREFIX = "urn:oid:";
-
- String PVP_VERSION_OID = "1.2.40.0.10.2.1.1.261.10";
- String PVP_VERSION_NAME = URN_OID_PREFIX + PVP_VERSION_OID;
- String PVP_VERSION_FRIENDLY_NAME = "PVP-VERSION";
- String PVP_VERSION_2_1 = "2.2";
-
-
- String SECCLASS_OID = "1.2.40.0.10.2.1.1.261.110";
- String SECCLASS_FRIENDLY_NAME = "SECCLASS";
- String SECCLASS_NAME = URN_OID_PREFIX + SECCLASS_OID;
- int SECCLASS_MAX_LENGTH = 128;
-
- String PRINCIPAL_NAME_OID = "1.2.40.0.10.2.1.1.261.20";
- String PRINCIPAL_NAME_NAME = URN_OID_PREFIX + PRINCIPAL_NAME_OID;
- String PRINCIPAL_NAME_FRIENDLY_NAME = "PRINCIPAL-NAME";
- int PRINCIPAL_NAME_MAX_LENGTH = 128;
-
- String GIVEN_NAME_OID = "2.5.4.42";
- String GIVEN_NAME_NAME = URN_OID_PREFIX + GIVEN_NAME_OID;
- String GIVEN_NAME_FRIENDLY_NAME = "GIVEN-NAME";
- int GIVEN_NAME_MAX_LENGTH = 128;
-
- String BIRTHDATE_OID = "1.2.40.0.10.2.1.1.55";
- String BIRTHDATE_NAME = URN_OID_PREFIX + BIRTHDATE_OID;
- String BIRTHDATE_FRIENDLY_NAME = "BIRTHDATE";
- String BIRTHDATE_FORMAT_PATTERN = "yyyy-MM-dd";
-
- String USERID_OID = "0.9.2342.19200300.100.1.1";
- String USERID_NAME = URN_OID_PREFIX + USERID_OID;
- String USERID_FRIENDLY_NAME = "USERID";
- int USERID_MAX_LENGTH = 128;
-
- String GID_OID = "1.2.40.0.10.2.1.1.1";
- String GID_NAME = URN_OID_PREFIX + GID_OID;
- String GID_FRIENDLY_NAME = "GID";
- int GID_MAX_LENGTH = 128;
-
- String BPK_OID = "1.2.40.0.10.2.1.1.149";
- String BPK_NAME = URN_OID_PREFIX + BPK_OID;
- String BPK_FRIENDLY_NAME = "BPK";
- int BPK_MAX_LENGTH = 1024;
- String BPK_R_PROFILE21_HEADER = "X-PVP-BPK";
-
- String BPK_LIST_OID = "1.2.40.0.10.2.1.1.261.28";
- String BPK_LIST_NAME = URN_OID_PREFIX + BPK_LIST_OID;
- String BPK_LIST_FRIENDLY_NAME = "BPK-LIST";
- int BPK_LIST_MAX_LENGTH = 32767;
-
- String ENC_BPK_LIST_OID = "1.2.40.0.10.2.1.1.261.22";
- String ENC_BPK_LIST_NAME = URN_OID_PREFIX + ENC_BPK_LIST_OID;
- String ENC_BPK_LIST_FRIENDLY_NAME = "ENC-BPK-LIST";
- int ENC_BPK_LIST_MAX_LENGTH = 32767;
-
- String MAIL_OID = "0.9.2342.19200300.100.1.3";
- String MAIL_NAME = URN_OID_PREFIX + MAIL_OID;
- String MAIL_FRIENDLY_NAME = "MAIL";
- int MAIL_MAX_LENGTH = 128;
-
- String TEL_OID = "2.5.4.20";
- String TEL_NAME = URN_OID_PREFIX + TEL_OID;
- String TEL_FRIENDLY_NAME = "TEL";
- int TEL_MAX_LENGTH = 32;
-
- String PARTICIPANT_ID_OID = "1.2.40.0.10.2.1.1.71";
- String PARTICIPANT_ID_NAME = URN_OID_PREFIX + PARTICIPANT_ID_OID;
- String PARTICIPANT_ID_FRIENDLY_NAME = "PARTICIPANT-ID";
- int PARTICIPANT_MAX_LENGTH = 39;
-
- String PARTICIPANT_OKZ_OID = "1.2.40.0.10.2.1.1.261.24";
- String PARTICIPANT_OKZ_NAME = URN_OID_PREFIX + PARTICIPANT_OKZ_OID;
- String PARTICIPANT_OKZ_FRIENDLY_NAME = "PARTICIPANT-OKZ";
- int PARTICIPANT_OKZ_MAX_LENGTH = 32;
-
- String OU_OKZ_OID = "1.2.40.0.10.2.1.1.153";
- String OU_OKZ_NAME = URN_OID_PREFIX + OU_OKZ_OID;
- int OU_OKZ_MAX_LENGTH = 32;
-
- String OU_GV_OU_ID_OID = "1.2.40.0.10.2.1.1.3";
- String OU_GV_OU_ID_NAME = URN_OID_PREFIX + OU_GV_OU_ID_OID;
- String OU_GV_OU_ID_FRIENDLY_NAME = "OU-GV-OU-ID";
- int OU_GV_OU_ID_MAX_LENGTH = 39;
-
- String OU_OID = "2.5.4.11";
- String OU_NAME = URN_OID_PREFIX + OU_OID;
- String OU_FRIENDLY_NAME = "OU";
- int OU_MAX_LENGTH = 64;
-
- String FUNCTION_OID = "1.2.40.0.10.2.1.1.33";
- String FUNCTION_NAME = URN_OID_PREFIX + FUNCTION_OID;
- String FUNCTION_FRIENDLY_NAME = "FUNCTION";
- int FUNCTION_MAX_LENGTH = 32;
-
- String ROLES_OID = "1.2.40.0.10.2.1.1.261.30";
- String ROLES_NAME = URN_OID_PREFIX + ROLES_OID;
- String ROLES_FRIENDLY_NAME = "ROLES";
- int ROLES_MAX_LENGTH = 32767;
-
- @Deprecated
- String EID_CITIZEN_QAA_LEVEL_OID = "1.2.40.0.10.2.1.1.261.94";
- @Deprecated
- String EID_CITIZEN_QAA_LEVEL_NAME =
- URN_OID_PREFIX + EID_CITIZEN_QAA_LEVEL_OID;
- @Deprecated
- String EID_CITIZEN_QAA_LEVEL_FRIENDLY_NAME = "EID-CITIZEN-QAA-LEVEL";
-
- String EID_CITIZEN_EIDAS_QAA_LEVEL_OID = "1.2.40.0.10.2.1.1.261.108";
- String EID_CITIZEN_EIDAS_QAA_LEVEL_NAME =
- URN_OID_PREFIX + EID_CITIZEN_EIDAS_QAA_LEVEL_OID;
- String EID_CITIZEN_EIDAS_QAA_LEVEL_FRIENDLY_NAME =
- "EID-CITIZEN-QAA-EIDAS-LEVEL";
-
- String EID_IDENTITY_STATUS_LEVEL_OID = "1.2.40.0.10.2.1.1.261.109";
- String EID_IDENTITY_STATUS_LEVEL_NAME =
- URN_OID_PREFIX + EID_IDENTITY_STATUS_LEVEL_OID;
- String EID_IDENTITY_STATUS_LEVEL_FRIENDLY_NAME = "EID-IDENTITY-STATUS-LEVEL";
-
- enum EID_IDENTITY_STATUS_LEVEL_VALUES {
- IDENTITY("http://eid.gv.at/eID/status/identity"), TESTIDENTITY(
- "http://eid.gv.at/eID/status/testidentity"), SYSTEM("http://eid.gv.at/eID/status/system");
-
- private final String uri;
-
- EID_IDENTITY_STATUS_LEVEL_VALUES(final String uri) {
- this.uri = uri;
- }
-
- /**
- * Get the URI based status identifier of an E-ID
- *
- * @return
- */
- public String getURI() {
- return this.uri;
- }
- }
-
- String EID_ISSUING_NATION_OID = "1.2.40.0.10.2.1.1.261.32";
- String EID_ISSUING_NATION_NAME = URN_OID_PREFIX + EID_ISSUING_NATION_OID;
- String EID_ISSUING_NATION_FRIENDLY_NAME = "EID-ISSUING-NATION";
- int EID_ISSUING_NATION_MAX_LENGTH = 2;
-
- String EID_SECTOR_FOR_IDENTIFIER_OID = "1.2.40.0.10.2.1.1.261.34";
- String EID_SECTOR_FOR_IDENTIFIER_NAME =
- URN_OID_PREFIX + EID_SECTOR_FOR_IDENTIFIER_OID;
- String EID_SECTOR_FOR_IDENTIFIER_FRIENDLY_NAME = "EID-SECTOR-FOR-IDENTIFIER";
- int EID_SECTOR_FOR_IDENTIFIER_MAX_LENGTH = 255;
-
- @Deprecated
- String EID_SOURCE_PIN_OID = "1.2.40.0.10.2.1.1.261.36";
- @Deprecated
- String EID_SOURCE_PIN_NAME = URN_OID_PREFIX + EID_SOURCE_PIN_OID;
- @Deprecated
- String EID_SOURCE_PIN_FRIENDLY_NAME = "EID-SOURCE-PIN";
- @Deprecated
- int EID_SOURCE_PIN_MAX_LENGTH = 128;
-
- @Deprecated
- String EID_SOURCE_PIN_TYPE_OID = "1.2.40.0.10.2.1.1.261.104";
- @Deprecated
- String EID_SOURCE_PIN_TYPE_NAME = URN_OID_PREFIX + EID_SOURCE_PIN_TYPE_OID;
- @Deprecated
- String EID_SOURCE_PIN_TYPE_FRIENDLY_NAME = "EID-SOURCE-PIN-TYPE";
- @Deprecated
- int EID_SOURCE_PIN_TYPE_MAX_LENGTH = 128;
-
- @Deprecated
- String EID_IDENTITY_LINK_OID = "1.2.40.0.10.2.1.1.261.38";
- @Deprecated
- String EID_IDENTITY_LINK_NAME = URN_OID_PREFIX + EID_IDENTITY_LINK_OID;
- @Deprecated
- String EID_IDENTITY_LINK_FRIENDLY_NAME = "EID-IDENTITY-LINK";
- @Deprecated
- int EID_IDENTITY_LINK_MAX_LENGTH = 32767;
-
- String EID_E_ID_TOKEN_OID = "1.2.40.0.10.2.1.1.261.39";
- String EID_E_ID_TOKEN_NAME = URN_OID_PREFIX + EID_E_ID_TOKEN_OID;
- String EID_E_ID_TOKEN_FRIENDLY_NAME = "EID-E-ID-TOKEN";
- int EID_E_ID_TOKEN_MAX_LENGTH = 32767;
-
- @Deprecated
- String EID_AUTH_BLOCK_OID = "1.2.40.0.10.2.1.1.261.62";
- @Deprecated
- String EID_AUTH_BLOCK_NAME = URN_OID_PREFIX + EID_AUTH_BLOCK_OID;
- @Deprecated
- String EID_AUTH_BLOCK_FRIENDLY_NAME = "EID-AUTH-BLOCK";
- @Deprecated
- int EID_AUTH_BLOCK_MAX_LENGTH = 32767;
-
- String EID_CCS_URL_OID = "1.2.40.0.10.2.1.1.261.64";
- String EID_CCS_URL_NAME = URN_OID_PREFIX + EID_CCS_URL_OID;
- String EID_CCS_URL_FRIENDLY_NAME = "EID-CCS-URL";
- int EID_CCS_URL_MAX_LENGTH = 1024;
-
- String EID_SIGNER_CERTIFICATE_OID = "1.2.40.0.10.2.1.1.261.66";
- String EID_SIGNER_CERTIFICATE_NAME =
- URN_OID_PREFIX + EID_SIGNER_CERTIFICATE_OID;
- String EID_SIGNER_CERTIFICATE_FRIENDLY_NAME = "EID-SIGNER-CERTIFICATE";
- int EID_SIGNER_CERTIFICATE_MAX_LENGTH = 32767;
-
- @Deprecated
- String EID_STORK_TOKEN_OID = "1.2.40.0.10.2.1.1.261.96";
- @Deprecated
- String EID_STORK_TOKEN_NAME = URN_OID_PREFIX + EID_STORK_TOKEN_OID;
- @Deprecated
- String EID_STORK_TOKEN_FRIENDLY_NAME = "EID-STORK-TOKEN";
- @Deprecated
- int EID_STORK_TOKEN_MAX_LENGTH = 32767;
-
- String MANDATE_TYPE_OID = "1.2.40.0.10.2.1.1.261.68";
- String MANDATE_TYPE_NAME = URN_OID_PREFIX + MANDATE_TYPE_OID;
- String MANDATE_TYPE_FRIENDLY_NAME = "MANDATE-TYPE";
- int MANDATE_TYPE_MAX_LENGTH = 256;
-
- String MANDATE_TYPE_OID_OID = "1.2.40.0.10.2.1.1.261.106";
- String MANDATE_TYPE_OID_NAME = URN_OID_PREFIX + MANDATE_TYPE_OID_OID;
- String MANDATE_TYPE_OID_FRIENDLY_NAME = "MANDATE-TYPE-OID";
- int MANDATE_TYPE_OID_MAX_LENGTH = 256;
-
- @Deprecated
- String MANDATE_NAT_PER_SOURCE_PIN_OID = "1.2.40.0.10.2.1.1.261.70";
- @Deprecated
- String MANDATE_NAT_PER_SOURCE_PIN_NAME =
- URN_OID_PREFIX + MANDATE_NAT_PER_SOURCE_PIN_OID;
- @Deprecated
- String MANDATE_NAT_PER_SOURCE_PIN_FRIENDLY_NAME =
- "MANDATOR-NATURAL-PERSON-SOURCE-PIN";
- @Deprecated
- int MANDATE_NAT_PER_SOURCE_PIN_MAX_LENGTH = 128;
-
- String MANDATE_LEG_PER_SOURCE_PIN_OID = "1.2.40.0.10.2.1.1.261.100";
- String MANDATE_LEG_PER_SOURCE_PIN_NAME =
- URN_OID_PREFIX + MANDATE_LEG_PER_SOURCE_PIN_OID;
- String MANDATE_LEG_PER_SOURCE_PIN_FRIENDLY_NAME =
- "MANDATOR-LEGAL-PERSON-SOURCE-PIN";
- int MANDATE_LEG_PER_SOURCE_PIN_MAX_LENGTH = 128;
-
- @Deprecated
- String MANDATE_NAT_PER_SOURCE_PIN_TYPE_OID = "1.2.40.0.10.2.1.1.261.102";
- @Deprecated
- String MANDATE_NAT_PER_SOURCE_PIN_TYPE_NAME =
- URN_OID_PREFIX + MANDATE_NAT_PER_SOURCE_PIN_TYPE_OID;
- @Deprecated
- String MANDATE_NAT_PER_SOURCE_PIN_TYPE_FRIENDLY_NAME =
- "MANDATOR-NATURAL-PERSON-SOURCE-PIN-TYPE";
- @Deprecated
- int MANDATE_NAT_PER_SOURCE_PIN_TYPE_MAX_LENGTH = 128;
-
- String MANDATE_LEG_PER_SOURCE_PIN_TYPE_OID = "1.2.40.0.10.2.1.1.261.76";
- String MANDATE_LEG_PER_SOURCE_PIN_TYPE_NAME =
- URN_OID_PREFIX + MANDATE_LEG_PER_SOURCE_PIN_TYPE_OID;
- String MANDATE_LEG_PER_SOURCE_PIN_TYPE_FRIENDLY_NAME =
- "MANDATOR-LEGAL-PERSON-SOURCE-PIN-TYPE";
- int MANDATE_LEG_PER_SOURCE_PIN_TYPE_MAX_LENGTH = 128;
-
- String MANDATE_NAT_PER_BPK_OID = "1.2.40.0.10.2.1.1.261.98";
- String MANDATE_NAT_PER_BPK_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_BPK_OID;
- String MANDATE_NAT_PER_BPK_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-BPK";
- int MANDATE_NAT_PER_BPK_MAX_LENGTH = 1024;
-
- String MANDATE_NAT_PER_BPK_LIST_OID = "1.2.40.0.10.2.1.1.261.73";
- String MANDATE_NAT_PER_BPK_LIST_NAME =
- URN_OID_PREFIX + MANDATE_NAT_PER_BPK_LIST_OID;
- String MANDATE_NAT_PER_BPK_LIST_FRIENDLY_NAME =
- "MANDATOR-NATURAL-PERSON-BPK-LIST";
- int MANDATE_NAT_PER_ENC_LIST_MAX_LENGTH = 32767;
-
- String MANDATE_NAT_PER_ENC_BPK_LIST_OID = "1.2.40.0.10.2.1.1.261.72";
- String MANDATE_NAT_PER_ENC_BPK_LIST_NAME =
- URN_OID_PREFIX + MANDATE_NAT_PER_ENC_BPK_LIST_OID;
- String MANDATE_NAT_PER_ENC_BPK_LIST_FRIENDLY_NAME =
- "MANDATOR-NATURAL-PERSON-ENC-BPK-LIST";
- int MANDATE_NAT_PER_ENC_BPK_LIST_MAX_LENGTH = 32767;
-
- String MANDATE_NAT_PER_GIVEN_NAME_OID = "1.2.40.0.10.2.1.1.261.78";
- String MANDATE_NAT_PER_GIVEN_NAME_NAME =
- URN_OID_PREFIX + MANDATE_NAT_PER_GIVEN_NAME_OID;
- String MANDATE_NAT_PER_GIVEN_NAME_FRIENDLY_NAME =
- "MANDATOR-NATURAL-PERSON-GIVEN-NAME";
- int MANDATE_NAT_PER_GIVEN_NAME_MAX_LENGTH = 128;
-
- String MANDATE_NAT_PER_FAMILY_NAME_OID = "1.2.40.0.10.2.1.1.261.80";
- String MANDATE_NAT_PER_FAMILY_NAME_NAME =
- URN_OID_PREFIX + MANDATE_NAT_PER_FAMILY_NAME_OID;
- String MANDATE_NAT_PER_FAMILY_NAME_FRIENDLY_NAME =
- "MANDATOR-NATURAL-PERSON-FAMILY-NAME";
- int MANDATE_NAT_PER_FAMILY_NAME_MAX_LENGTH = 128;
-
- String MANDATE_NAT_PER_BIRTHDATE_OID = "1.2.40.0.10.2.1.1.261.82";
- String MANDATE_NAT_PER_BIRTHDATE_NAME =
- URN_OID_PREFIX + MANDATE_NAT_PER_BIRTHDATE_OID;
- String MANDATE_NAT_PER_BIRTHDATE_FRIENDLY_NAME =
- "MANDATOR-NATURAL-PERSON-BIRTHDATE";
- String MANDATE_NAT_PER_BIRTHDATE_FORMAT_PATTERN = BIRTHDATE_FORMAT_PATTERN;
-
- String MANDATE_LEG_PER_FULL_NAME_OID = "1.2.40.0.10.2.1.1.261.84";
- String MANDATE_LEG_PER_FULL_NAME_NAME =
- URN_OID_PREFIX + MANDATE_LEG_PER_FULL_NAME_OID;
- String MANDATE_LEG_PER_FULL_NAME_FRIENDLY_NAME =
- "MANDATOR-LEGAL-PERSON-FULL-NAME";
- int MANDATE_LEG_PER_FULL_NAME_MAX_LENGTH = 256;
-
- String MANDATE_PROF_REP_OID_OID = "1.2.40.0.10.2.1.1.261.86";
- String MANDATE_PROF_REP_OID_NAME = URN_OID_PREFIX + MANDATE_PROF_REP_OID_OID;
- String MANDATE_PROF_REP_OID_FRIENDLY_NAME = "MANDATE-PROF-REP-OID";
- int MANDATE_PROF_REP_OID_MAX_LENGTH = 256;
-
- String MANDATE_PROF_REP_DESC_OID = "1.2.40.0.10.2.1.1.261.88";
- String MANDATE_PROF_REP_DESC_NAME =
- URN_OID_PREFIX + MANDATE_PROF_REP_DESC_OID;
- String MANDATE_PROF_REP_DESC_FRIENDLY_NAME = "MANDATE-PROF-REP-DESCRIPTION";
- int MANDATE_PROF_REP_DESC_MAX_LENGTH = 1024;
-
- String MANDATE_REFERENCE_VALUE_OID = "1.2.40.0.10.2.1.1.261.90";
- String MANDATE_REFERENCE_VALUE_NAME =
- URN_OID_PREFIX + MANDATE_REFERENCE_VALUE_OID;
- String MANDATE_REFERENCE_VALUE_FRIENDLY_NAME = "MANDATE-REFERENCE-VALUE";
- int MANDATE_REFERENCE_VALUE_MAX_LENGTH = 100;
-
- String MANDATE_IDENTIFIER_OID = "1.2.40.0.10.2.1.1.261.91";
- String MANDATE_IDENTIFIER_FRIENDLY_NAME = "MANDATE-IDENTIFIER";
- String MANDATE_IDENTIFIER_NAME = URN_OID_PREFIX + MANDATE_IDENTIFIER_OID;
- int MANDATE_IDENTIFIER_MAX_LENGTH = 256;
-
-
- @Deprecated
- String MANDATE_FULL_MANDATE_OID = "1.2.40.0.10.2.1.1.261.92";
- @Deprecated
- String MANDATE_FULL_MANDATE_NAME = URN_OID_PREFIX + MANDATE_FULL_MANDATE_OID;
- @Deprecated
- String MANDATE_FULL_MANDATE_FRIENDLY_NAME = "MANDATE-FULL-MANDATE";
- @Deprecated
- int MANDATE_FULL_MANDATE_MAX_LENGTH = 32767;
-
- String INVOICE_RECPT_ID_OID = "1.2.40.0.10.2.1.1.261.40";
- String INVOICE_RECPT_ID_NAME = URN_OID_PREFIX + INVOICE_RECPT_ID_OID;
- String INVOICE_RECPT_ID_FRIENDLY_NAME = "INVOICE-RECPT-ID";
- int INVOICE_RECPT_ID_MAX_LENGTH = 64;
-
- String COST_CENTER_ID_OID = "1.2.40.0.10.2.1.1.261.50";
- String COST_CENTER_ID_NAME = URN_OID_PREFIX + COST_CENTER_ID_OID;
- String COST_CENTER_ID_FRIENDLY_NAME = "COST-CENTER-ID";
- int COST_CENTER_ID_MAX_LENGTH = 32767;
-
- String CHARGE_CODE_OID = "1.2.40.0.10.2.1.1.261.60";
- String CHARGE_CODE_NAME = URN_OID_PREFIX + CHARGE_CODE_OID;
- String CHARGE_CODE_FRIENDLY_NAME = "CHARGE-CODE";
- int CHARGE_CODE_MAX_LENGTH = 32767;
-
- String PVP_HOLDEROFKEY_OID = "1.2.40.0.10.2.1.1.261.xx.xx";
- String PVP_HOLDEROFKEY_NAME = URN_OID_PREFIX + PVP_HOLDEROFKEY_OID;
- String PVP_HOLDEROFKEY_FRIENDLY_NAME = "HOLDER-OF-KEY-CERTIFICATE";
-
-}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/PvpAttributeDefinitions.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/PvpAttributeDefinitions.java
new file mode 100644
index 00000000..2a9a8317
--- /dev/null
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/PvpAttributeDefinitions.java
@@ -0,0 +1,347 @@
+/*
+ * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
+ * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.2 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:
+ * https://joinup.ec.europa.eu/news/understanding-eupl-v12
+ *
+ * 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.egiz.eaaf.core.api.data;
+
+public interface PvpAttributeDefinitions {
+
+ String URN_OID_PREFIX = "urn:oid:";
+
+ String PVP_VERSION_OID = "1.2.40.0.10.2.1.1.261.10";
+ String PVP_VERSION_NAME = URN_OID_PREFIX + PVP_VERSION_OID;
+ String PVP_VERSION_FRIENDLY_NAME = "PVP-VERSION";
+ String PVP_VERSION_2_1 = "2.2";
+
+ String SECCLASS_OID = "1.2.40.0.10.2.1.1.261.110";
+ String SECCLASS_FRIENDLY_NAME = "SECCLASS";
+ String SECCLASS_NAME = URN_OID_PREFIX + SECCLASS_OID;
+ int SECCLASS_MAX_LENGTH = 128;
+
+ String PRINCIPAL_NAME_OID = "1.2.40.0.10.2.1.1.261.20";
+ String PRINCIPAL_NAME_NAME = URN_OID_PREFIX + PRINCIPAL_NAME_OID;
+ String PRINCIPAL_NAME_FRIENDLY_NAME = "PRINCIPAL-NAME";
+ int PRINCIPAL_NAME_MAX_LENGTH = 128;
+
+ String GIVEN_NAME_OID = "2.5.4.42";
+ String GIVEN_NAME_NAME = URN_OID_PREFIX + GIVEN_NAME_OID;
+ String GIVEN_NAME_FRIENDLY_NAME = "GIVEN-NAME";
+ int GIVEN_NAME_MAX_LENGTH = 128;
+
+ String BIRTHDATE_OID = "1.2.40.0.10.2.1.1.55";
+ String BIRTHDATE_NAME = URN_OID_PREFIX + BIRTHDATE_OID;
+ String BIRTHDATE_FRIENDLY_NAME = "BIRTHDATE";
+ String BIRTHDATE_FORMAT_PATTERN = "yyyy-MM-dd";
+
+ String USERID_OID = "0.9.2342.19200300.100.1.1";
+ String USERID_NAME = URN_OID_PREFIX + USERID_OID;
+ String USERID_FRIENDLY_NAME = "USERID";
+ int USERID_MAX_LENGTH = 128;
+
+ String GID_OID = "1.2.40.0.10.2.1.1.1";
+ String GID_NAME = URN_OID_PREFIX + GID_OID;
+ String GID_FRIENDLY_NAME = "GID";
+ int GID_MAX_LENGTH = 128;
+
+ String BPK_OID = "1.2.40.0.10.2.1.1.149";
+ String BPK_NAME = URN_OID_PREFIX + BPK_OID;
+ String BPK_FRIENDLY_NAME = "BPK";
+ int BPK_MAX_LENGTH = 1024;
+ String BPK_R_PROFILE21_HEADER = "X-PVP-BPK";
+
+ String BPK_LIST_OID = "1.2.40.0.10.2.1.1.261.28";
+ String BPK_LIST_NAME = URN_OID_PREFIX + BPK_LIST_OID;
+ String BPK_LIST_FRIENDLY_NAME = "BPK-LIST";
+ int BPK_LIST_MAX_LENGTH = 32767;
+
+ String ENC_BPK_LIST_OID = "1.2.40.0.10.2.1.1.261.22";
+ String ENC_BPK_LIST_NAME = URN_OID_PREFIX + ENC_BPK_LIST_OID;
+ String ENC_BPK_LIST_FRIENDLY_NAME = "ENC-BPK-LIST";
+ int ENC_BPK_LIST_MAX_LENGTH = 32767;
+
+ String MAIL_OID = "0.9.2342.19200300.100.1.3";
+ String MAIL_NAME = URN_OID_PREFIX + MAIL_OID;
+ String MAIL_FRIENDLY_NAME = "MAIL";
+ int MAIL_MAX_LENGTH = 128;
+
+ String TEL_OID = "2.5.4.20";
+ String TEL_NAME = URN_OID_PREFIX + TEL_OID;
+ String TEL_FRIENDLY_NAME = "TEL";
+ int TEL_MAX_LENGTH = 32;
+
+ String PARTICIPANT_ID_OID = "1.2.40.0.10.2.1.1.71";
+ String PARTICIPANT_ID_NAME = URN_OID_PREFIX + PARTICIPANT_ID_OID;
+ String PARTICIPANT_ID_FRIENDLY_NAME = "PARTICIPANT-ID";
+ int PARTICIPANT_MAX_LENGTH = 39;
+
+ String PARTICIPANT_OKZ_OID = "1.2.40.0.10.2.1.1.261.24";
+ String PARTICIPANT_OKZ_NAME = URN_OID_PREFIX + PARTICIPANT_OKZ_OID;
+ String PARTICIPANT_OKZ_FRIENDLY_NAME = "PARTICIPANT-OKZ";
+ int PARTICIPANT_OKZ_MAX_LENGTH = 32;
+
+ String OU_OKZ_OID = "1.2.40.0.10.2.1.1.153";
+ String OU_OKZ_NAME = URN_OID_PREFIX + OU_OKZ_OID;
+ int OU_OKZ_MAX_LENGTH = 32;
+
+ String OU_GV_OU_ID_OID = "1.2.40.0.10.2.1.1.3";
+ String OU_GV_OU_ID_NAME = URN_OID_PREFIX + OU_GV_OU_ID_OID;
+ String OU_GV_OU_ID_FRIENDLY_NAME = "OU-GV-OU-ID";
+ int OU_GV_OU_ID_MAX_LENGTH = 39;
+
+ String OU_OID = "2.5.4.11";
+ String OU_NAME = URN_OID_PREFIX + OU_OID;
+ String OU_FRIENDLY_NAME = "OU";
+ int OU_MAX_LENGTH = 64;
+
+ String FUNCTION_OID = "1.2.40.0.10.2.1.1.33";
+ String FUNCTION_NAME = URN_OID_PREFIX + FUNCTION_OID;
+ String FUNCTION_FRIENDLY_NAME = "FUNCTION";
+ int FUNCTION_MAX_LENGTH = 32;
+
+ String ROLES_OID = "1.2.40.0.10.2.1.1.261.30";
+ String ROLES_NAME = URN_OID_PREFIX + ROLES_OID;
+ String ROLES_FRIENDLY_NAME = "ROLES";
+ int ROLES_MAX_LENGTH = 32767;
+
+ @Deprecated
+ String EID_CITIZEN_QAA_LEVEL_OID = "1.2.40.0.10.2.1.1.261.94";
+ @Deprecated
+ String EID_CITIZEN_QAA_LEVEL_NAME = URN_OID_PREFIX + EID_CITIZEN_QAA_LEVEL_OID;
+ @Deprecated
+ String EID_CITIZEN_QAA_LEVEL_FRIENDLY_NAME = "EID-CITIZEN-QAA-LEVEL";
+
+ String EID_CITIZEN_EIDAS_QAA_LEVEL_OID = "1.2.40.0.10.2.1.1.261.108";
+ String EID_CITIZEN_EIDAS_QAA_LEVEL_NAME = URN_OID_PREFIX + EID_CITIZEN_EIDAS_QAA_LEVEL_OID;
+ String EID_CITIZEN_EIDAS_QAA_LEVEL_FRIENDLY_NAME = "EID-CITIZEN-QAA-EIDAS-LEVEL";
+
+ String EID_IDENTITY_STATUS_LEVEL_OID = "1.2.40.0.10.2.1.1.261.109";
+ String EID_IDENTITY_STATUS_LEVEL_NAME = URN_OID_PREFIX + EID_IDENTITY_STATUS_LEVEL_OID;
+ String EID_IDENTITY_STATUS_LEVEL_FRIENDLY_NAME = "EID-IDENTITY-STATUS-LEVEL";
+
+ enum EidIdentityStatusLevelValues {
+ IDENTITY("http://eid.gv.at/eID/status/identity"), TESTIDENTITY("http://eid.gv.at/eID/status/testidentity"),
+ SYSTEM("http://eid.gv.at/eID/status/system");
+
+ private String uri;
+
+ EidIdentityStatusLevelValues(final String uri) {
+ this.uri = uri;
+ }
+
+ /**
+ * Get the URI based status identifier of an E-ID.
+ *
+ * @return
+ */
+ public String getUri() {
+ return this.uri;
+ }
+ }
+
+ String EID_ISSUING_NATION_OID = "1.2.40.0.10.2.1.1.261.32";
+ String EID_ISSUING_NATION_NAME = URN_OID_PREFIX + EID_ISSUING_NATION_OID;
+ String EID_ISSUING_NATION_FRIENDLY_NAME = "EID-ISSUING-NATION";
+ int EID_ISSUING_NATION_MAX_LENGTH = 2;
+
+ String EID_SECTOR_FOR_IDENTIFIER_OID = "1.2.40.0.10.2.1.1.261.34";
+ String EID_SECTOR_FOR_IDENTIFIER_NAME = URN_OID_PREFIX + EID_SECTOR_FOR_IDENTIFIER_OID;
+ String EID_SECTOR_FOR_IDENTIFIER_FRIENDLY_NAME = "EID-SECTOR-FOR-IDENTIFIER";
+ int EID_SECTOR_FOR_IDENTIFIER_MAX_LENGTH = 255;
+
+ @Deprecated
+ String EID_SOURCE_PIN_OID = "1.2.40.0.10.2.1.1.261.36";
+ @Deprecated
+ String EID_SOURCE_PIN_NAME = URN_OID_PREFIX + EID_SOURCE_PIN_OID;
+ @Deprecated
+ String EID_SOURCE_PIN_FRIENDLY_NAME = "EID-SOURCE-PIN";
+ @Deprecated
+ int EID_SOURCE_PIN_MAX_LENGTH = 128;
+
+ @Deprecated
+ String EID_SOURCE_PIN_TYPE_OID = "1.2.40.0.10.2.1.1.261.104";
+ @Deprecated
+ String EID_SOURCE_PIN_TYPE_NAME = URN_OID_PREFIX + EID_SOURCE_PIN_TYPE_OID;
+ @Deprecated
+ String EID_SOURCE_PIN_TYPE_FRIENDLY_NAME = "EID-SOURCE-PIN-TYPE";
+ @Deprecated
+ int EID_SOURCE_PIN_TYPE_MAX_LENGTH = 128;
+
+ @Deprecated
+ String EID_IDENTITY_LINK_OID = "1.2.40.0.10.2.1.1.261.38";
+ @Deprecated
+ String EID_IDENTITY_LINK_NAME = URN_OID_PREFIX + EID_IDENTITY_LINK_OID;
+ @Deprecated
+ String EID_IDENTITY_LINK_FRIENDLY_NAME = "EID-IDENTITY-LINK";
+ @Deprecated
+ int EID_IDENTITY_LINK_MAX_LENGTH = 32767;
+
+ String EID_E_ID_TOKEN_OID = "1.2.40.0.10.2.1.1.261.39";
+ String EID_E_ID_TOKEN_NAME = URN_OID_PREFIX + EID_E_ID_TOKEN_OID;
+ String EID_E_ID_TOKEN_FRIENDLY_NAME = "EID-E-ID-TOKEN";
+ int EID_E_ID_TOKEN_MAX_LENGTH = 32767;
+
+ @Deprecated
+ String EID_AUTH_BLOCK_OID = "1.2.40.0.10.2.1.1.261.62";
+ @Deprecated
+ String EID_AUTH_BLOCK_NAME = URN_OID_PREFIX + EID_AUTH_BLOCK_OID;
+ @Deprecated
+ String EID_AUTH_BLOCK_FRIENDLY_NAME = "EID-AUTH-BLOCK";
+ @Deprecated
+ int EID_AUTH_BLOCK_MAX_LENGTH = 32767;
+
+ String EID_CCS_URL_OID = "1.2.40.0.10.2.1.1.261.64";
+ String EID_CCS_URL_NAME = URN_OID_PREFIX + EID_CCS_URL_OID;
+ String EID_CCS_URL_FRIENDLY_NAME = "EID-CCS-URL";
+ int EID_CCS_URL_MAX_LENGTH = 1024;
+
+ String EID_SIGNER_CERTIFICATE_OID = "1.2.40.0.10.2.1.1.261.66";
+ String EID_SIGNER_CERTIFICATE_NAME = URN_OID_PREFIX + EID_SIGNER_CERTIFICATE_OID;
+ String EID_SIGNER_CERTIFICATE_FRIENDLY_NAME = "EID-SIGNER-CERTIFICATE";
+ int EID_SIGNER_CERTIFICATE_MAX_LENGTH = 32767;
+
+ @Deprecated
+ String EID_STORK_TOKEN_OID = "1.2.40.0.10.2.1.1.261.96";
+ @Deprecated
+ String EID_STORK_TOKEN_NAME = URN_OID_PREFIX + EID_STORK_TOKEN_OID;
+ @Deprecated
+ String EID_STORK_TOKEN_FRIENDLY_NAME = "EID-STORK-TOKEN";
+ @Deprecated
+ int EID_STORK_TOKEN_MAX_LENGTH = 32767;
+
+ String MANDATE_TYPE_OID = "1.2.40.0.10.2.1.1.261.68";
+ String MANDATE_TYPE_NAME = URN_OID_PREFIX + MANDATE_TYPE_OID;
+ String MANDATE_TYPE_FRIENDLY_NAME = "MANDATE-TYPE";
+ int MANDATE_TYPE_MAX_LENGTH = 256;
+
+ String MANDATE_TYPE_OID_OID = "1.2.40.0.10.2.1.1.261.106";
+ String MANDATE_TYPE_OID_NAME = URN_OID_PREFIX + MANDATE_TYPE_OID_OID;
+ String MANDATE_TYPE_OID_FRIENDLY_NAME = "MANDATE-TYPE-OID";
+ int MANDATE_TYPE_OID_MAX_LENGTH = 256;
+
+ @Deprecated
+ String MANDATE_NAT_PER_SOURCE_PIN_OID = "1.2.40.0.10.2.1.1.261.70";
+ @Deprecated
+ String MANDATE_NAT_PER_SOURCE_PIN_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_SOURCE_PIN_OID;
+ @Deprecated
+ String MANDATE_NAT_PER_SOURCE_PIN_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-SOURCE-PIN";
+ @Deprecated
+ int MANDATE_NAT_PER_SOURCE_PIN_MAX_LENGTH = 128;
+
+ String MANDATE_LEG_PER_SOURCE_PIN_OID = "1.2.40.0.10.2.1.1.261.100";
+ String MANDATE_LEG_PER_SOURCE_PIN_NAME = URN_OID_PREFIX + MANDATE_LEG_PER_SOURCE_PIN_OID;
+ String MANDATE_LEG_PER_SOURCE_PIN_FRIENDLY_NAME = "MANDATOR-LEGAL-PERSON-SOURCE-PIN";
+ int MANDATE_LEG_PER_SOURCE_PIN_MAX_LENGTH = 128;
+
+ @Deprecated
+ String MANDATE_NAT_PER_SOURCE_PIN_TYPE_OID = "1.2.40.0.10.2.1.1.261.102";
+ @Deprecated
+ String MANDATE_NAT_PER_SOURCE_PIN_TYPE_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_SOURCE_PIN_TYPE_OID;
+ @Deprecated
+ String MANDATE_NAT_PER_SOURCE_PIN_TYPE_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-SOURCE-PIN-TYPE";
+ @Deprecated
+ int MANDATE_NAT_PER_SOURCE_PIN_TYPE_MAX_LENGTH = 128;
+
+ String MANDATE_LEG_PER_SOURCE_PIN_TYPE_OID = "1.2.40.0.10.2.1.1.261.76";
+ String MANDATE_LEG_PER_SOURCE_PIN_TYPE_NAME = URN_OID_PREFIX + MANDATE_LEG_PER_SOURCE_PIN_TYPE_OID;
+ String MANDATE_LEG_PER_SOURCE_PIN_TYPE_FRIENDLY_NAME = "MANDATOR-LEGAL-PERSON-SOURCE-PIN-TYPE";
+ int MANDATE_LEG_PER_SOURCE_PIN_TYPE_MAX_LENGTH = 128;
+
+ String MANDATE_NAT_PER_BPK_OID = "1.2.40.0.10.2.1.1.261.98";
+ String MANDATE_NAT_PER_BPK_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_BPK_OID;
+ String MANDATE_NAT_PER_BPK_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-BPK";
+ int MANDATE_NAT_PER_BPK_MAX_LENGTH = 1024;
+
+ String MANDATE_NAT_PER_BPK_LIST_OID = "1.2.40.0.10.2.1.1.261.73";
+ String MANDATE_NAT_PER_BPK_LIST_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_BPK_LIST_OID;
+ String MANDATE_NAT_PER_BPK_LIST_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-BPK-LIST";
+ int MANDATE_NAT_PER_ENC_LIST_MAX_LENGTH = 32767;
+
+ String MANDATE_NAT_PER_ENC_BPK_LIST_OID = "1.2.40.0.10.2.1.1.261.72";
+ String MANDATE_NAT_PER_ENC_BPK_LIST_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_ENC_BPK_LIST_OID;
+ String MANDATE_NAT_PER_ENC_BPK_LIST_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-ENC-BPK-LIST";
+ int MANDATE_NAT_PER_ENC_BPK_LIST_MAX_LENGTH = 32767;
+
+ String MANDATE_NAT_PER_GIVEN_NAME_OID = "1.2.40.0.10.2.1.1.261.78";
+ String MANDATE_NAT_PER_GIVEN_NAME_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_GIVEN_NAME_OID;
+ String MANDATE_NAT_PER_GIVEN_NAME_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-GIVEN-NAME";
+ int MANDATE_NAT_PER_GIVEN_NAME_MAX_LENGTH = 128;
+
+ String MANDATE_NAT_PER_FAMILY_NAME_OID = "1.2.40.0.10.2.1.1.261.80";
+ String MANDATE_NAT_PER_FAMILY_NAME_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_FAMILY_NAME_OID;
+ String MANDATE_NAT_PER_FAMILY_NAME_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-FAMILY-NAME";
+ int MANDATE_NAT_PER_FAMILY_NAME_MAX_LENGTH = 128;
+
+ String MANDATE_NAT_PER_BIRTHDATE_OID = "1.2.40.0.10.2.1.1.261.82";
+ String MANDATE_NAT_PER_BIRTHDATE_NAME = URN_OID_PREFIX + MANDATE_NAT_PER_BIRTHDATE_OID;
+ String MANDATE_NAT_PER_BIRTHDATE_FRIENDLY_NAME = "MANDATOR-NATURAL-PERSON-BIRTHDATE";
+ String MANDATE_NAT_PER_BIRTHDATE_FORMAT_PATTERN = BIRTHDATE_FORMAT_PATTERN;
+
+ String MANDATE_LEG_PER_FULL_NAME_OID = "1.2.40.0.10.2.1.1.261.84";
+ String MANDATE_LEG_PER_FULL_NAME_NAME = URN_OID_PREFIX + MANDATE_LEG_PER_FULL_NAME_OID;
+ String MANDATE_LEG_PER_FULL_NAME_FRIENDLY_NAME = "MANDATOR-LEGAL-PERSON-FULL-NAME";
+ int MANDATE_LEG_PER_FULL_NAME_MAX_LENGTH = 256;
+
+ String MANDATE_PROF_REP_OID_OID = "1.2.40.0.10.2.1.1.261.86";
+ String MANDATE_PROF_REP_OID_NAME = URN_OID_PREFIX + MANDATE_PROF_REP_OID_OID;
+ String MANDATE_PROF_REP_OID_FRIENDLY_NAME = "MANDATE-PROF-REP-OID";
+ int MANDATE_PROF_REP_OID_MAX_LENGTH = 256;
+
+ String MANDATE_PROF_REP_DESC_OID = "1.2.40.0.10.2.1.1.261.88";
+ String MANDATE_PROF_REP_DESC_NAME = URN_OID_PREFIX + MANDATE_PROF_REP_DESC_OID;
+ String MANDATE_PROF_REP_DESC_FRIENDLY_NAME = "MANDATE-PROF-REP-DESCRIPTION";
+ int MANDATE_PROF_REP_DESC_MAX_LENGTH = 1024;
+
+ String MANDATE_REFERENCE_VALUE_OID = "1.2.40.0.10.2.1.1.261.90";
+ String MANDATE_REFERENCE_VALUE_NAME = URN_OID_PREFIX + MANDATE_REFERENCE_VALUE_OID;
+ String MANDATE_REFERENCE_VALUE_FRIENDLY_NAME = "MANDATE-REFERENCE-VALUE";
+ int MANDATE_REFERENCE_VALUE_MAX_LENGTH = 100;
+
+ String MANDATE_IDENTIFIER_OID = "1.2.40.0.10.2.1.1.261.91";
+ String MANDATE_IDENTIFIER_FRIENDLY_NAME = "MANDATE-IDENTIFIER";
+ String MANDATE_IDENTIFIER_NAME = URN_OID_PREFIX + MANDATE_IDENTIFIER_OID;
+ int MANDATE_IDENTIFIER_MAX_LENGTH = 256;
+
+ @Deprecated
+ String MANDATE_FULL_MANDATE_OID = "1.2.40.0.10.2.1.1.261.92";
+ @Deprecated
+ String MANDATE_FULL_MANDATE_NAME = URN_OID_PREFIX + MANDATE_FULL_MANDATE_OID;
+ @Deprecated
+ String MANDATE_FULL_MANDATE_FRIENDLY_NAME = "MANDATE-FULL-MANDATE";
+ @Deprecated
+ int MANDATE_FULL_MANDATE_MAX_LENGTH = 32767;
+
+ String INVOICE_RECPT_ID_OID = "1.2.40.0.10.2.1.1.261.40";
+ String INVOICE_RECPT_ID_NAME = URN_OID_PREFIX + INVOICE_RECPT_ID_OID;
+ String INVOICE_RECPT_ID_FRIENDLY_NAME = "INVOICE-RECPT-ID";
+ int INVOICE_RECPT_ID_MAX_LENGTH = 64;
+
+ String COST_CENTER_ID_OID = "1.2.40.0.10.2.1.1.261.50";
+ String COST_CENTER_ID_NAME = URN_OID_PREFIX + COST_CENTER_ID_OID;
+ String COST_CENTER_ID_FRIENDLY_NAME = "COST-CENTER-ID";
+ int COST_CENTER_ID_MAX_LENGTH = 32767;
+
+ String CHARGE_CODE_OID = "1.2.40.0.10.2.1.1.261.60";
+ String CHARGE_CODE_NAME = URN_OID_PREFIX + CHARGE_CODE_OID;
+ String CHARGE_CODE_FRIENDLY_NAME = "CHARGE-CODE";
+ int CHARGE_CODE_MAX_LENGTH = 32767;
+
+ String PVP_HOLDEROFKEY_OID = "1.2.40.0.10.2.1.1.261.xx.xx";
+ String PVP_HOLDEROFKEY_NAME = URN_OID_PREFIX + PVP_HOLDEROFKEY_OID;
+ String PVP_HOLDEROFKEY_FRIENDLY_NAME = "HOLDER-OF-KEY-CERTIFICATE";
+
+}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/XMLNamespaceConstants.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/XMLNamespaceConstants.java
deleted file mode 100644
index bda600f3..00000000
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/data/XMLNamespaceConstants.java
+++ /dev/null
@@ -1,454 +0,0 @@
-/*
- * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
- * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
- *
- * Licensed under the EUPL, Version 1.2 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:
- * https://joinup.ec.europa.eu/news/understanding-eupl-v12
- *
- * 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.egiz.eaaf.core.api.data;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * Contains various constants used throughout the system.
- *
- */
-public interface XMLNamespaceConstants {
- /** Root location of the schema files. */
- String SCHEMA_ROOT = "/schemas/";
-
- /** URI of the Widerrufregister XML namespace. */
- String WRR_NS_URI =
- "http://reference.e-government.gv.at/namespace/moavv/20041223";
-
- /** Prefix used for the Widerrufregister XML namespace */
- String WRR_PREFIX = "wrr";
-
- /** URI of the StandardTextBlock XML namespace. */
- String STB_NS_URI =
- "http://reference.e-government.gv.at/namespace/standardtextblock/20041105#";
-
- /** Prefix used for the standard text block XML namespace */
- String STB_PREFIX = "stb";
-
- /** URI of the MOA XML namespace. */
- String MOA_NS_URI =
- "http://reference.e-government.gv.at/namespace/moa/20020822#";
-
- /** Name of the mandates infobox */
- String INFOBOXIDENTIFIER_MANDATES = "Mandates";
-
- /** Prefix used for the Mandate XML namespace */
- String MD_PREFIX = "md";
-
- /** URI of the Mandate XML namespace. */
- String MD_NS_URI =
- "http://reference.e-government.gv.at/namespace/mandates/20040701#";
-
- /** Prefix used for the Mandate XML namespace */
- String MVV_PREFIX = "mvv";
-
- /** URI of the Mandate XML namespace. */
- String MVV_NS_URI =
- "http://reference.e-government.gv.at/namespace/moavv/app2mvv/20041125";
-
- /** Prefix used for the MandateCheckProfile XML namespace */
- String MDP_PREFIX = "mdp";
-
- /** URI of the Mandate XML namespace. */
- String MDP_NS_URI =
- "http://reference.e-government.gv.at/namespace/mandateprofile/20041105#";
-
- /** Prefix used for the MOA XML namespace */
- String MOA_PREFIX = "moa";
-
- /** Local location of the MOA XML schema definition. */
- String MOA_SCHEMA_LOCATION = SCHEMA_ROOT + "MOA-SPSS-2.0.0.xsd";
-
- /** URI of the MOA configuration XML namespace. */
- String MOA_CONFIG_NS_URI =
- "http://reference.e-government.gv.at/namespace/moaconfig/20021122#";
-
- /** URI of the MOA ID configuration XML namespace. */
- String MOA_ID_CONFIG_NS_URI =
- "http://www.buergerkarte.at/namespaces/moaconfig#";
-
- /** Prefix used for the MOA configuration XML namespace */
- String MOA_CONFIG_PREFIX = "conf";
-
- /** Prefix used for the MOA configuration XML namespace */
- String MOA_ID_CONFIG_PREFIX = "confID";
-
- /** Local location of the MOA configuration XML schema definition. */
- String MOA_CONFIG_SCHEMA_LOCATION = SCHEMA_ROOT + "MOA-SPSS-config-2.0.0.xsd";
-
- /** Local location of the MOA ID configuration XML schema definition. */
- String MOA_ID_CONFIG_SCHEMA_LOCATION =
- SCHEMA_ROOT + "MOA-ID-Configuration-1.5.2.xsd";
-
- /** URI of the Security Layer 1.0 namespace. */
- String SL10_NS_URI =
- "http://www.buergerkarte.at/namespaces/securitylayer/20020225#";
-
- /** Prefix used for the Security Layer 1.0 XML namespace */
- String SL10_PREFIX = "sl10";
-
- /** Local location of the Security Layer 1.0 XML schema definition */
- String SL10_SCHEMA_LOCATION = SCHEMA_ROOT + "Core.20020225.xsd";
-
- /** URI of the Security Layer 1.1 XML namespace */
- String SL11_NS_URI =
- "http://www.buergerkarte.at/namespaces/securitylayer/20020831#";
-
- /** Prefix used for the Security Layer 1.1 XML namespace */
- String SL11_PREFIX = "sl11";
-
- /** Local location of the Security Layer 1.1 XML schema definition */
- String SL11_SCHEMA_LOCATION = SCHEMA_ROOT + "Core.20020831.xsd";
-
- /** URI of the Security Layer 1.2 XML namespace */
- String SL12_NS_URI =
- "http://www.buergerkarte.at/namespaces/securitylayer/1.2#";
-
- /** Prefix used for the Security Layer 1.2 XML namespace */
- String SL12_PREFIX = "sl";
-
- /** Local location of the Security Layer 1.2 XML schema definition */
- String SL12_SCHEMA_LOCATION = SCHEMA_ROOT + "Core-1.2.xsd";
-
- /** URI of the ECDSA XML namespace */
- String ECDSA_NS_URI = "http://www.w3.org/2001/04/xmldsig-more#";
-
- /** Prefix used for ECDSA namespace */
- String ECDSA_PREFIX = "ecdsa";
-
- /** Local location of ECDSA XML schema definition */
- String ECDSA_SCHEMA_LOCATION = SCHEMA_ROOT + "ECDSAKeyValue.xsd";
-
- /** URI of the PersonData XML namespace. */
- String PD_NS_URI =
- "http://reference.e-government.gv.at/namespace/persondata/20020228#";
-
- /** Prefix used for the PersonData XML namespace */
- String PD_PREFIX = "pr";
-
- // /** Local location of the PersonData XML schema definition */
- // String PD_SCHEMA_LOCATION =
- // SCHEMA_ROOT + "PersonData.xsd";
-
- /** Local location of the PersonData XML schema definition */
- String PD_SCHEMA_LOCATION = SCHEMA_ROOT + "PersonData_20_en_moaWID.xsd";
-
- /** URI of the SAML namespace. */
- String SAML_NS_URI = "urn:oasis:names:tc:SAML:1.0:assertion";
-
- /** Prefix used for the SAML XML namespace */
- String SAML_PREFIX = "saml";
-
- /** Local location of the SAML XML schema definition. */
- String SAML_SCHEMA_LOCATION = SCHEMA_ROOT + "cs-sstc-schema-assertion-01.xsd";
-
- /** URI of the SAML request-response protocol namespace. */
- String SAMLP_NS_URI = "urn:oasis:names:tc:SAML:1.0:protocol";
-
- /** Prefix used for the SAML request-response protocol namespace */
- String SAMLP_PREFIX = "samlp";
-
- /** Local location of the SAML request-response protocol schema definition. */
- String SAMLP_SCHEMA_LOCATION = SCHEMA_ROOT + "cs-sstc-schema-protocol-01.xsd";
-
- /** URI of the XML namespace. */
- String XML_NS_URI = "http://www.w3.org/XML/1998/namespace";
-
- /** Prefix used for the XML namespace */
- String XML_PREFIX = "xml";
-
- /** Local location of the XML schema definition. */
- String XML_SCHEMA_LOCATION = SCHEMA_ROOT + "xml.xsd";
-
- /** URI of the XMLNS namespace */
- String XMLNS_NS_URI = "http://www.w3.org/2000/xmlns/";
-
- /** Prefix used for the XSI namespace */
- String XSI_PREFIX = "xsi";
-
- /** Local location of the XSI schema definition. */
- String XSI_SCHEMA_LOCATION = SCHEMA_ROOT + "XMLSchema-instance.xsd";
-
- /** URI of the XSI XMLNS namespace */
- String XSI_NS_URI = "http://www.w3.org/2001/XMLSchema-instance";
-
- /** URI of the XSLT XML namespace */
- String XSLT_NS_URI = "http://www.w3.org/1999/XSL/Transform";
-
- /** Prefix used for the XSLT XML namespace */
- String XSLT_PREFIX = "xsl";
-
- /** URI of the XMLDSig XML namespace. */
- String DSIG_NS_URI = "http://www.w3.org/2000/09/xmldsig#";
-
- /** Prefix used for the XMLDSig XML namespace */
- String DSIG_PREFIX = "dsig";
-
- /** Local location of the XMLDSig XML schema. */
- String DSIG_SCHEMA_LOCATION = SCHEMA_ROOT + "xmldsig-core-schema.xsd";
-
- /** URI of the XMLDSig XPath Filter XML namespace. */
- String DSIG_FILTER2_NS_URI = "http://www.w3.org/2002/06/xmldsig-filter2";
-
- /** Prefix used for the XMLDSig XPath Filter XML namespace */
- String DSIG_FILTER2_PREFIX = "dsig-filter2";
-
- /** Local location of the XMLDSig XPath Filter XML schema definition. */
- String DSIG_FILTER2_SCHEMA_LOCATION = SCHEMA_ROOT + "xmldsig-filter2.xsd";
-
- /** URI of the Exclusive Canonicalization XML namespace */
- String DSIG_EC_NS_URI = "http://www.w3.org/2001/10/xml-exc-c14n#";
-
- /** Prefix used for the Exclusive Canonicalization XML namespace */
- String DSIG_EC_PREFIX = "ec";
-
- /** Local location of the Exclusive Canonicalizaion XML schema definition */
- String DSIG_EC_SCHEMA_LOCATION =
- SCHEMA_ROOT + "exclusive-canonicalization.xsd";
-
- /** URI of the XMLLoginParameterResolver Configuration XML namespace */
- String XMLLPR_NS_URI =
- "http://reference.e-government.gv.at/namespace/moa/20020822#/xmllpr20030814";
-
- /** Local location of the XMLLoginParameterResolver Configuration XML schema definition */
- String XMLLPR_SCHEMA_LOCATION = SCHEMA_ROOT + "MOAIdentities.xsd";
-
- /** Local location of the XAdES v1.1.1 schema definition */
- String XADES_1_1_1_SCHEMA_LOCATION = SCHEMA_ROOT + "XAdES-1.1.1.xsd";
-
- /** URI of the XAdES v1.1.1 namespace */
- String XADES_1_1_1_NS_URI = "http://uri.etsi.org/01903/v1.1.1#";
-
- String XADES_1_1_1_NS_PREFIX = "xades111";
-
- /** Local location of the XAdES v1.2.2 schema definition */
- String XADES_1_2_2_SCHEMA_LOCATION = SCHEMA_ROOT + "XAdES-1.2.2.xsd";
-
- /** URI of the XAdES v1.2.2 namespace */
- String XADES_1_2_2_NS_URI = "http://uri.etsi.org/01903/v1.2.2#";
-
- String XADES_1_2_2_NS_PREFIX = "xades122";
-
- /** Local location of the XAdES v1.1.1 schema definition */
- String XADES_1_3_2_SCHEMA_LOCATION = SCHEMA_ROOT + "XAdES-1.3.2.xsd";
-
- /** URI of the XAdES v1.3.2 namespace */
- String XADES_1_3_2_NS_URI = "http://uri.etsi.org/01903/v1.3.2#";
-
- String XADES_1_3_2_NS_PREFIX = "xades132";
-
- /** Local location of the XAdES v1.4.1 schema definition */
- String XADES_1_4_1_SCHEMA_LOCATION = SCHEMA_ROOT + "XAdES-1.4.1.xsd";
-
- /** URI of the XAdES v1.4.1 namespace */
- String XADES_1_4_1_NS_URI = "http://uri.etsi.org/01903/v1.4.1#";
-
- String XADES_1_4_1_NS_PREFIX = "xades141";
- /** URI of the SAML 2.0 namespace. */
- String SAML2_NS_URI = "urn:oasis:names:tc:SAML:2.0:assertion";
-
- /** Prefix used for the SAML 2.0 XML namespace */
- String SAML2_PREFIX = "saml2";
-
- /** Local location of the SAML 2.0 XML schema definition. */
- String SAML2_SCHEMA_LOCATION = SCHEMA_ROOT + "saml-schema-assertion-2.0.xsd";
-
- /** URI of the SAML 2.0 protocol namespace. */
- String SAML2P_NS_URI = "urn:oasis:names:tc:SAML:2.0:protocol";
-
- /** Prefix used for the SAML 2.0 protocol XML namespace */
- String SAML2P_PREFIX = "saml2p";
-
- /** Local location of the SAML 2.0 protocol XML schema definition. */
- String SAML2P_SCHEMA_LOCATION = SCHEMA_ROOT + "saml-schema-protocol-2.0.xsd";
-
- /** URI of the STORK namespace. */
- String STORK_NS_URI = "urn:eu:stork:names:tc:STORK:1.0:assertion";
-
- /** Prefix used for the STORK XML namespace */
- String STORK_PREFIX = "stork";
-
- /** Local location of the STORK XML schema definition. */
- String STORK_SCHEMA_LOCATION = SCHEMA_ROOT + "stork-schema-assertion-1.0.xsd";
-
- /** URI of the STORK protocol namespace. */
- String STORKP_NS_URI = "urn:eu:stork:names:tc:STORK:1.0:protocol";
-
- /** Prefix used for the STORK protocol XML namespace */
- String STORKP_PREFIX = "storkp";
-
- /** Local location of the STORK protocol XML schema definition. */
- String STORKP_SCHEMA_LOCATION = SCHEMA_ROOT + "stork-schema-protocol-1.0.xsd";
-
- /** URI of the TSL namespace. */
- String TSL_NS_URI = "http://uri.etsi.org/02231/v2#";
-
- /** Prefix used for the TSL namespace */
- String TSL_PREFIX = "tsl1";
-
- /** Local location of the TSL schema definition. */
- String TSL_SCHEMA_LOCATION = SCHEMA_ROOT + "ts_119612v010201_xsd.xsd";
-
- /** URI of the TSL SIE namespace. */
- String TSL_SIE_NS_URI =
- "http://uri.etsi.org/TrstSvc/SvcInfoExt/eSigDir-1999-93-EC-TrustedList/#";
-
- /** Prefix used for the TSL SIE namespace */
- String TSL_SIE_PREFIX = "tslsie";
-
- /** Local location of the TSL SIE schema definition. */
- String TSL_SIE_SCHEMA_LOCATION = SCHEMA_ROOT + "ts_119612v010201_sie_xsd.xsd";
-
- /** URI of the TSL additional types namespace. */
- String TSL_ADDTYPES_NS_URI = "http://uri.etsi.org/02231/v2/additionaltypes#";
-
- /** Prefix used for the TSL additional types namespace */
- String TSL_ADDTYPES_PREFIX = "tsltype";
-
- /** Local location of the TSL additional types schema definition. */
- String TSL_ADDTYPES_SCHEMA_LOCATION =
- SCHEMA_ROOT + "ts_ts_119612v010201_additionaltypes_xsd.xsd";
-
- /** URI of the XML Encryption namespace. */
- String XENC_NS_URI = "http://www.w3.org/2001/04/xmlenc#";
-
- /** Prefix used for the XML Encryption XML namespace */
- String XENC_PREFIX = "xenc";
-
- /** Local location of the XML Encryption XML schema definition. */
- String XENC_SCHEMA_LOCATION = SCHEMA_ROOT + "xenc-schema.xsd";
-
- /** Prefix used for the XML Encryption XML namespace */
- String SAML2_METADATA_PREFIX = "md";
-
- /** Prefix used for the XML Encryption XML namespace */
- String SAML2_METADATA_URI = "urn:oasis:names:tc:SAML:2.0:metadata";
-
- /** Local location of the XML Encryption XML schema definition. */
- String SAML2_METADATA_SCHEMA_LOCATION =
- SCHEMA_ROOT + "saml-schema-metadata-2.0.xsd";
-
-
- /* Prefix and Schema definition for eIDAS specific SAML2 extensions */
- String SAML2_eIDAS_EXTENSIONS_PREFIX = "eidas";
- String SAML2_eIDAS_EXTENSIONS = "http://eidas.europa.eu/saml-extensions";
- String SAML2_eIDAS_EXTENSIONS_SCHEMA_LOCATION =
- SCHEMA_ROOT + "eIDAS_saml_extensions.xsd";
-
-
- /* Prefix and Schema for SAML2 Entity Attributes */
- String SAML2_MDATTR_EXTENSIONS_PREFIX = "mdattr";
- String SAML2_MDATTR_EXTENSIONS = "urn:oasis:names:tc:SAML:metadata:attribute";
- String SAML2_MDATTR_EXTENSIONS_SCHEMA_LOCATION =
- SCHEMA_ROOT + "sstc-metadata-attr.xsd";
-
- /**
- * Contains all namespaces and local schema locations for XML schema definitions relevant for MOA.
- * For use in validating XML parsers.
- */
- String ALL_SCHEMA_LOCATIONS = MOA_NS_URI + " " + MOA_SCHEMA_LOCATION + " "
- + MOA_CONFIG_NS_URI + " " + MOA_CONFIG_SCHEMA_LOCATION + " "
- + MOA_ID_CONFIG_NS_URI + " " + MOA_ID_CONFIG_SCHEMA_LOCATION + " "
- + SL10_NS_URI + " " + SL10_SCHEMA_LOCATION + " "
- + SL11_NS_URI + " " + SL11_SCHEMA_LOCATION + " "
- + SL12_NS_URI + " " + SL12_SCHEMA_LOCATION + " "
- + ECDSA_NS_URI + " " + ECDSA_SCHEMA_LOCATION + " "
- + PD_NS_URI + " " + PD_SCHEMA_LOCATION + " "
- + SAML_NS_URI + " " + SAML_SCHEMA_LOCATION + " "
- + SAMLP_NS_URI + " " + SAMLP_SCHEMA_LOCATION + " "
- + XML_NS_URI + " " + XML_SCHEMA_LOCATION + " "
- + XSI_NS_URI + " " + XSI_SCHEMA_LOCATION + " "
- + DSIG_NS_URI + " " + DSIG_SCHEMA_LOCATION + " "
- + DSIG_FILTER2_NS_URI + " " + DSIG_FILTER2_SCHEMA_LOCATION + " "
- + DSIG_EC_NS_URI + " " + DSIG_EC_SCHEMA_LOCATION + " "
- + XMLLPR_NS_URI + " " + XMLLPR_SCHEMA_LOCATION + " "
- + XADES_1_1_1_NS_URI + " " + XADES_1_1_1_SCHEMA_LOCATION + " "
- + XADES_1_2_2_NS_URI + " " + XADES_1_2_2_SCHEMA_LOCATION + " "
- + XADES_1_3_2_NS_URI + " " + XADES_1_3_2_SCHEMA_LOCATION + " "
- + XADES_1_4_1_NS_URI + " " + XADES_1_4_1_SCHEMA_LOCATION + " "
- + TSL_NS_URI + " " + TSL_SCHEMA_LOCATION + " "
- + TSL_SIE_NS_URI + " " + TSL_SIE_SCHEMA_LOCATION + " "
- + TSL_ADDTYPES_NS_URI + " " + TSL_ADDTYPES_SCHEMA_LOCATION + " "
- + SAML2_NS_URI + " " + SAML2_SCHEMA_LOCATION + " "
- + SAML2P_NS_URI + " " + SAML2P_SCHEMA_LOCATION + " "
- + STORK_NS_URI + " " + STORK_SCHEMA_LOCATION + " "
- + STORKP_NS_URI + " " + STORKP_SCHEMA_LOCATION + " "
- + SAML2_METADATA_URI + " " + SAML2_METADATA_SCHEMA_LOCATION + " "
- + XENC_NS_URI + " " + XENC_SCHEMA_LOCATION + " "
- + SAML2_eIDAS_EXTENSIONS + " " + SAML2_eIDAS_EXTENSIONS_SCHEMA_LOCATION + " "
- + SAML2_MDATTR_EXTENSIONS + " " + SAML2_MDATTR_EXTENSIONS_SCHEMA_LOCATION;
-
-
- /** Security Layer manifest type URI. */
- String SL_MANIFEST_TYPE_URI =
- "http://www.buergerkarte.at/specifications/Security-Layer/20020225#SignatureManifest";
-
- /** URI of the SHA1 digest algorithm */
- String SHA1_URI = "http://www.w3.org/2000/09/xmldsig#sha1";
-
- /** URI of the SHA1 digest algorithm */
- String SHA256_URI = "http://www.w3.org/2000/09/xmldsig#sha256";
-
- /** URI of the SHA1 digest algorithm */
- String SHA384_URI = "http://www.w3.org/2000/09/xmldsig#sha384";
-
- /** URI of the SHA1 digest algorithm */
- String SHA512_URI = "http://www.w3.org/2000/09/xmldsig#sha512";
-
- String SHA3_256_URI = "http://www.w3.org/2007/05/xmldsig-more#sha3-256";
-
- String SHA3_512_URI = "http://www.w3.org/2007/05/xmldsig-more#sha3-512";
-
-
-
- /** URI of the Canonical XML algorithm */
- String C14N_URI = "http://www.w3.org/TR/2001/REC-xml-c14n-20010315";
-
- /** URI of the Canoncial XML with comments algorithm */
- String C14N_WITH_COMMENTS_URI =
- "http://www.w3.org/TR/2001/REC-xml-c14n-20010315#WithComments";
-
- /** URI of the Exclusive Canonical XML algorithm */
- String EXC_C14N_URI = "http://www.w3.org/2001/10/xml-exc-c14n#";
-
- /** URI of the Exclusive Canonical XML with commments algorithm */
- String EXC_C14N_WITH_COMMENTS_URI =
- "http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
-
- /**
- * A map used to map namespace prefixes to namespace URIs
- */
- Map
+ * 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.
+ * The parser use the VelocityEngine
as internal template
+ * evaluator.
*
- * @param httpReq http-request object
- * @param httpResp http-response object
- * @param config Configuration object
+ * @param httpReq http-request object
+ * @param httpResp http-response object
+ * @param config Configuration object
* @param loggerName String, which should be used from logger
*
* @throws GuiBuildException in case of an error
*/
- void build(HttpServletRequest httpReq, HttpServletResponse httpResp,
- IGuiBuilderConfiguration config, String loggerName) throws GuiBuildException;
+ void build(HttpServletRequest httpReq, 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.
+ * The parser use the VelocityEngine
as internal template
+ * evaluator.
*
- * @param httpReq http-request object
- * @param httpResp http-response object
- * @param config Configuration object
+ * @param httpReq http-request object
+ * @param httpResp http-response object
+ * @param config Configuration object
* @param contentType http-response content-type, which should be set
- * @param loggerName String, which should be used from logger
+ * @param loggerName String, which should be used from logger
*
* @throws GuiBuildException in case of an error
*/
- void build(HttpServletRequest httpReq, HttpServletResponse httpResp,
- IGuiBuilderConfiguration config, String contentType, String loggerName)
- throws GuiBuildException;
-
+ void build(HttpServletRequest httpReq, HttpServletResponse httpResp, IGuiBuilderConfiguration config,
+ String contentType, String loggerName) throws GuiBuildException;
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IVelocityGuiBuilderConfiguration.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IVelocityGuiBuilderConfiguration.java
index 151f1eeb..47de65ff 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IVelocityGuiBuilderConfiguration.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/IVelocityGuiBuilderConfiguration.java
@@ -4,8 +4,9 @@ import java.io.InputStream;
public interface IVelocityGuiBuilderConfiguration extends IGuiBuilderConfiguration {
/**
- * Get a specific classpath template-directory prefix, which is used to load a template from
- * classpath by using ClassLoader.getResourceAsStream(...)
.
+ * 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
*/
@@ -15,8 +16,8 @@ public interface IVelocityGuiBuilderConfiguration extends IGuiBuilderConfigurati
* 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
+ * @return Tempate as InputStream
, or null if default getTemplate
+ * method should be used
*/
InputStream getTemplate(String viewName);
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/ModifyableGuiBuilderConfiguration.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/ModifyableGuiBuilderConfiguration.java
index 9d6b10ef..9c4a4471 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/ModifyableGuiBuilderConfiguration.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/gui/ModifyableGuiBuilderConfiguration.java
@@ -26,24 +26,27 @@ public interface ModifyableGuiBuilderConfiguration {
/**
* Add a key/value pair into Velocity context.
- * IMPORTANT: external HTML escapetion is required, because it is NOT done internally
+ * IMPORTANT: external HTML escapetion is required, because it is NOT
+ * done internally
*
- * @param group Group element of the key parameter, or null if root element should be set
- * @param key velocity context key, can be null in case of List based group element
+ * @param group Group element of the key parameter, or null if root element
+ * should be set
+ * @param key velocity context key, can be null in case of List based group
+ * element
* @param value of this key
*/
- void putCustomParameterWithOutEscaption(@Nullable GroupDefinition group, @Nullable String key,
- @Nonnull Object value);
+ void putCustomParameterWithOutEscaption(@Nullable GroupDefinition group, @Nullable String key, @Nonnull Object value);
/**
* Add a key/value pair into Velocity context.
* All parameters get escaped internally
*
- * @param group Group element of the key parameter, or null if root element should be set
- * @param key velocity context key, can be null in case of List based group element
+ * @param group Group element of the key parameter, or null if root element
+ * should be set
+ * @param key velocity context key, can be null in case of List based group
+ * element
* @param value of this key
*/
- void putCustomParameter(@Nullable GroupDefinition group, @Nullable String key,
- @Nonnull String value);
+ void putCustomParameter(@Nullable GroupDefinition group, @Nullable String key, @Nonnull String value);
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/EaafAuthProcessDataConstants.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/EaafAuthProcessDataConstants.java
index 5963dc5f..98c59236 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/EaafAuthProcessDataConstants.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/EaafAuthProcessDataConstants.java
@@ -37,5 +37,4 @@ public interface EaafAuthProcessDataConstants {
@Deprecated
String VALUE_MISMANDATE = "direct_MIS_Mandate";
-
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IAction.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IAction.java
index e2d553fb..9a057801 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IAction.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IAction.java
@@ -21,24 +21,23 @@ package at.gv.egiz.eaaf.core.api.idp;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.slo.SloInformationInterface;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
-
/**
- * Basic interface of a specific operation that is requested by an authentication protocol
- * implementation.
+ * Basic interface of a specific operation that is requested by an
+ * authentication protocol implementation.
*
* @author tlenz
*
*/
public interface IAction {
- SloInformationInterface processRequest(IRequest req, HttpServletRequest httpReq,
- HttpServletResponse httpResp, IAuthData authData) throws EaafException;
+ SloInformationInterface processRequest(IRequest req, HttpServletRequest httpReq, HttpServletResponse httpResp,
+ IAuthData authData) throws EaafException;
- boolean needAuthentication(IRequest req, HttpServletRequest httpReq,
- HttpServletResponse httpResp);
+ boolean needAuthentication(IRequest req, HttpServletRequest httpReq, HttpServletResponse httpResp);
String getDefaultActionName();
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IAttributeBuilder.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IAttributeBuilder.java
index 86739725..9c451282 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IAttributeBuilder.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IAttributeBuilder.java
@@ -24,8 +24,8 @@ import at.gv.egiz.eaaf.core.exceptions.AttributeBuilderException;
public interface IAttributeBuilder {
String getName();
- defaultValue
* if key does not exist
*/
boolean getBasicConfigurationBoolean(final String key, final boolean defaultValue);
-
/**
* Get the root directory of the configuration folder.
*
@@ -69,5 +66,4 @@ public interface IConfiguration {
*/
URI getConfigurationRootDirectory();
-
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java
index 9e5786b6..1ab27e7f 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IConfigurationWithSP.java
@@ -2,45 +2,47 @@ package at.gv.egiz.eaaf.core.api.idp;
import java.net.URL;
import java.util.Map;
+
import javax.annotation.Nullable;
+
import at.gv.egiz.eaaf.core.exceptions.EaafConfigurationException;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
public interface IConfigurationWithSP extends IConfiguration {
- String CONFIG_PROPS_AUTH_DEFAULT_COUNTRYCODE =
- "configuration.auth.default.countrycode";
-
+ String CONFIG_PROPS_AUTH_DEFAULT_COUNTRYCODE = "configuration.auth.default.countrycode";
/**
* Get a configuration entry for a specific Service Provider.
*
* @param uniqueID Unique identifier of the Service Provider
- * @return {@link IspConfiguration} or null
if no SP configuration was found
- * @throws EaafConfigurationException In case of a Service-Provider loading error
+ * @return {@link ISpConfiguration} or null
if no SP configuration
+ * was found
+ * @throws EaafConfigurationException In case of a Service-Provider loading
+ * error
*/
@Nullable
- IspConfiguration getServiceProviderConfiguration(final String uniqueID)
- throws EaafConfigurationException;
-
+ ISpConfiguration getServiceProviderConfiguration(final String uniqueID) throws EaafConfigurationException;
/**
- * Get a configuration entry for a specific Service Provider that is decorated by a Object.
+ * Get a configuration entry for a specific Service Provider that is decorated
+ * by a Object.
*
* @param spIdentifier EntityID of a Service Provider
- * @param decorator Decorator that should be used to decorate the result. This decorator has to be
- * implement or extend the {@link IspConfiguration} interface
+ * @param decorator Decorator that should be used to decorate the result.
+ * This decorator has to be implement or extend the
+ * {@link ISpConfiguration} interface
* @return T
or null
if no SP configuration was found
- * @throws EaafConfigurationException In case of a Service-Provider loading error
+ * @throws EaafConfigurationException In case of a Service-Provider loading
+ * error
*/
@Nullable
+ * Get a set of configuration values from file based configuration that starts
+ * with this prefix.
*
* Important: The configuration values must be of type String!
*
@@ -53,7 +55,8 @@ public interface IConfigurationWithSP extends IConfiguration {
* Validate a URL if it it is allowed by configuration.
*
* @param authReqUrl URL for validation
- * @return URL of the application context if the authReqUrl was valid, otherwise null
+ * @return URL of the application context if the authReqUrl was valid, otherwise
+ * null
*/
String validateIdpUrl(URL authReqUrl) throws EaafException;
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IEidAuthData.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IEidAuthData.java
index 97951d40..323e4aeb 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IEidAuthData.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IEidAuthData.java
@@ -1,6 +1,6 @@
package at.gv.egiz.eaaf.core.api.idp;
-import at.gv.egiz.eaaf.core.api.data.PVPAttributeDefinitions;
+import at.gv.egiz.eaaf.core.api.data.PvpAttributeDefinitions;
public interface IEidAuthData extends IAuthData {
@@ -11,7 +11,6 @@ public interface IEidAuthData extends IAuthData {
*/
byte[] getSignerCertificate();
-
/**
* Get the serialized E-ID token that can be used to validate the Identity-Link.
*
@@ -19,14 +18,12 @@ public interface IEidAuthData extends IAuthData {
*/
byte[] getEidToken();
-
/**
* Get the status of the E-ID.
*
- * @return {@link PVPAttributeDefinitions.EID_IDENTITY_STATUS_LEVEL_VALUES}
+ * @return {@link PvpAttributeDefinitions.EidIdentityStatusLevelValues}
*/
- PVPAttributeDefinitions.EID_IDENTITY_STATUS_LEVEL_VALUES getEidStatus();
-
+ PvpAttributeDefinitions.EidIdentityStatusLevelValues getEidStatus();
/**
* Get the URL of the VDA EndPoint, that was used for authentication.
@@ -35,7 +32,6 @@ public interface IEidAuthData extends IAuthData {
*/
String getVdaEndPointUrl();
-
/**
* Flag that mandates are used.
*
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IModulInfo.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IModulInfo.java
index 8dc30568..4834f15e 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IModulInfo.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IModulInfo.java
@@ -21,6 +21,7 @@ package at.gv.egiz.eaaf.core.api.idp;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
import at.gv.egiz.eaaf.core.api.IRequest;
/**
@@ -49,25 +50,26 @@ public interface IModulInfo {
* Generates a protocol specific error message.
*
*
- * @param e Exception that contains the error message
- * @param request httpRequest object from servlet container
- * @param response httpResponse object from servlet container
+ * @param e Exception that contains the error message
+ * @param request httpRequest object from servlet container
+ * @param response httpResponse object from servlet container
* @param protocolRequest incoming protocol request
- * @return return true if a protocol specific error message was generated, otherwise
- * false
- * @throws Throwable In case of an internal error during error message generation
+ * @return return true if a protocol specific error message was
+ * generated, otherwise false
+ * @throws Throwable In case of an internal error during error message
+ * generation
*/
- boolean generateErrorMessage(Throwable e, HttpServletRequest request,
- HttpServletResponse response, IRequest protocolRequest) throws Throwable;
+ boolean generateErrorMessage(Throwable e, HttpServletRequest request, HttpServletResponse response,
+ IRequest protocolRequest) throws Throwable;
/**
* additional validation of a incoming authentication request.
*
- * @param request httpRequest object from servlet container
+ * @param request httpRequest object from servlet container
* @param response httpResponse object from servlet container
- * @param pending incoming protocol request
- * @return return true if the incoming request is valid, otherwise false
+ * @param pending incoming protocol request
+ * @return return true if the incoming request is valid, otherwise
+ * false
*/
- boolean validate(HttpServletRequest request, HttpServletResponse response,
- IRequest pending);
+ boolean validate(HttpServletRequest request, HttpServletResponse response, IRequest pending);
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IPvpAttributeBuilder.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IPvpAttributeBuilder.java
index c1cb38f7..5115327d 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IPvpAttributeBuilder.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/IPvpAttributeBuilder.java
@@ -19,8 +19,8 @@
package at.gv.egiz.eaaf.core.api.idp;
-import at.gv.egiz.eaaf.core.api.data.PVPAttributeDefinitions;
+import at.gv.egiz.eaaf.core.api.data.PvpAttributeDefinitions;
-public interface IPvpAttributeBuilder extends PVPAttributeDefinitions, IAttributeBuilder {
+public interface IPvpAttributeBuilder extends PvpAttributeDefinitions, IAttributeBuilder {
}
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/ISpConfiguration.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/ISpConfiguration.java
new file mode 100644
index 00000000..5a16f655
--- /dev/null
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/ISpConfiguration.java
@@ -0,0 +1,164 @@
+/*
+ * Copyright 2017 Graz University of Technology EAAF-Core Components has been developed in a
+ * cooperation between EGIZ, A-SIT Plus, A-SIT, and Graz University of Technology.
+ *
+ * Licensed under the EUPL, Version 1.2 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:
+ * https://joinup.ec.europa.eu/news/understanding-eupl-v12
+ *
+ * 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.egiz.eaaf.core.api.idp;
+
+import java.io.Serializable;
+import java.util.List;
+import java.util.Map;
+
+public interface ISpConfiguration extends Serializable {
+
+ String CONFIG_KEY_RESTRICTIONS_BASEID_INTERNAL = "configuration.restrictions.baseID.idpProcessing";
+ String CONFIG_KEY_RESTRICTIONS_BASEID_TRANSMISSION = "configuration.restrictions.baseID.spTransmission";
+
+ String CONFIG_KEY_RESTRICTIONS_EID_DEMO_MODE = "configuration.restrictions.eIDTestMode";
+
+ /**
+ * Get the full key/value configuration for this Service Provider.
+ *
+ * @return an unmodifiable map of key/value pairs
+ */
+ Map
+ * This list can be configured by key:
+ * "configuration.restrictions.baseID.idpProcessing"
+ *
+ * @return
+ */
+ List
+ * This list can be configured by key:
+ * "configuration.restrictions.baseID.spTransmission"
+ *
+ * @return
+ */
+ List
- * This list can be configured by key: "configuration.restrictions.baseID.idpProcessing"
- *
- * @return
- */
- List
- * This list can be configured by key: "configuration.restrictions.baseID.spTransmission"
- *
- * @return
- */
- List
- * If there is an active SSO session, the pending request will be populated with eID information
- * from SSO session
+ * Check if there is an active and valid SSO session for the current pending
+ * request.
+ * If there is an active SSO session, the pending request will be populated with
+ * eID information from SSO session
*
* @param pendingReq Current incoming pending request
- * @param httpReq http Servlet request
- * @param httpResp http Servlet response
+ * @param httpReq http Servlet request
+ * @param httpResp http Servlet response
* @return true if there is a valid SSO session, otherwise false
* @throws EaafSsoException In case of an internal error
*/
- boolean checkAndValidateSsoSession(IRequest pendingReq, HttpServletRequest httpReq,
- HttpServletResponse httpResp) throws EaafSsoException;
+ boolean checkAndValidateSsoSession(IRequest pendingReq, HttpServletRequest httpReq, HttpServletResponse httpResp)
+ throws EaafSsoException;
/**
* Populate service provider specific SSO settings.
*
*
- * This method should be used any more. Use getFamilyName() and getGivenName() separately.
- *
+ * This method should be used any more. Use getFamilyName() and getGivenName()
+ * separately.
+ *
* @return The name.
*/
@Deprecated
String getName();
/**
- * Returns the identificationValue. "identificationValue"
is the translation of
- * "Stammzahl"
.
- *
+ * Returns the identificationValue. "identificationValue"
is the
+ * translation of "Stammzahl"
.
+ *
* @return String
*/
String getIdentificationValue();
@@ -76,106 +76,106 @@ public interface IIdentityLink {
/**
* Returns the identificationType. "identificationType"
type of the
* identificationValue in the IdentityLink.
- *
+ *
* @return String
*/
String getIdentificationType();
/**
* Sets the dateOfBirth.
- *
+ *
* @param dateOfBirth The dateOfBirth to set
*/
void setDateOfBirth(String dateOfBirth);
/**
* Sets the familyName.
- *
+ *
* @param familyName The familyName to set
*/
void setFamilyName(String familyName);
/**
* Sets the givenName.
- *
+ *
* @param givenName The givenName to set
*/
void setGivenName(String givenName);
/**
- * Sets the identificationValue. "identificationValue"
is the translation of
- * "Stammzahl"
.
- *
+ * Sets the identificationValue. "identificationValue"
is the
+ * translation of "Stammzahl"
.
+ *
* @param identificationValue The identificationValue to set
*/
void setIdentificationValue(String identificationValue);
/**
* Sets the Type of the identificationValue.
- *
+ *
* @param identificationType The type of identificationValue to set
*/
void setIdentificationType(String identificationType);
/**
* Returns the samlAssertion.
- *
+ *
* @return Element
*/
Element getSamlAssertion();
/**
* Returns the samlAssertion.
- *
+ *
* @return Element
*/
String getSerializedSamlAssertion();
/**
* Sets the samlAssertion and the serializedSamlAssertion.
- *
+ *
* @param samlAssertion The samlAssertion to set
*/
void setSamlAssertion(Element samlAssertion) throws TransformerException, IOException;
/**
* Returns the dsigReferenceTransforms.
- *
+ *
* @return Element[]
*/
Element[] getDsigReferenceTransforms();
/**
* Sets the dsigReferenceTransforms.
- *
+ *
* @param dsigReferenceTransforms The dsigReferenceTransforms to set
*/
void setDsigReferenceTransforms(Element[] dsigReferenceTransforms);
/**
* Returns the publicKey.
- *
+ *
* @return PublicKey[]
*/
PublicKey[] getPublicKey();
/**
* Sets the publicKey.
- *
+ *
* @param publicKey The publicKey to set
*/
void setPublicKey(PublicKey[] publicKey);
/**
* Returns the prPerson.
- *
+ *
* @return Element
*/
Element getPrPerson();
/**
* Sets the prPerson.
- *
+ *
* @param prPerson The prPerson to set
*/
void setPrPerson(Element prPerson);
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/modules/AuthModule.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/modules/AuthModule.java
index e74bed63..54a50920 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/modules/AuthModule.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/modules/AuthModule.java
@@ -23,37 +23,42 @@ import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.idp.process.ExecutionContext;
/**
- * Provides metadata of a certain module. Uses for module discovery and process selection.
+ * Provides metadata of a certain module. Uses for module discovery and process
+ * selection.
*/
public interface AuthModule {
/**
- * Returns the priority of the module. The priority defines the order of the respective module
- * within the chain of discovered modules. Higher priorized modules are asked before lower
- * priorized modules for a process that they can handle.
+ * Returns the priority of the module. The priority defines the order of the
+ * respective module within the chain of discovered modules. Higher priorized
+ * modules are asked before lower priorized modules for a process that they can
+ * handle.
*
- * Internal default modules are priorized neutral ({@code 0}. Use a higher priority
- * ({@code 1...Integer.MAX_VALUE}) in order to have your module(s) priorized or a lower priority
- * ({@code Integer.MIN_VALUE...-1}) in order to put your modules behind default modules.
+ * Internal default modules are priorized neutral ({@code 0}. Use a higher
+ * priority ({@code 1...Integer.MAX_VALUE}) in order to have your module(s)
+ * priorized or a lower priority ({@code Integer.MIN_VALUE...-1}) in order to
+ * put your modules behind default modules.
*
* @return the priority of the module.
*/
int getPriority();
/**
- * Selects a process (description), referenced by its unique id, which is able to perform
- * authentication with the given {@link ExecutionContext}. Returns {@code null} if no appropriate
- * process (description) was available within this module.
+ * Selects a process (description), referenced by its unique id, which is able
+ * to perform authentication with the given {@link ExecutionContext}. Returns
+ * {@code null} if no appropriate process (description) was available within
+ * this module.
*
- * @param context an ExecutionContext for a process.
+ * @param context an ExecutionContext for a process.
* @param pendingReq the current processed pending request
- * @return the process-ID of a process which is able to work with the given ExecutionContext, or
- * {@code null}.
+ * @return the process-ID of a process which is able to work with the given
+ * ExecutionContext, or {@code null}.
*/
String selectProcess(ExecutionContext context, IRequest pendingReq);
/**
- * Returns the an Array of {@link ProcessDefinition}s of the processes included in this module.
+ * Returns the an Array of {@link ProcessDefinition}s of the processes included
+ * in this module.
*
* @return an array of resource uris of the processes included in this module.
*/
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java
index e817720b..86d15d5b 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/auth/services/IProtocolAuthenticationService.java
@@ -20,8 +20,10 @@
package at.gv.egiz.eaaf.core.api.idp.auth.services;
import java.io.IOException;
+
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+
import at.gv.egiz.eaaf.core.api.IRequest;
import at.gv.egiz.eaaf.core.api.logging.IStatisticLogger;
import at.gv.egiz.eaaf.core.exceptions.EaafException;
@@ -33,14 +35,13 @@ public interface IProtocolAuthenticationService {
String PARAM_GUI_ERRORCODEPARAMS = "errorParams";
String PARAM_GUI_ERRORSTACKTRACE = "stacktrace";
-
/**
* Initialize an authentication process for this protocol request.
*
- * @param httpReq HttpServletRequest
- * @param httpResp HttpServletResponse
+ * @param httpReq HttpServletRequest
+ * @param httpResp HttpServletResponse
* @param pendingReq Authentication request which is actually in process
- * @throws IOException In case of a communication error
+ * @throws IOException In case of a communication error
* @throws EaafException In case of an application error
*/
void performAuthentication(HttpServletRequest httpReq, HttpServletResponse httpResp, IRequest pendingReq)
@@ -49,10 +50,11 @@ public interface IProtocolAuthenticationService {
/**
* Finalize the requested protocol operation.
*
- * @param httpReq HttpServletRequest
- * @param httpResp HttpServletResponse
+ * @param httpReq HttpServletRequest
+ * @param httpResp HttpServletResponse
* @param pendingReq Authentication request which is actually in process
- * @throws IOException If response can not be written into {@link HttpServletResponse}
+ * @throws IOException If response can not be written into
+ * {@link HttpServletResponse}
* @throws EaafException If an internal error occur
*/
void finalizeAuthentication(HttpServletRequest httpReq, HttpServletResponse httpResp, IRequest pendingReq)
@@ -61,26 +63,30 @@ public interface IProtocolAuthenticationService {
/**
* Build protocol-specific error message.
*
- * @param throwable Exception that should be handled
- * @param req Current open http request as {@link HttpServletRequest}
- * @param resp Current open http response as {@link HttpServletResponse}
+ * @param throwable Exception that should be handled
+ * @param req Current open http request as {@link HttpServletRequest}
+ * @param resp Current open http response as {@link HttpServletResponse}
* @param pendingReq Authentication request which is actually in process
- * @throws IOException If response can not be written into {@link HttpServletResponse}
+ * @throws IOException If response can not be written into
+ * {@link HttpServletResponse}
* @throws EaafException If an internal error occur
*/
- void buildProtocolSpecificErrorResponse(Throwable throwable, HttpServletRequest req,
- HttpServletResponse resp, IRequest pendingReq) throws IOException, EaafException;
+ void buildProtocolSpecificErrorResponse(Throwable throwable, HttpServletRequest req, HttpServletResponse resp,
+ IRequest pendingReq) throws IOException, EaafException;
/**
- * Handles all exceptions with no pending request. Therefore, the error is written to the users
- * browser
+ * Handles all exceptions with no pending request. Therefore, the error is
+ * written to the users browser
*
- * @param throwable Exception that should be handled
- * @param req Current open http request as {@link HttpServletRequest}
- * @param resp Current open http response as {@link HttpServletResponse}
- * @param writeExceptionToStatisticLog if true
, the exception get logged into
- * {@link IStatisticLogger}
- * @throws IOException If response can not be written into {@link HttpServletResponse}
+ * @param throwable Exception that should be handled
+ * @param req Current open http request as
+ * {@link HttpServletRequest}
+ * @param resp Current open http response as
+ * {@link HttpServletResponse}
+ * @param writeExceptionToStatisticLog if true
, the exception get
+ * logged into {@link IStatisticLogger}
+ * @throws IOException If response can not be written into
+ * {@link HttpServletResponse}
* @throws EaafException If an internal error occure
*/
void handleErrorNoRedirect(Throwable throwable, HttpServletRequest req, HttpServletResponse resp,
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExecutionContext.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExecutionContext.java
index 3c2136aa..68584dc9 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExecutionContext.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/idp/process/ExecutionContext.java
@@ -31,7 +31,8 @@ import java.util.Set;
public interface ExecutionContext extends Serializable {
/**
- * Flag that indicates that a Task canceled the current {@link ExecutionContext}.
+ * Flag that indicates that a Task canceled the current
+ * {@link ExecutionContext}.
*
* @return true if the process-flow was marked as canceled, otherwise false
*/
@@ -41,7 +42,8 @@ public interface ExecutionContext extends Serializable {
* Mark this {@link ExecutionContext} as cancelled.
*
* java.io.Serializable
interface
- * @param timeoutMs Defines the period of time a data object is kept within the storage
+ * @param key Id which identifiers the data object
+ * @param value Data object which should be stored. This data must implement
+ * the java.io.Serializable
interface
+ * @param timeoutMs Defines the period of time a data object is kept within the
+ * storage
* @throws EaafStorageException In case of store operation failed
*/
void put(String key, Object value, int timeoutMs) throws EaafException;
@@ -65,7 +68,7 @@ public interface ITransactionStorage {
/**
* Get a data object from transaction storage.
*
- * @param key Id which identifiers the data object
+ * @param key Id which identifiers the data object
* @param clazz The class type which is stored with this key
* @return The transaction-data object from type class, or null
* @throws EaafStorageException In case of load operation failed
@@ -75,21 +78,20 @@ public interface ITransactionStorage {
/**
* Get a data object from transaction storage.
*
- * @param key Id which identifiers the data object
- * @param clazz The class type which is stored with this key
+ * @param key Id which identifiers the data object
+ * @param clazz The class type which is stored with this key
* @param dataTimeOut Data-object timeout in [ms]
* @return The transaction-data object from type class, or null
* @throws EaafStorageException In case of load operation failed
*/
- * This method adds either the first element or the second element to parent JSON, but never both.
+ * This method adds either the first element or the second element to parent
+ * JSON, but never both.
*
- * @param parent Parent JSON element
- * @param firstKeyId first element Id
+ * @param parent Parent JSON element
+ * @param firstKeyId first element Id
* @param secondKeyId second element Id
- * @param first first element
- * @param second second element
+ * @param first first element
+ * @param second second element
* @throws SlCommandoBuildException In case of an error.
*/
- public static void addOnlyOnceOfTwo(final ObjectNode parent, final String firstKeyId,
- final String secondKeyId, final ObjectNode first, final String second)
- throws SlCommandoBuildException {
+ public static void addOnlyOnceOfTwo(final ObjectNode parent, final String firstKeyId, final String secondKeyId,
+ final ObjectNode first, final String second) throws SlCommandoBuildException {
if (first == null && (second == null || second.isEmpty())) {
throw new SlCommandoBuildException(firstKeyId + " and " + secondKeyId + " is NULL");
} else if (first != null && second != null) {
@@ -567,34 +520,25 @@ public class SL20JsonBuilderUtils {
}
}
-
-
// TODO!!!!
- private static ObjectNode createJsonSignedHeader()
- throws SlCommandoBuildException {
+ private static ObjectNode createJsonSignedHeader() throws SlCommandoBuildException {
final ObjectNode header = mapper.getMapper().createObjectNode();
- addSingleStringElement(header, SL20Constants.JSON_ALGORITHM,
- SL20Constants.JSON_ALGORITHM_SIGNING_RS256, true);
- addSingleStringElement(header, SL20Constants.JSON_CONTENTTYPE,
- SL20Constants.SL20_CONTENTTYPE_SIGNED_COMMAND, true);
- addArrayOfStrings(header, SL20Constants.JSON_X509_CERTIFICATE,
- Arrays.asList(Constants.DUMMY_SIGNING_CERT));
+ addSingleStringElement(header, SL20Constants.JSON_ALGORITHM, SL20Constants.JSON_ALGORITHM_SIGNING_RS256, true);
+ addSingleStringElement(header, SL20Constants.JSON_CONTENTTYPE, SL20Constants.SL20_CONTENTTYPE_SIGNED_COMMAND, true);
+ addArrayOfStrings(header, SL20Constants.JSON_X509_CERTIFICATE, Arrays.asList(Constants.DUMMY_SIGNING_CERT));
return header;
}
// TODO!!!!
- private static ObjectNode createJsonEncryptionHeader()
- throws SlCommandoBuildException {
+ private static ObjectNode createJsonEncryptionHeader() throws SlCommandoBuildException {
final ObjectNode header = mapper.getMapper().createObjectNode();
- addSingleStringElement(header, SL20Constants.JSON_ALGORITHM,
- SL20Constants.JSON_ALGORITHM_ENC_KEY_RSAOAEP, true);
+ addSingleStringElement(header, SL20Constants.JSON_ALGORITHM, SL20Constants.JSON_ALGORITHM_ENC_KEY_RSAOAEP, true);
addSingleStringElement(header, SL20Constants.JSON_ENCRYPTION_PAYLOAD,
SL20Constants.JSON_ALGORITHM_ENC_PAYLOAD_A128CBCHS256, true);
- addSingleStringElement(header, SL20Constants.JSON_CONTENTTYPE,
- SL20Constants.SL20_CONTENTTYPE_ENCRYPTED_RESULT, true);
- addSingleStringElement(header, SL20Constants.JSON_X509_FINGERPRINT,
- Constants.DUMMY_SIGNING_CERT_FINGERPRINT, true);
+ addSingleStringElement(header, SL20Constants.JSON_CONTENTTYPE, SL20Constants.SL20_CONTENTTYPE_ENCRYPTED_RESULT,
+ true);
+ addSingleStringElement(header, SL20Constants.JSON_X509_FINGERPRINT, Constants.DUMMY_SIGNING_CERT_FINGERPRINT, true);
return header;
}
@@ -605,14 +549,11 @@ public class SL20JsonBuilderUtils {
+ " AAuHIm4Bh-0Qc_lF5YKt_O8W2Fp5jujGbds9uJdbF9CUAr7t1dnZcAcQjbKBYNX4\n"
+ " BAynRFdiuB--f_nZLgrnbyTyWzO75vRK5h6xBArLIARNPvkSjtQBMHlb1L07Qe7K\n"
+ " 0GarZRmB_eSN9383LcOLn6_dO--xi12jzDwusC-eOkHWEsqtFZESc6BfI7noOPqv\n"
- + " hJ1phCnvWh6IeYI2w9QOYEUipUTI8np6LbgGY9Fs98rqVt5AXLIhWkWywlVmtVrB\n"
- + " p0igcN_IoypGlUPQGe77Rw";
+ + " hJ1phCnvWh6IeYI2w9QOYEUipUTI8np6LbgGY9Fs98rqVt5AXLIhWkWywlVmtVrB\n" + " p0igcN_IoypGlUPQGe77Rw";
}
-
-
- private static void addArrayOfStrings(final ObjectNode parent, final String keyId,
- final Listtrue
, the result must be encrypted
* @return decrypted JSON
* @throws SL20Exception In case of an error
@@ -224,8 +221,7 @@ public class SL20JsonExtractorUtils {
public static JsonNode extractSL20Result(final JsonNode command, final IJoseTools decrypter,
final boolean mustBeEncrypted) throws SL20Exception {
final JsonNode result = command.get(SL20Constants.SL20_COMMAND_CONTAINER_RESULT);
- final JsonNode encryptedResult =
- command.get(SL20Constants.SL20_COMMAND_CONTAINER_ENCRYPTEDRESULT);
+ final JsonNode encryptedResult = command.get(SL20Constants.SL20_COMMAND_CONTAINER_ENCRYPTEDRESULT);
if (result == null && encryptedResult == null) {
throw new SlCommandoParserException("NO result OR encryptedResult FOUND.");
@@ -238,8 +234,7 @@ public class SL20JsonExtractorUtils {
} catch (final Exception e) {
log.info("Can NOT decrypt SL20 result. Reason:" + e.getMessage());
if (!mustBeEncrypted) {
- log.warn(
- "Decrypted results are disabled by configuration. Parse result in plain if it is possible");
+ log.warn("Decrypted results are disabled by configuration. Parse result in plain if it is possible");
// dummy code
try {
@@ -267,7 +262,6 @@ public class SL20JsonExtractorUtils {
throw new SlCommandoParserException("Internal build error");
}
-
}
/**
@@ -278,8 +272,8 @@ public class SL20JsonExtractorUtils {
* @return Signature verification result that contains the payLoad
* @throws SlCommandoParserException In case of an error
*/
- public static VerificationResult extractSL20PayLoad(final JsonNode container,
- final IJoseTools joseTools, final boolean mustBeSigned) throws SL20Exception {
+ public static VerificationResult extractSL20PayLoad(final JsonNode container, final IJoseTools joseTools,
+ final boolean mustBeSigned) throws SL20Exception {
final JsonNode sl20Payload = container.get(SL20Constants.SL20_PAYLOAD);
final JsonNode sl20SignedPayload = container.get(SL20Constants.SL20_SIGNEDPAYLOAD);
@@ -301,10 +295,8 @@ public class SL20JsonExtractorUtils {
throw new SlCommandoParserException("Internal build error");
}
-
}
-
/**
* Extract generic transport container from httpResponse.
*
@@ -312,19 +304,16 @@ public class SL20JsonExtractorUtils {
* @return JSON with SL2.0 response
* @throws SlCommandoParserException In case of an error
*/
- public static JsonNode getSL20ContainerFromResponse(final HttpResponse httpResp)
- throws SlCommandoParserException {
+ public static JsonNode getSL20ContainerFromResponse(final HttpResponse httpResp) throws SlCommandoParserException {
try {
JsonNode sl20Resp = null;
- if (httpResp.getStatusLine().getStatusCode() == 303
- || httpResp.getStatusLine().getStatusCode() == 307) {
+ if (httpResp.getStatusLine().getStatusCode() == 303 || httpResp.getStatusLine().getStatusCode() == 307) {
final Header[] locationHeader = httpResp.getHeaders("Location");
if (locationHeader == null) {
throw new SlCommandoParserException("Find Redirect statuscode but not Location header");
}
- final String sl20RespString =
- new URIBuilder(locationHeader[0].getValue()).getQueryParams().get(0).getValue();
+ final String sl20RespString = new URIBuilder(locationHeader[0].getValue()).getQueryParams().get(0).getValue();
sl20Resp = mapper.getMapper().readTree(Base64Url.decode(sl20RespString));
} else if (httpResp.getStatusLine().getStatusCode() == 200) {
@@ -333,16 +322,15 @@ public class SL20JsonExtractorUtils {
}
if (!httpResp.getEntity().getContentType().getValue().startsWith("application/json")) {
- throw new SlCommandoParserException("SL20 response with a wrong ContentType: "
- + httpResp.getEntity().getContentType().getValue());
+ throw new SlCommandoParserException(
+ "SL20 response with a wrong ContentType: " + httpResp.getEntity().getContentType().getValue());
}
sl20Resp = parseSL20ResultFromResponse(httpResp.getEntity());
- } else if (httpResp.getStatusLine().getStatusCode() == 500
- || httpResp.getStatusLine().getStatusCode() == 401
+ } else if (httpResp.getStatusLine().getStatusCode() == 500 || httpResp.getStatusLine().getStatusCode() == 401
|| httpResp.getStatusLine().getStatusCode() == 400) {
- log.info("SL20 response with http-code: " + httpResp.getStatusLine().getStatusCode()
- + ". Search for error message");
+ log.info(
+ "SL20 response with http-code: " + httpResp.getStatusLine().getStatusCode() + ". Search for error message");
try {
sl20Resp = parseSL20ResultFromResponse(httpResp.getEntity());
@@ -354,8 +342,6 @@ public class SL20JsonExtractorUtils {
}
-
-
} else {
throw new SlCommandoParserException(
"SL20 response with http-code: " + httpResp.getStatusLine().getStatusCode());
@@ -365,8 +351,7 @@ public class SL20JsonExtractorUtils {
return sl20Resp;
} catch (final Exception e) {
- throw new SlCommandoParserException("SL20 response parsing FAILED! Reason: " + e.getMessage(),
- e);
+ throw new SlCommandoParserException("SL20 response parsing FAILED! Reason: " + e.getMessage(), e);
}
}
@@ -384,21 +369,18 @@ public class SL20JsonExtractorUtils {
throw new SlCommandoParserException("SL2.0 can NOT parse to a JSON object");
}
-
} else {
throw new SlCommandoParserException("Can NOT find content in http response");
}
}
-
- private static JsonNode getAndCheck(final JsonNode input, final String keyID,
- final boolean isRequired) throws SlCommandoParserException {
+ private static JsonNode getAndCheck(final JsonNode input, final String keyID, final boolean isRequired)
+ throws SlCommandoParserException {
final JsonNode internal = input.get(keyID);
if (internal == null && isRequired) {
- throw new SlCommandoParserException(
- "REQUIRED Element with keyId: " + keyID + " does not exist");
+ throw new SlCommandoParserException("REQUIRED Element with keyId: " + keyID + " does not exist");
}
return internal;
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/api/ISignatureVerificationService.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/api/ISignatureVerificationService.java
index 155bfadd..67e9e29d 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/api/ISignatureVerificationService.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/api/ISignatureVerificationService.java
@@ -1,8 +1,9 @@
package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api;
import java.util.List;
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.ICMSSignatureVerificationResponse;
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXMLSignatureVerificationResponse;
+
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.ICmsSignatureVerificationResponse;
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXmlSignatureVerificationResponse;
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceException;
public interface ISignatureVerificationService {
@@ -10,80 +11,89 @@ public interface ISignatureVerificationService {
/**
* Verify a CAdES or CMS signature.
*
- * This method only validates the first CMS or CAdES signature if more than one signature
- * exists
+ * This method only validates the first CMS or CAdES signature if more than
+ * one signature exists
*
- * @param signature Enveloped CMS or CAdES signature
+ * @param signature Enveloped CMS or CAdES signature
* @param trustProfileID Id of the Trust-Profile from MOA-Sig configuration
- * @return @link {@link ICMSSignatureVerificationResponse}, or null if no signature was found
+ * @return @link {@link ICmsSignatureVerificationResponse}, or null if no
+ * signature was found
* @throws MoaSigServiceException on signatue-verification error
*/
- ICMSSignatureVerificationResponse verifyCmsSignature(byte[] signature, String trustProfileID)
+ ICmsSignatureVerificationResponse verifyCmsSignature(byte[] signature, String trustProfileID)
throws MoaSigServiceException;
-
-
/**
* Verify a XML or XAdES signature.
*
- * This method only validates the first XML or XAdES signature if more than one signature
- * exists
+ * This method only validates the first XML or XAdES signature if more than
+ * one signature exists
*
- * @param signature Serialized XML or XAdES signature
+ * @param signature Serialized XML or XAdES signature
* @param trustProfileID Id of the Trust-Profile from MOA-Sig configuration
- * @return @link {@link IXMLSignatureVerificationResponse}, or null if no signature was found
+ * @return @link {@link IXmlSignatureVerificationResponse}, or null if no
+ * signature was found
* @throws MoaSigServiceException on signatue-verification error
*/
- IXMLSignatureVerificationResponse verifyXmlSignature(byte[] signature, String trustProfileID)
+ IXmlSignatureVerificationResponse verifyXmlSignature(byte[] signature, String trustProfileID)
throws MoaSigServiceException;
/**
* Verify a XML or XAdES signature.
*
- * This method only validates the first XML or XAdES signature if more than one signature
- * exists
+ * This method only validates the first XML or XAdES signature if more than
+ * one signature exists
*
- * @param signature Serialized XML or XAdES signature
- * @param trustProfileID Id of the Trust-Profile from MOA-Sig configuration
- * @param verifyTransformsInfoProfileID {@link List} of XML Transformations that should be used
- * for signature-verification
- * @return @link {@link IXMLSignatureVerificationResponse}, or null if no signature was found
+ * @param signature Serialized XML or XAdES signature
+ * @param trustProfileID Id of the Trust-Profile from MOA-Sig
+ * configuration
+ * @param verifyTransformsInfoProfileID {@link List} of XML Transformations that
+ * should be used for
+ * signature-verification
+ * @return @link {@link IXmlSignatureVerificationResponse}, or null if no
+ * signature was found
* @throws MoaSigServiceException on signatue-verification error
*/
- IXMLSignatureVerificationResponse verifyXmlSignature(byte[] signature, String trustProfileID,
+ IXmlSignatureVerificationResponse verifyXmlSignature(byte[] signature, String trustProfileID,
List
*
- * This method only validates the first XML or XAdES signature if more than one signature
- * exists
+ * This method only validates the first XML or XAdES signature if more than
+ * one signature exists
*
- * @param signature Serialized XML or XAdES signature
- * @param trustProfileID Id of the Trust-Profile from MOA-Sig configuration
- * @param signatureLocationXpath Xpath that points to location of Signature element
- * @return @link {@link IXMLSignatureVerificationResponse}, or null if no signature was found
+ * @param signature Serialized XML or XAdES signature
+ * @param trustProfileID Id of the Trust-Profile from MOA-Sig
+ * configuration
+ * @param signatureLocationXpath Xpath that points to location of Signature
+ * element
+ * @return @link {@link IXmlSignatureVerificationResponse}, or null if no
+ * signature was found
* @throws MoaSigServiceException on signatue-verification error
*/
- IXMLSignatureVerificationResponse verifyXmlSignature(byte[] signature, String trustProfileID,
+ IXmlSignatureVerificationResponse verifyXmlSignature(byte[] signature, String trustProfileID,
String signatureLocationXpath) throws MoaSigServiceException;
/**
* Verify a XML or XAdES signature.
*
- * This method only validates the first XML or XAdES signature if more than one signature
- * exists
+ * This method only validates the first XML or XAdES signature if more than
+ * one signature exists
*
- * @param signature Serialized XML or XAdES signature
- * @param trustProfileID Id of the Trust-Profile from MOA-Sig configuration
- * @param verifyTransformsInfoProfileID {@link List} of XML Transformations that should be used
- * for signature-verification
- * @param signatureLocationXpath Xpath that points to location of Signature element
- * @return @link {@link IXMLSignatureVerificationResponse}, or null if no signature was found
+ * @param signature Serialized XML or XAdES signature
+ * @param trustProfileID Id of the Trust-Profile from MOA-Sig
+ * configuration
+ * @param verifyTransformsInfoProfileID {@link List} of XML Transformations that
+ * should be used for
+ * signature-verification
+ * @param signatureLocationXpath Xpath that points to location of
+ * Signature element
+ * @return @link {@link IXmlSignatureVerificationResponse}, or null if no
+ * signature was found
* @throws MoaSigServiceException on signatue-verification error
*/
- IXMLSignatureVerificationResponse verifyXmlSignature(byte[] signature, String trustProfileID,
+ IXmlSignatureVerificationResponse verifyXmlSignature(byte[] signature, String trustProfileID,
ListInvoker
- * classes.
+ * Set up the thread-local context information needed for calling the various
+ * Invoker
classes.
*
- * @throws ConfigurationException An error occurred setting up the configuration in the
- * TransactionContext
.
+ * @throws ConfigurationException An error occurred setting up the configuration
+ * in the TransactionContext
.
*/
protected final void setUpContexts(final String transactionID) throws ConfigurationException {
final TransactionContextManager txMgr = TransactionContextManager.getInstance();
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/MoaSigInitializer.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/MoaSigInitializer.java
index f0ee4612..77bbc88b 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/MoaSigInitializer.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/MoaSigInitializer.java
@@ -6,8 +6,14 @@ import java.security.Provider;
import java.security.Security;
import java.util.Iterator;
import java.util.Map.Entry;
+
import javax.annotation.Nonnull;
import javax.annotation.PostConstruct;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.ISchemaRessourceProvider;
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceConfigurationException;
import at.gv.egovernment.moa.spss.MOAException;
@@ -15,9 +21,6 @@ import at.gv.egovernment.moa.spss.api.Configurator;
import at.gv.egovernment.moaspss.logging.LoggingContext;
import at.gv.egovernment.moaspss.logging.LoggingContextManager;
import at.gv.egovernment.moaspss.util.DOMUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
import iaik.asn1.structures.AlgorithmID;
import iaik.security.ec.provider.ECCelerate;
import iaik.security.provider.IAIK;
@@ -30,7 +33,6 @@ public class MoaSigInitializer {
private Configurator moaSigConfigurator;
-
/**
* Get MOA-Sig configuration object.
*
@@ -76,7 +78,6 @@ public class MoaSigInitializer {
}
-
// Inject additional XML schemes
if (schemas != null && schemas.length > 0) {
log.debug("Infjecting additional XML schemes ... ");
@@ -100,30 +101,29 @@ public class MoaSigInitializer {
moaSigConfigurator = Configurator.getInstance();
-
} catch (final MOAException e) {
log.error("MOA-SP initialization FAILED!", e.getWrapped());
throw new MoaSigServiceConfigurationException("service.moasig.04",
- new Object[] {e.toString()}, e);
+ new Object[] { e.toString() }, e);
}
-
}
private static void fixJava8_141ProblemWithSslAlgorithms() {
log.info("Change AlgorithmIDs to fix problems with Java8 >= 141 ...");
- // new AlgorithmID("1.2.840.113549.1.1.4", "md5WithRSAEncryption", new String[] { "MD5withRSA",
+ // new AlgorithmID("1.2.840.113549.1.1.4", "md5WithRSAEncryption", new String[]
+ // { "MD5withRSA",
// "MD5/RSA", }, null, true);
new AlgorithmID("1.2.840.113549.1.1.5", "sha1WithRSAEncryption",
- new String[] {"SHA1withRSA", "SHA1/RSA", "SHA-1/RSA", "SHA/RSA",}, null, true);
+ new String[] { "SHA1withRSA", "SHA1/RSA", "SHA-1/RSA", "SHA/RSA", }, null, true);
new AlgorithmID("1.2.840.113549.1.1.14", "sha224WithRSAEncryption",
- new String[] {"SHA224withRSA", "SHA224/RSA", "SHA-224/RSA",}, null, true);
+ new String[] { "SHA224withRSA", "SHA224/RSA", "SHA-224/RSA", }, null, true);
new AlgorithmID("1.2.840.113549.1.1.11", "sha256WithRSAEncryption",
- new String[] {"SHA256withRSA", "SHA256/RSA", "SHA-256/RSA",}, null, true);
+ new String[] { "SHA256withRSA", "SHA256/RSA", "SHA-256/RSA", }, null, true);
new AlgorithmID("1.2.840.113549.1.1.12", "sha384WithRSAEncryption",
- new String[] {"SHA384withRSA", "SHA384/RSA", "SHA-384/RSA",}, null, true);
+ new String[] { "SHA384withRSA", "SHA384/RSA", "SHA-384/RSA", }, null, true);
new AlgorithmID("1.2.840.113549.1.1.13", "sha512WithRSAEncryption",
- new String[] {"SHA512withRSA", "SHA512/RSA", "SHA-512/RSA"}, null, true);
+ new String[] { "SHA512withRSA", "SHA512/RSA", "SHA-512/RSA" }, null, true);
log.info("Change AlgorithmIDs finished");
}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/MoaSigSpringResourceProvider.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/MoaSigSpringResourceProvider.java
index c8275264..d09b26de 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/MoaSigSpringResourceProvider.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/MoaSigSpringResourceProvider.java
@@ -11,7 +11,7 @@ public class MoaSigSpringResourceProvider implements SpringResourceProvider {
public Resource[] getResourcesToLoad() {
final ClassPathResource moaSigConfig =
new ClassPathResource("/moa-sig-service.beans.xml", MoaSigSpringResourceProvider.class);
- return new Resource[] {moaSigConfig};
+ return new Resource[] { moaSigConfig };
}
@Override
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureCreationService.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureCreationService.java
index 338e77d8..559af62a 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureCreationService.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureCreationService.java
@@ -18,17 +18,14 @@ public class SignatureCreationService extends AbstractSignatureService
private XMLSignatureCreationInvoker xadesInvoker;
private CMSSignatureCreationInvoker cadesInvoker;
-
-
@PostConstruct
protected void internalInitializer() {
log.debug("Instanzing SignatureCreationService implementation ... ");
xadesInvoker = XMLSignatureCreationInvoker.getInstance();
cadesInvoker = CMSSignatureCreationInvoker.getInstance();
- log.trace("XML_impl: {} , CMS_imp: {}",
- xadesInvoker.getClass().getName(), cadesInvoker.getClass().getName());
+ log.trace("XML_impl: {} , CMS_imp: {}",
+ xadesInvoker.getClass().getName(), cadesInvoker.getClass().getName());
log.info("MOA-Sig signature-creation service initialized");
-
}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureVerificationService.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureVerificationService.java
index 3dbda391..8fc4086e 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureVerificationService.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/SignatureVerificationService.java
@@ -3,10 +3,21 @@ package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl;
import java.io.ByteArrayInputStream;
import java.security.cert.CertificateEncodingException;
import java.util.List;
+
import javax.annotation.PostConstruct;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.lang.Nullable;
+import org.springframework.stereotype.Service;
+import org.springframework.util.Base64Utils;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.ISignatureVerificationService;
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.ICMSSignatureVerificationResponse;
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXMLSignatureVerificationResponse;
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.ICmsSignatureVerificationResponse;
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXmlSignatureVerificationResponse;
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceBuilderException;
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceException;
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.parser.VerifyXmlSignatureResponseParser;
@@ -22,15 +33,6 @@ import at.gv.egovernment.moa.spss.api.xmlverify.VerifyXMLSignatureResponse;
import at.gv.egovernment.moa.spss.server.invoke.CMSSignatureVerificationInvoker;
import at.gv.egovernment.moa.spss.server.invoke.XMLSignatureVerificationInvoker;
import at.gv.egovernment.moaspss.util.Constants;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.lang.Nullable;
-import org.springframework.stereotype.Service;
-import org.springframework.util.Base64Utils;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-
/**
* MOA-Sig based signature verification implementation.
@@ -54,12 +56,12 @@ public class SignatureVerificationService extends AbstractSignatureService
/*
* (non-Javadoc)
*
- * @see at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.ISignatureVerificationService#
- * verifyCMSSignature(byte[], java.lang.String)
+ * @see at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.
+ * ISignatureVerificationService# verifyCMSSignature(byte[], java.lang.String)
*/
@Override
@Nullable
- public ICMSSignatureVerificationResponse verifyCmsSignature(final byte[] signature,
+ public ICmsSignatureVerificationResponse verifyCmsSignature(final byte[] signature,
final String trustProfileID) throws MoaSigServiceException {
try {
// setup context
@@ -74,12 +76,12 @@ public class SignatureVerificationService extends AbstractSignatureService
} catch (final MOAException e) {
log.warn("CMS signature verification has an error.", e);
- throw new MoaSigServiceException("service.03", new Object[] {e.toString()}, e);
+ throw new MoaSigServiceException("service.03", new Object[] { e.toString() }, e);
} catch (final CertificateEncodingException e) {
log.warn("Can NOT serialize X509 certificate from CMS/CAdES signature-verification response",
e);
- throw new MoaSigServiceException("service.03", new Object[] {e.toString()}, e);
+ throw new MoaSigServiceException("service.03", new Object[] { e.toString() }, e);
} finally {
tearDownContexts();
@@ -91,11 +93,11 @@ public class SignatureVerificationService extends AbstractSignatureService
/*
* (non-Javadoc)
*
- * @see at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.ISignatureVerificationService#
- * verifyXMLSignature(byte[], java.lang.String)
+ * @see at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.
+ * ISignatureVerificationService# verifyXMLSignature(byte[], java.lang.String)
*/
@Override
- public IXMLSignatureVerificationResponse verifyXmlSignature(final byte[] signature,
+ public IXmlSignatureVerificationResponse verifyXmlSignature(final byte[] signature,
final String trustProfileID) throws MoaSigServiceException {
return verifyXmlSignature(signature, trustProfileID, null, DEFAULT_XPATH_SIGNATURE_LOCATION);
@@ -104,11 +106,12 @@ public class SignatureVerificationService extends AbstractSignatureService
/*
* (non-Javadoc)
*
- * @see at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.ISignatureVerificationService#
- * verifyXMLSignature(byte[], java.lang.String, java.util.List)
+ * @see at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.
+ * ISignatureVerificationService# verifyXMLSignature(byte[], java.lang.String,
+ * java.util.List)
*/
@Override
- public IXMLSignatureVerificationResponse verifyXmlSignature(final byte[] signature,
+ public IXmlSignatureVerificationResponse verifyXmlSignature(final byte[] signature,
final String trustProfileID, final List
*
- * This builder only generates verification-request for enveloped CMS or CAdES signatures
+ * This builder only generates verification-request for enveloped CMS or CAdES
+ * signatures
* This
*
- * @param signature CMS or CAdES signature
- * @param trustProfileID trustProfileID MOA-Sig Trust-Profile
- * @param isPdfSignature Make CAdES signature as part of an PAdES document
- * @param performExtendedValidation To extended validation. See MOA-Sig documentation for detailed
- * information
+ * @param signature CMS or CAdES signature
+ * @param trustProfileID trustProfileID MOA-Sig Trust-Profile
+ * @param isPdfSignature Make CAdES signature as part of an PAdES
+ * document
+ * @param performExtendedValidation To extended validation. See MOA-Sig
+ * documentation for detailed information
* @return
*/
private VerifyCMSSignatureRequest buildVerfifyCmsRequest(final byte[] signature,
@@ -245,11 +252,12 @@ public class SignatureVerificationService extends AbstractSignatureService
/**
* Build a VerifyXML-Signature request for MOA-Sig.
*
- * @param signature Serialized XML signature
- * @param trustProfileID MOA-Sig Trust-Profile
- * @param verifyTransformsInfoProfileID {@link List} of Transformation-Profiles used for
- * validation
- * @param xpathSignatureLocation Xpath that points to location of Signature element
+ * @param signature Serialized XML signature
+ * @param trustProfileID MOA-Sig Trust-Profile
+ * @param verifyTransformsInfoProfileID {@link List} of Transformation-Profiles
+ * used for validation
+ * @param xpathSignatureLocation Xpath that points to location of
+ * Signature element
* @return MOA-Sig verification request element
* @throws MoaSigServiceBuilderException In case of an error
*/
@@ -266,7 +274,6 @@ public class SignatureVerificationService extends AbstractSignatureService
Constants.DSIG_NS_URI);
requestDoc_.appendChild(requestElem_);
-
// build the request
final Element verifiySignatureInfoElem =
requestDoc_.createElementNS(MOA_NS_URI, "VerifySignatureInfo");
@@ -331,19 +338,18 @@ public class SignatureVerificationService extends AbstractSignatureService
} catch (final Throwable t) {
log.warn("Can NOT build VerifyXML-Signature request for MOA-Sig", t);
- throw new MoaSigServiceBuilderException("service.moasig.03", new Object[] {t.getMessage()},
+ throw new MoaSigServiceBuilderException("service.moasig.03", new Object[] { t.getMessage() },
t);
}
}
-
-
@PostConstruct
protected void internalInitializer() {
log.debug("Instanzing SignatureVerificationService implementation ... ");
- // svs = at.gv.egovernment.moa.spss.api.SignatureVerificationService.getInstance();
+ // svs =
+ // at.gv.egovernment.moa.spss.api.SignatureVerificationService.getInstance();
cadesInvoker = CMSSignatureVerificationInvoker.getInstance();
xadesInvocer = XMLSignatureVerificationInvoker.getInstance();
log.info("MOA-Sig signature-verification service initialized");
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java
index 18ee6edb..0485f31f 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/GenericSignatureVerificationResponse.java
@@ -2,7 +2,6 @@ package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.data;
import java.io.Serializable;
import java.security.cert.CertificateException;
-import iaik.x509.X509Certificate;
import java.util.Date;
import org.slf4j.Logger;
@@ -11,6 +10,7 @@ import org.slf4j.LoggerFactory;
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IGenericSignatureVerificationResponse;
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceException;
import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceParserException;
+import iaik.x509.X509Certificate;
public class GenericSignatureVerificationResponse
implements IGenericSignatureVerificationResponse, Serializable {
@@ -19,32 +19,31 @@ public class GenericSignatureVerificationResponse
private static final Logger log =
LoggerFactory.getLogger(GenericSignatureVerificationResponse.class);
-
- /** The signing time */
+ /** The signing time. */
private Date signingDateTime;
- /** The signatureCheckCode to be stored */
+ /** The signatureCheckCode to be stored. */
private int signatureCheckCode;
- /** The certificateCheckCode to be stored */
+ /** The certificateCheckCode to be stored. */
private int certificateCheckCode;
- /** The publicAuthority to be stored */
+ /** The publicAuthority to be stored. */
private boolean publicAuthority;
- /** The publicAuthorityCode to be stored */
+ /** The publicAuthorityCode to be stored. */
private String publicAuthorityCode;
- /** The qualifiedCertificate to be stored */
+ /** The qualifiedCertificate to be stored. */
private boolean qualifiedCertificate;
private byte[] x509CertificateEncoded;
@Override
public Date getSigningDateTime() {
- if (this.signingDateTime != null) {
- return new Date(this.signingDateTime.getTime());
- }
+ if (this.signingDateTime != null) {
+ return new Date(this.signingDateTime.getTime());
+ }
return null;
}
@@ -87,11 +86,11 @@ public class GenericSignatureVerificationResponse
@Override
public byte[] getX509CertificateEncoded() {
- if (this.x509CertificateEncoded != null) {
- return this.x509CertificateEncoded.clone();
-
- }
- return null;
+ if (this.x509CertificateEncoded != null) {
+ return this.x509CertificateEncoded.clone();
+
+ }
+ return null;
}
@@ -107,10 +106,15 @@ public class GenericSignatureVerificationResponse
}
+ /**
+ * Set signature creation timestramp.
+ *
+ * @param signingDateTime timestamp
+ */
public void setSigningDateTime(final Date signingDateTime) {
- if (signingDateTime != null) {
- this.signingDateTime = new Date(signingDateTime.getTime());
- }
+ if (signingDateTime != null) {
+ this.signingDateTime = new Date(signingDateTime.getTime());
+ }
}
public void setSignatureCheckCode(final int signatureCheckCode) {
@@ -133,13 +137,16 @@ public class GenericSignatureVerificationResponse
this.qualifiedCertificate = qualifiedCertificate;
}
+ /**
+ * Set encoded signer certificate.
+ *
+ * @param x509CertificateEncoded signer cerificate
+ */
public void setX509CertificateEncoded(final byte[] x509CertificateEncoded) {
- if (x509CertificateEncoded != null) {
- this.x509CertificateEncoded = x509CertificateEncoded.clone();
-
- }
- }
-
+ if (x509CertificateEncoded != null) {
+ this.x509CertificateEncoded = x509CertificateEncoded.clone();
+ }
+ }
}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyCMSSignatureResponse.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyCMSSignatureResponse.java
deleted file mode 100644
index 0583a29e..00000000
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyCMSSignatureResponse.java
+++ /dev/null
@@ -1,10 +0,0 @@
-package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.data;
-
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.ICMSSignatureVerificationResponse;
-
-public class VerifyCMSSignatureResponse extends GenericSignatureVerificationResponse
- implements ICMSSignatureVerificationResponse {
-
- private static final long serialVersionUID = 708260904158070696L;
-
-}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyCmsSignatureResponse.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyCmsSignatureResponse.java
new file mode 100644
index 00000000..ed679828
--- /dev/null
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyCmsSignatureResponse.java
@@ -0,0 +1,10 @@
+package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.data;
+
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.ICmsSignatureVerificationResponse;
+
+public class VerifyCmsSignatureResponse extends GenericSignatureVerificationResponse
+ implements ICmsSignatureVerificationResponse {
+
+ private static final long serialVersionUID = 708260904158070696L;
+
+}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyXMLSignatureResponse.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyXMLSignatureResponse.java
deleted file mode 100644
index 003d2c46..00000000
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyXMLSignatureResponse.java
+++ /dev/null
@@ -1,119 +0,0 @@
-package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.data;
-
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXMLSignatureVerificationResponse;
-
-/**
- *
- *
- * @author tlenz
- *
- */
-
-public class VerifyXMLSignatureResponse extends GenericSignatureVerificationResponse
- implements IXMLSignatureVerificationResponse {
-
- private static final long serialVersionUID = 8386070769565711601L;
-
- /** The xmlDsigSubjectName to be stored */
- private String xmlDsigSubjectName;
-
- /** The xmlDSIGManifestCheckCode to be stored */
- private int xmlDSIGManifestCheckCode;
- /** The xmlDSIGManigest to be stored */
- private boolean xmlDSIGManigest;
-
- /**
- * The result of the signature manifest check. The default value -1
indicates that
- * the signature manifest has not been checked.
- */
- private int signatureManifestCheckCode = -1;
-
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#getXmlDSIGManifestCheckCode()
- */
- @Override
- public int getXmlDSIGManifestCheckCode() {
- return xmlDSIGManifestCheckCode;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#getXmlDsigSubjectName()
- */
- @Override
- public String getXmlDsigSubjectName() {
- return xmlDsigSubjectName;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#setXmlDSIGManifestCheckCode(
- * int)
- */
- public void setXmlDSIGManifestCheckCode(final int xmlDSIGManifestCheckCode) {
- this.xmlDSIGManifestCheckCode = xmlDSIGManifestCheckCode;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#setXmlDsigSubjectName(java.lang
- * .String)
- */
- public void setXmlDsigSubjectName(final String xmlDsigSubjectName) {
- this.xmlDsigSubjectName = xmlDsigSubjectName;
- }
-
-
- /*
- * (non-Javadoc)
- *
- * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#isXmlDSIGManigest()
- */
- @Override
- public boolean isXmlDSIGManigest() {
- return xmlDSIGManigest;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#setXmlDSIGManigest(boolean)
- */
- public void setXmlDSIGManigest(final boolean xmlDSIGManigest) {
- this.xmlDSIGManigest = xmlDSIGManigest;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#getSignatureManifestCheckCode()
- */
- @Override
- public int getSignatureManifestCheckCode() {
- return signatureManifestCheckCode;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see
- * at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#setSignatureManifestCheckCode(
- * int)
- */
- public void setSignatureManifestCheckCode(final int signatureManifestCheckCode) {
- this.signatureManifestCheckCode = signatureManifestCheckCode;
- }
-
-}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyXmlSignatureResponse.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyXmlSignatureResponse.java
new file mode 100644
index 00000000..4b0632b1
--- /dev/null
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/data/VerifyXmlSignatureResponse.java
@@ -0,0 +1,115 @@
+package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.data;
+
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXmlSignatureVerificationResponse;
+
+/**
+ * MOA-Sig signature verification response for XML based signatures.
+ *
+ * @author tlenz
+ *
+ */
+
+public class VerifyXmlSignatureResponse extends GenericSignatureVerificationResponse
+ implements IXmlSignatureVerificationResponse {
+
+ private static final long serialVersionUID = 8386070769565711601L;
+
+ /** The xmlDsigSubjectName to be stored. */
+ private String xmlDsigSubjectName;
+
+ /** The xmlDSIGManifestCheckCode to be stored. */
+ private int xmlDsigManifestCheckCode;
+ /** The xmlDSIGManigest to be stored. */
+ private boolean xmlDsigManigest;
+
+ /**
+ * The result of the signature manifest check. The default value -1
+ * indicates that the signature manifest has not been checked.
+ */
+ private int signatureManifestCheckCode = -1;
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#
+ * getXmlDSIGManifestCheckCode()
+ */
+ @Override
+ public int getXmlDsigManifestCheckCode() {
+ return xmlDsigManifestCheckCode;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#
+ * getXmlDsigSubjectName()
+ */
+ @Override
+ public String getXmlDsigSubjectName() {
+ return xmlDsigSubjectName;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#
+ * setXmlDSIGManifestCheckCode( int)
+ */
+ public void setXmlDsigManifestCheckCode(final int xmlDsigManifestCheckCode) {
+ this.xmlDsigManifestCheckCode = xmlDsigManifestCheckCode;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#
+ * setXmlDsigSubjectName(java.lang .String)
+ */
+ public void setXmlDsigSubjectName(final String xmlDsigSubjectName) {
+ this.xmlDsigSubjectName = xmlDsigSubjectName;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#
+ * isXmlDSIGManigest()
+ */
+ @Override
+ public boolean isXmlDsigManigest() {
+ return xmlDsigManigest;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#
+ * setXmlDSIGManigest(boolean)
+ */
+ public void setXmlDsigManigest(final boolean xmlDsigManigest) {
+ this.xmlDsigManigest = xmlDsigManigest;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#
+ * getSignatureManifestCheckCode()
+ */
+ @Override
+ public int getSignatureManifestCheckCode() {
+ return signatureManifestCheckCode;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see at.gv.egovernment.moa.id.auth.data.IVerifiyXMLSignatureResponse#
+ * setSignatureManifestCheckCode( int)
+ */
+ public void setSignatureManifestCheckCode(final int signatureManifestCheckCode) {
+ this.signatureManifestCheckCode = signatureManifestCheckCode;
+ }
+
+}
diff --git a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/parser/VerifyXmlSignatureResponseParser.java b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/parser/VerifyXmlSignatureResponseParser.java
index aa094f1e..231cb94f 100644
--- a/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/parser/VerifyXmlSignatureResponseParser.java
+++ b/eaaf_modules/eaaf_module_moa-sig/src/main/java/at/gv/egiz/eid/authhandler/modules/sigverify/moasig/impl/parser/VerifyXmlSignatureResponseParser.java
@@ -2,23 +2,24 @@ package at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.parser;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXMLSignatureVerificationResponse;
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceException;
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceParserException;
-import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.data.VerifyXMLSignatureResponse;
-import at.gv.egovernment.moaspss.util.Constants;
-import at.gv.egovernment.moaspss.util.DOMUtils;
-import at.gv.egovernment.moaspss.util.XPathUtils;
+
import org.joda.time.DateTime;
import org.joda.time.format.ISODateTimeFormat;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.lang.NonNull;
import org.w3c.dom.Element;
+
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.api.data.IXmlSignatureVerificationResponse;
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceException;
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.exceptions.MoaSigServiceParserException;
+import at.gv.egiz.eid.authhandler.modules.sigverify.moasig.impl.data.VerifyXmlSignatureResponse;
+import at.gv.egovernment.moaspss.util.Constants;
+import at.gv.egovernment.moaspss.util.DOMUtils;
+import at.gv.egovernment.moaspss.util.XPathUtils;
import iaik.utils.Base64InputStream;
import iaik.x509.X509Certificate;
-
public class VerifyXmlSignatureResponseParser {
private static final Logger log = LoggerFactory.getLogger(VerifyXmlSignatureResponseParser.class);
@@ -63,13 +64,15 @@ public class VerifyXmlSignatureResponseParser {
private static final String SIGNING_TIME_XPATH = ROOT + MOA + "SigningTime";
-
- /** This is the root element of the XML-Document provided by the Security Layer Card. */
+ /**
+ * This is the root element of the XML-Document provided by the Security Layer
+ * Card.
+ */
private Element verifyXmlSignatureResponse;
/**
- * Constructor for VerifyXMLSignatureResponseParser. A DOM-representation of the incoming String
- * will be created
+ * Constructor for VerifyXMLSignatureResponseParser. A DOM-representation of the
+ * incoming String will be created
*
* @param xmlResponse <InfoboxReadResponse>
as String
* @throws MoaSigServiceParserException on any parsing error
@@ -82,14 +85,14 @@ public class VerifyXmlSignatureResponseParser {
} catch (final Throwable t) {
log.warn("Can not parse MOA-Sig response.", t);
- throw new MoaSigServiceParserException("service.moasig.02", new Object[] {t.toString()}, t);
+ throw new MoaSigServiceParserException("service.moasig.02", new Object[] { t.toString() }, t);
}
}
/**
- * Constructor for VerifyXMLSignatureResponseParser. A DOM-representation of the incoming
- * Inputstream will be created
+ * Constructor for VerifyXMLSignatureResponseParser. A DOM-representation of the
+ * incoming Inputstream will be created
*
* @param xmlResponse <InfoboxReadResponse>
as InputStream
* @throws MoaSigServiceParserException on any parsing error
@@ -101,14 +104,14 @@ public class VerifyXmlSignatureResponseParser {
} catch (final Throwable t) {
log.warn("Can not parse MOA-Sig response.", t);
- throw new MoaSigServiceParserException("service.moasig.02", new Object[] {t.toString()}, t);
+ throw new MoaSigServiceParserException("service.moasig.02", new Object[] { t.toString() }, t);
}
}
/**
- * Constructor for VerifyXMLSignatureResponseParser. The incoming Element will be used for further
- * operations
+ * Constructor for VerifyXMLSignatureResponseParser. The incoming Element will
+ * be used for further operations
*
* @param xmlResponse <InfoboxReadResponse>
as Element
*/
@@ -118,15 +121,16 @@ public class VerifyXmlSignatureResponseParser {
}
/**
- * Parse MOA-Sig signatur-verification result into {@link IXMLSignatureVerificationResponse}.
+ * Parse MOA-Sig signatur-verification result into
+ * {@link IXmlSignatureVerificationResponse}.
*
- * @return {@link IXMLSignatureVerificationResponse}
+ * @return {@link IXmlSignatureVerificationResponse}
* @throws MoaSigServiceException on any parsing error
*/
@NonNull
- public IXMLSignatureVerificationResponse parseData() throws MoaSigServiceException {
+ public IXmlSignatureVerificationResponse parseData() throws MoaSigServiceException {
try {
- final VerifyXMLSignatureResponse respData = new VerifyXMLSignatureResponse();
+ final VerifyXmlSignatureResponse respData = new VerifyXmlSignatureResponse();
respData.setXmlDsigSubjectName(
XPathUtils.getElementValue(verifyXmlSignatureResponse, DSIG_SUBJECT_NAME_XPATH, ""));
final Element e = (Element) XPathUtils.selectSingleNode(verifyXmlSignatureResponse,
@@ -151,11 +155,11 @@ public class VerifyXmlSignatureResponseParser {
final String xmlDsigCheckCode = XPathUtils.getElementValue(verifyXmlSignatureResponse,
XMLDSIG_MANIFEST_CHECK_CODE_XPATH, null);
if (xmlDsigCheckCode != null) {
- respData.setXmlDSIGManigest(true);
- respData.setXmlDSIGManifestCheckCode(Integer.parseInt(xmlDsigCheckCode));
+ respData.setXmlDsigManigest(true);
+ respData.setXmlDsigManifestCheckCode(Integer.parseInt(xmlDsigCheckCode));
} else {
- respData.setXmlDSIGManigest(false);
+ respData.setXmlDsigManigest(false);
}
@@ -181,10 +185,9 @@ public class VerifyXmlSignatureResponseParser {
} catch (final Throwable t) {
log.warn("Can not parse MOA-Sig response.", t);
- throw new MoaSigServiceParserException("service.moasig.02", new Object[] {t.toString()}, t);
+ throw new MoaSigServiceParserException("service.moasig.02", new Object[] { t.toString() }, t);
}
}
-
}
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/Pvp2SProfileCoreSpringResourceProvider.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/Pvp2SProfileCoreSpringResourceProvider.java
index c0482c9d..2779ee1d 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/Pvp2SProfileCoreSpringResourceProvider.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/Pvp2SProfileCoreSpringResourceProvider.java
@@ -11,7 +11,7 @@
* 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.
@@ -42,7 +42,7 @@ public class Pvp2SProfileCoreSpringResourceProvider implements SpringResourcePro
final ClassPathResource sl20AuthConfig =
new ClassPathResource("/eaaf_pvp.beans.xml", Pvp2SProfileCoreSpringResourceProvider.class);
- return new Resource[] {sl20AuthConfig};
+ return new Resource[] { sl20AuthConfig };
}
}
diff --git a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/PvpConstants.java b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/PvpConstants.java
index 8bd2f024..b271b46d 100644
--- a/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/PvpConstants.java
+++ b/eaaf_modules/eaaf_module_pvp2_core/src/main/java/at/gv/egiz/eaaf/modules/pvp2/PvpConstants.java
@@ -22,13 +22,16 @@ package at.gv.egiz.eaaf.modules.pvp2;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+
import javax.xml.namespace.QName;
-import at.gv.egiz.eaaf.core.api.data.PVPAttributeDefinitions;
-import at.gv.egiz.eaaf.core.impl.data.Trible;
+
import org.opensaml.xml.encryption.EncryptionConstants;
import org.opensaml.xml.signature.SignatureConstants;
-public interface PvpConstants extends PVPAttributeDefinitions {
+import at.gv.egiz.eaaf.core.api.data.PvpAttributeDefinitions;
+import at.gv.egiz.eaaf.core.impl.data.Trible;
+
+public interface PvpConstants extends PvpAttributeDefinitions {
String DEFAULT_SIGNING_METHODE =
SignatureConstants.ALGO_ID_SIGNATURE_RSA_SHA256;
@@ -53,13 +56,14 @@ public interface PvpConstants extends PVPAttributeDefinitions {
String SINGLELOGOUT = "SingleLogOut";
/**
- * Get required PVP attributes for egovtoken First : PVP attribute name (OID) Second: FriendlyName
- * Third: Required.
+ * Get required PVP attributes for egovtoken First : PVP attribute name (OID)
+ * Second: FriendlyName Third: Required.
*
*/
List
*
- * INFO: If a specific attribute can not be build, a info is logged, but no execpetion is
- * thrown. Therefore, the return List must not include all requested attributes.
+ * INFO: If a specific attribute can not be build, a info is logged, but
+ * no execpetion is thrown. Therefore, the return List must not include all
+ * requested attributes.
*
- * @param authData AuthenticationData IAuthData
which is used to build the attribute
- * values, but never null
- * @param reqAttributenName List of PVP attribute names which are requested, but never
- * null
+ * @param authData AuthenticationData IAuthData
which is
+ * used to build the attribute values, but never
+ * null
+ * @param reqAttributenName List of PVP attribute names which are requested, but
+ * never null
* @return List of PVP attributes, but never null
*/
public static List
- * Primarily, the 'SessionNotOnOrAfter' attribute in the SAML2 'AuthnStatment' element is used. If - * this is empty, this method returns value of SAML 'Conditions' element. - *
+ *+ * Primarily, the 'SessionNotOnOrAfter' attribute in the SAML2 'AuthnStatment' + * element is used. If this is empty, this method returns value of SAML + * 'Conditions' element. + *
* * @return Date, until this SAML2 assertion is valid */ @@ -298,9 +302,9 @@ public class AssertionAttributeExtractor { /** * Get the Assertion validFrom period. * - *+ *
* This method returns value of SAML 'Conditions' element. - *
+ * * * @return Date, after this SAML2 assertion is valid, otherwise null */ @@ -331,21 +335,9 @@ public class AssertionAttributeExtractor { && assertion.getAttributeStatements().size() > 0) { final AttributeStatement attrStat = assertion.getAttributeStatements().get(0); for (final Attribute attr : attrStat.getAttributes()) { -// if (attr.getName().startsWith(PvpConstants.STORK_ATTRIBUTE_PREFIX)) { -// final List