diff options
Diffstat (limited to 'eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data')
3 files changed, 149 insertions, 142 deletions
diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.java index 7c143ca2..a6017789 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/AuthProcessDataWrapper.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. * @@ -15,24 +15,23 @@ * 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; import java.util.Date; import java.util.HashMap; import java.util.Map; -import at.gv.egiz.eaaf.core.api.data.EAAFConstants; + +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import at.gv.egiz.eaaf.core.api.data.EaafConstants; import at.gv.egiz.eaaf.core.api.idp.EaafAuthProcessDataConstants; 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.EaafStorageException; -import org.apache.commons.lang3.StringUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; public class AuthProcessDataWrapper implements IAuthProcessDataContainer, EaafAuthProcessDataConstants { @@ -48,7 +47,8 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getIssueInstant() + * @see + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getIssueInstant() */ @Override public String getIssueInstant() { @@ -59,7 +59,8 @@ public class AuthProcessDataWrapper * (non-Javadoc) * * @see - * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setIssueInstant(java.lang.String) + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setIssueInstant( + * java.lang.String) */ @Override public void setIssueInstant(final String issueInstant) { @@ -70,7 +71,8 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#isAuthenticated() + * @see + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#isAuthenticated() */ @Override public boolean isAuthenticated() { @@ -78,11 +80,12 @@ public class AuthProcessDataWrapper } - /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setAuthenticated(boolean) + * @see + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setAuthenticated( + * boolean) */ @Override public void setAuthenticated(final boolean authenticated) { @@ -93,7 +96,8 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getIdentityLink() + * @see + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getIdentityLink() */ @Override public IIdentityLink getIdentityLink() { @@ -101,13 +105,12 @@ public class AuthProcessDataWrapper } - /* * (non-Javadoc) * * @see - * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setIdentityLink(at.gv.egovernment.moa - * .id.auth.data.IdentityLink) + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setIdentityLink(at. + * gv.egovernment.moa .id.auth.data.IdentityLink) */ @Override public void setIdentityLink(final IIdentityLink identityLink) { @@ -118,7 +121,8 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#isMandateUsed() + * @see + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#isMandateUsed() */ @Override public boolean isMandateUsed() { @@ -128,7 +132,9 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setUseMandates(boolean) + * @see + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setUseMandates( + * boolean) */ @Override public void setUseMandates(final boolean useMandates) { @@ -142,18 +148,20 @@ public class AuthProcessDataWrapper * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getQAALevel() */ @Override - public String getQAALevel() { + public String getQaaLevel() { return wrapStringObject(VALUE_QAALEVEL, null, String.class); } /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setQAALevel(java.lang.String) + * @see + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setQAALevel(java. + * lang.String) */ @Override - public void setQAALevel(final String qAALevel) { - authProcessData.put(VALUE_QAALEVEL, qAALevel); + public void setQaaLevel(final String qaaLevel) { + authProcessData.put(VALUE_QAALEVEL, qaaLevel); } @@ -170,7 +178,8 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setForeigner(boolean) + * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setForeigner( + * boolean) */ @Override public void setForeigner(final boolean isForeigner) { @@ -200,12 +209,12 @@ public class AuthProcessDataWrapper } @Override - public boolean isEIDProcess() { + public boolean isEidProcess() { return wrapStringObject(FLAG_IS_NEW_EID_PROCESS, false, Boolean.class); } @Override - public void setEIDProcess(final boolean value) { + public void setEidProcess(final boolean value) { authProcessData.put(FLAG_IS_NEW_EID_PROCESS, value); } @@ -213,22 +222,24 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getSessionCreated() + * @see + * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getSessionCreated() */ @Override public Date getSessionCreated() { - return wrapStringObject(EAAFConstants.AUTH_DATA_CREATED, null, Date.class); + return wrapStringObject(EaafConstants.AUTH_DATA_CREATED, null, Date.class); } /* * (non-Javadoc) * - * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getGenericSessionDataStorage() + * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession# + * getGenericSessionDataStorage() */ @Override public Map<String, Object> getGenericSessionDataStorage() { final Map<String, Object> result = new HashMap<>(); - for (final Map.Entry<String,Object> el : authProcessData.entrySet()) { + for (final Map.Entry<String, Object> el : authProcessData.entrySet()) { if (el.getKey().startsWith(GENERIC_PREFIX)) { result.put(el.getKey().substring(GENERIC_PREFIX.length()), el.getValue()); } @@ -241,9 +252,8 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see - * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getGenericDataFromSession(java.lang. - * String) + * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession# + * getGenericDataFromSession(java.lang. String) */ @Override public Object getGenericDataFromSession(final String key) { @@ -253,9 +263,8 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see - * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#getGenericDataFromSession(java.lang. - * String, java.lang.Class) + * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession# + * getGenericDataFromSession(java.lang. String, java.lang.Class) */ @Override public <T> T getGenericDataFromSession(final String key, final Class<T> clazz) { @@ -265,9 +274,8 @@ public class AuthProcessDataWrapper /* * (non-Javadoc) * - * @see - * at.gv.egovernment.moa.id.auth.data.IAuthenticationSession#setGenericDataToSession(java.lang. - * String, java.lang.Object) + * @see at.gv.egovernment.moa.id.auth.data.IAuthenticationSession# + * setGenericDataToSession(java.lang. String, java.lang.Object) */ @Override public void setGenericDataToSession(final String key, final Object object) diff --git a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.java b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.java index a1faa0a4..ee1037a1 100644 --- a/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.java +++ b/eaaf_core/src/main/java/at/gv/egiz/eaaf/core/impl/idp/auth/data/IdentityLink.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,16 +23,20 @@ import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.Serializable; import java.security.PublicKey; + import javax.xml.transform.TransformerException; + +import org.w3c.dom.Element; + import at.gv.egiz.eaaf.core.api.idp.auth.data.IIdentityLink; import at.gv.egiz.eaaf.core.impl.utils.DomUtils; import at.gv.egiz.eaaf.core.impl.utils.XPathUtils; -import org.w3c.dom.Element; - /** - * Data contained in an identity link issued by BMI, relevant to the MOA ID component. <br> - * <code>"IdentityLink"</code> is the translation of <code>"Personenbindung"</code>. + * Data contained in an identity link issued by BMI, relevant to the MOA ID + * component. <br> + * <code>"IdentityLink"</code> is the translation of + * <code>"Personenbindung"</code>. * * @author Paul Ivancsics * @version $Id$ @@ -59,41 +46,44 @@ public class IdentityLink implements Serializable, IIdentityLink { private static final long serialVersionUID = 1L; /** - * <code>"identificationValue"</code> is the translation of <code>"Stammzahl"</code>. + * <code>"identificationValue"</code> is the translation of + * <code>"Stammzahl"</code>. */ private String identificationValue; /** - * <code>"identificationType"</code> type of the identificationValue in the IdentityLink. + * <code>"identificationType"</code> 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 <code><saml:Assertion></code> <br> + * Parses MDS from an identity link. <code><saml:Assertion></code> <br> * <b>This IDL parser extract NO key information!</b> * */ @@ -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 <code>IdentityLinkAssertionParser</code>. A DOM-representation of the incoming - * String will be created + * Constructor for <code>IdentityLinkAssertionParser</code>. A + * DOM-representation of the incoming String will be created * * @param xmlAssertion <code><saml:Assertion></code> 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 <code>IdentityLinkAssertionParser</code>. A DOM-representation of the incoming - * Inputstream will be created + * Constructor for <code>IdentityLinkAssertionParser</code>. A + * DOM-representation of the incoming Inputstream will be created * * @param xmlAssertion <code><saml:Assertion></code> 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 <code><saml:Assertion></code> + * Parses the identity link from the <code><saml:Assertion></code>. * * @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 - * <code><InfoboxReadResponse></code> found in the dsig-signature + * <code><InfoboxReadResponse></code> 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(); |