/** * {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { SubjectConfirmationData subjectCD = (SubjectConfirmationData) parentSAMLObject; subjectCD.getUnknownXMLObjects().add(childSAMLObject); }
private static List<KeyInfo> getSubjectConfirmationKeyInformation(SubjectConfirmation confirmation, Assertion assertion) throws ValidationException { SubjectConfirmationData confirmationData = confirmation.getSubjectConfirmationData(); if (confirmation == null) { //System.out.println("Subject Confirmation Data is null !!!!!!!!"); } List<KeyInfo> keyInfos = new LazyList<KeyInfo>(); for (XMLObject object : confirmationData.getUnknownXMLObjects()) { if (object.getElementQName().equals(KeyInfo.DEFAULT_ELEMENT_NAME)) { if (object != null && object.getElementQName().equals(KeyInfo.DEFAULT_ELEMENT_NAME)) { keyInfos.add((KeyInfo) object); } } } if (keyInfos == null || keyInfos.isEmpty()) { //System.out.println("KeyInfo Data is null !!!!!!!!"); } return keyInfos; }
/** * Extracts the {@link KeyInfo}s from the given subject confirmation data. * * @param confirmation subject confirmation data * @param assertion assertion bearing the subject to be confirmed * @param context current message processing context * * @return list of key informations available in the subject confirmation data, never null * * @throws ValidationException if there is a problem processing the SubjectConfirmation * */ protected List<KeyInfo> getSubjectConfirmationKeyInformation(SubjectConfirmation confirmation, Assertion assertion, ValidationContext context) throws ValidationException { SubjectConfirmationData confirmationData = confirmation.getSubjectConfirmationData(); List<KeyInfo> keyInfos = new LazyList<KeyInfo>(); for (XMLObject object : confirmationData.getUnknownXMLObjects()) { if (object != null && object.getElementQName().equals(KeyInfo.DEFAULT_ELEMENT_NAME)) { keyInfos.add((KeyInfo) object); } } return keyInfos; }