<CreateXMLSignatureRequest>
structure
* used for requesting a signature under the authentication block from the
* security layer implementation.
*
* @author Paul Ivancsics
* @version $Id$
*/
public class CreateXMLSignatureRequestBuilder implements Constants {
/** private static String nl contains the NewLine representation in Java*/
private static final String nl = "\n";
/**
* XML template for the <moa:CreateXMLSignatureRequest>
to be built
*/
private static final String CREATE_XML_SIGNATURE_REQUEST =
"" + nl +
"<{3}:CreateXMLSignatureRequest xmlns:dsig=''" + DSIG_NS_URI + "'' {5}>" + nl +
" <{3}:KeyboxIdentifier>{1}{3}:KeyboxIdentifier>" + nl +
" <{3}:DataObjectInfo Structure=''detached''>" + nl +
" <{4}:DataObject Reference=''''/>" + nl +
"{2}" +
" {3}:DataObjectInfo>" + nl +
" <{3}:SignatureInfo>" + nl +
" <{3}:SignatureEnvironment>" + nl +
" <{4}:XMLContent>{0}{4}:XMLContent>" + nl +
" {3}:SignatureEnvironment>" + nl +
" <{3}:SignatureLocation xmlns:saml=''" + SAML_NS_URI + "'' Index=''2''>/saml:Assertion{3}:SignatureLocation>" + nl +
" {3}:SignatureInfo>" + nl +
"{3}:CreateXMLSignatureRequest>";
/**
* Constructor for CreateXMLSignatureRequestBuilder.
*/
public CreateXMLSignatureRequestBuilder() {
super();
}
/**
* Builds the <CreateXMLSignatureRequest>
.
*
* @param authBlock String representation of XML authentication block
* @param keyBoxIdentifier the key box identifier which will be used (e.g. CertifiedKeypair)
* @param slVersion12 specifies whether the Security Layer version number is 1.2 or not
* @return String representation of <CreateXMLSignatureRequest>
*/
public String build(String authBlock, String keyBoxIdentifier, List<CreateXMLSignatureRequest>
for a foreign ID.
*
* @param subject the subject of the foreign certificate
* @param oaParam parameter for the OA
* @param session current session
* @return String representation of <CreateXMLSignatureRequest>
*/
public String buildForeignID(String subject, OAAuthParameter oaParam, AuthenticationSession session) {
String request = "";
request += "Persönliche Daten (Personal Data)
"; request += "Name: | "; request += ""; request += subject; request += " | "; request += "
Daten zur Anwendung (Application Data)
"; request += "Dienst (Service): | "; request += ""; // friendlyname from OA request += StringUtils.isEmpty(oaParam.getFriendlyName()) ? "" : oaParam.getFriendlyName(); request += " | "; request += "
Land (Country): | "; request += "Österreich (Austria) | "; request += "
Technische Parameter (Technical Parameters)
"; request += "URL: | "; request += ""; //public URL prefix from OA request += oaParam.getPublicURLPrefix(); request += " | "; request += "
"; request += identifierType + ":"; request += " | "; request += ""; request += identifier; request += " | "; request += "
"; request += "Sektor (Sector): | "; request += ""; request += target + " (" + sectorName + ")"; request += " | "; request += "
Datum (Date): | "; request += ""; request += date; request += " | "; request += "
Zeit (Time): | "; request += ""; request += time; request += " | "; request += "
Mit der Anmeldung erfolgt eine Abfrage des Ergänzungsregister für " + "natürliche Personen (ERnP), damit ich meinen elektronischen " + "Identitätsnachweis (meine elektronische Identitätskarte) unmittelbar " + "als Österreichische Bürgerkarte verwenden kann. Ich bin nicht im " + "Zentralen Melderegister eingetragen und stimme, sofern ich nicht im " + "ERnP eingetragen bin, einer Eintragung ins ERnP zu. Ich nehme zur " + "Kenntnis, dass die Eintragung ins ERnP ausschließlich der Aufzeichnung " + "jener Daten, die für die eindeutige Identität notwendig sind, dient.
"; request += "I affirm that I am not registered with the Austrian Central " + "Register of Residents or the Supplementary Register for Natural Persons. I therefore " + "apply for registration in the Supplementary Register for Natural Persons in order to use " + "my electronic identity (my electronic ID card) as an Austrian citizen card. I take note " + "that registration in the Supplementary Register for Natural Persons solely serves keeping " + "records of those data that are used for validation of unique identity and that those data " + "is only used for e-government purposes.
"; // request += "I hereby request to access this e-government application by using my " +
// "domestic electronic identity.
" +
// "I further affirm that I am not yet registered with the Austrian Central " +
// "Residents Registry and that I am not obliged to register with the Austrian " +
// "Central Residents Registry according to Austrian law.
" +
// "In the event I am not yet registered with the Supplementary Register, I " +
// "explicitly grant to do so according to §6 (5) E-Government Act (EGovG, idF: " +
// "BGBl. I Nr. 7/2008 und BGBl. I Nr. 59/2008).