aboutsummaryrefslogtreecommitdiff
path: root/id/server/idserverlib/src/main/java
diff options
context:
space:
mode:
authorkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2011-11-08 18:49:53 +0000
committerkstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d>2011-11-08 18:49:53 +0000
commit9231e07269419fcf32b17d3d2a57c70a47f36866 (patch)
tree7b4aa5a888893526a118bef2846da56131b2ecb9 /id/server/idserverlib/src/main/java
parentf6e86e971e42e23ecc8436d41cbfeacb6dd7a93f (diff)
downloadmoa-id-spss-9231e07269419fcf32b17d3d2a57c70a47f36866.tar.gz
moa-id-spss-9231e07269419fcf32b17d3d2a57c70a47f36866.tar.bz2
moa-id-spss-9231e07269419fcf32b17d3d2a57c70a47f36866.zip
SAML Attribute OIDTextualDescription hinzugefügt (nötig für Organwalter und berufsm. Parteienvertreter)
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1229 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server/idserverlib/src/main/java')
-rw-r--r--id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java74
1 files changed, 74 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
index c4ab80c66..f58b41a4e 100644
--- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
+++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/AuthenticationServer.java
@@ -613,6 +613,22 @@ public class AuthenticationServer implements MOAIDAuthConstants {
AuthConfigurationProvider.getInstance().getOnlineApplicationParameter(
session.getPublicOAURLPrefix());
+
+
+ try {
+ // sets the extended SAML attributes for OID (Organwalter)
+ setExtendedSAMLAttributeForMandatesOID(session, mandate, oaParam.getBusinessService());
+ } catch (SAXException e) {
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID}, e);
+ } catch (IOException e) {
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID}, e);
+ } catch (ParserConfigurationException e) {
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID}, e);
+ } catch (TransformerException e) {
+ throw new AuthenticationException("auth.16", new Object[] { GET_MIS_SESSIONID}, e);
+ }
+
+
if (oaParam.getProvideFullMandatorData()) {
try {
// set extended SAML attributes if provideMandatorData is true
@@ -1073,6 +1089,32 @@ public class AuthenticationServer implements MOAIDAuthConstants {
}
/**
+ * Verifies the infoboxes (except of the identity link infobox) returned by the BKU by
+ * calling appropriate validator classes.
+ *
+ * @param session The actual authentication session.
+ * @param mandate The Mandate from the MIS
+ *
+ * @throws AuthenticationException
+ * @throws ConfigurationException
+ * @throws TransformerException
+ * @throws ParserConfigurationException
+ * @throws IOException
+ * @throws SAXException
+ */
+ private void setExtendedSAMLAttributeForMandatesOID(
+ AuthenticationSession session, MISMandate mandate, boolean business)
+ throws ValidateException, ConfigurationException, SAXException, IOException, ParserConfigurationException, TransformerException
+ {
+
+ ExtendedSAMLAttribute[] extendedSamlAttributes = addExtendedSamlAttributesOID(mandate, business);
+
+
+ AddAdditionalSAMLAttributes(session, extendedSamlAttributes, "MISService", "MISService");
+
+ }
+
+ /**
* Intermediate processing of the infoboxes. The first pending infobox
* validator may validate the provided input
*
@@ -1262,6 +1304,38 @@ public class AuthenticationServer implements MOAIDAuthConstants {
}
/**
+ * Adds the AUTH block related SAML attributes to the validation result.
+ * This is needed always before the AUTH block is to be signed, because the
+ * name of the mandator has to be set
+ * @throws ParserConfigurationException
+ * @throws IOException
+ * @throws SAXException
+ * @throws TransformerException
+ */
+ private static ExtendedSAMLAttribute[] addExtendedSamlAttributesOID(MISMandate mandate, boolean business) throws SAXException, IOException, ParserConfigurationException, TransformerException {
+
+ Vector extendedSamlAttributes = new Vector();
+
+
+ extendedSamlAttributes.clear();
+
+ String oid = mandate.getProfRep();
+
+ if (oid != null) {
+ String oidDescription = mandate.getTextualDescriptionOfOID();
+ extendedSamlAttributes.add(new ExtendedSAMLAttributeImpl(ParepValidator.EXT_SAML_MANDATE_OIDTEXTUALDESCRIPTION, oidDescription, SZRGWConstants.MANDATE_NS, ExtendedSAMLAttribute.NOT_ADD_TO_AUTHBLOCK));
+ }
+
+ ExtendedSAMLAttribute[] ret = new ExtendedSAMLAttribute[extendedSamlAttributes.size()];
+ extendedSamlAttributes.copyInto(ret);
+ Logger.debug("ExtendedSAML Attributes: " + ret.length);
+ return ret;
+
+
+
+ }
+
+ /**
*
* @param mandate
* @return