diff options
author | kstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2012-01-26 21:59:33 +0000 |
---|---|---|
committer | kstranacher <kstranacher@d688527b-c9ab-4aba-bd8d-4036d912da1d> | 2012-01-26 21:59:33 +0000 |
commit | a9b2e962d2853b74d314cb9f614cab446a7134c0 (patch) | |
tree | ebf5e54d2a8321162da208f2b7dba1285dc926f9 /id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java | |
parent | fd49902f62d361acb1102024c98c304fac265fa1 (diff) | |
download | moa-id-spss-a9b2e962d2853b74d314cb9f614cab446a7134c0.tar.gz moa-id-spss-a9b2e962d2853b74d314cb9f614cab446a7134c0.tar.bz2 moa-id-spss-a9b2e962d2853b74d314cb9f614cab446a7134c0.zip |
* optionalen useUTC Parameter in Konfig eingefügt (damit IssueInstant in SAML Assertion auf UTC einstellbar)
* optionalen sourceID Parameter bei MOA-ID Aufruf eingefügt (wird 1:1 in SAML Assertion übernommen)
* Update Doku (useUTC, sourceID, Vollmachten-Profile)
* Ablaufänderung bei Vollmachten-Modus (Signatur Zertifikat wird aus Signatur entnommen und nicht mittels eigenem Infobox-Request)
git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@1233 d688527b-c9ab-4aba-bd8d-4036d912da1d
Diffstat (limited to 'id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java')
-rw-r--r-- | id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java index 8af4e3af5..410d045f0 100644 --- a/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java +++ b/id/server/idserverlib/src/main/java/at/gv/egovernment/moa/id/auth/builder/AuthenticationAssertionBuilder.java @@ -57,6 +57,11 @@ public class AuthenticationAssertionBuilder { " <saml:Attribute AttributeName=''{0}'' AttributeNamespace=''{1}''>" + NL + " <saml:AttributeValue>{2}</saml:AttributeValue>" + NL + " </saml:Attribute>"+ NL; + + protected static String SAML_ATTRIBUTE_NO_NAMESPACE = + " <saml:Attribute AttributeName=''{0}''>" + NL + + " <saml:AttributeValue>{1}</saml:AttributeValue>" + NL + + " </saml:Attribute>"+ NL; /** * Empty constructor @@ -108,5 +113,26 @@ public class AuthenticationAssertionBuilder { } return sb.toString(); } + + /** + * Builds the SAML attributes to be appended to the AUTHBlock or to the SAML assertion + * delivered to the online application. + * The method traverses through the list of given SAML attribute objects and builds an + * XML structure (String representation) for each of the attributes. + * + * @param extendedSAMLAttributes The SAML attributes to be appended to the AUTHBlock or + * to the SAML assertion delivered to the online application. + * @return A string representation including the XML structures of + * the SAML attributes. + * + * @throws ParseException If an error occurs on serializing an SAML attribute. + */ + protected String buildSourceIDSAMLAttributes(String sourceID) throws ParseException { + StringBuffer sb = new StringBuffer(); + if (sourceID!=null) + sb.append(MessageFormat.format( SAML_ATTRIBUTE_NO_NAMESPACE, new Object[] {"SourceID", sourceID})); + + return sb.toString(); + } } |