/** {@inheritDoc} */ @Override protected void doExecute(@Nonnull final ProfileRequestContext profileRequestContext) { final SAMLObjectBuilder<DoNotCacheCondition> dncConditionBuilder = (SAMLObjectBuilder<DoNotCacheCondition>) XMLObjectProviderRegistrySupport.getBuilderFactory().<DoNotCacheCondition>getBuilderOrThrow( DoNotCacheCondition.DEFAULT_ELEMENT_NAME); for (final Assertion assertion : response.getAssertions()) { final Conditions conditions = SAML1ActionSupport.addConditionsToAssertion(this, assertion); final List<DoNotCacheCondition> dncConditions = conditions.getDoNotCacheConditions(); if (dncConditions.isEmpty()) { dncConditions.add(dncConditionBuilder.buildObject()); log.debug("{} Added DoNotCache condition to Assertion {}", getLogPrefix(), assertion.getID()); } else { log.debug("{} Assertion {} already contained DoNotCache condition, another was not added", getLogPrefix(), assertion.getID()); } } }