/** {@inheritDoc} */ protected void processChildElement(XMLObject parentSAMLObject, XMLObject childSAMLObject) throws UnmarshallingException { Conditions conditions = (Conditions) parentSAMLObject; if (childSAMLObject instanceof Condition) { conditions.getConditions().add((Condition) childSAMLObject); } else { super.processChildElement(parentSAMLObject, childSAMLObject); } }
protected void validateDoNotCache(Assertion assertion) throws ValidationException { if (assertion.getMinorVersion() == 0) { Conditions conditions = assertion.getConditions(); if (conditions != null) { for (Condition condition : conditions.getConditions()) { if (condition instanceof DoNotCacheCondition) { throw new ValidationException("DoNotCacheCondition not valid in SAML1.0"); } } } } } }