void BrowserSSOProfileValidator::validateAssertion(const Assertion& assertion) const
{
#ifdef _DEBUG
    xmltooling::NDC ndc("validate");
#endif

    // Make sure the assertion is bounded.
    const Conditions* conds = assertion.getConditions();
    if (!conds || !conds->getNotBefore() || !conds->getNotOnOrAfter())
        throw ValidationException("SSO assertions MUST contain NotBefore/NotOnOrAfter attributes.");

    // Each statement MUST have proper confirmation requirements.
    const vector<AuthenticationStatement*>& authn = assertion.getAuthenticationStatements();
    for_each(authn.begin(), authn.end(), _checkMethod());
    const vector<AttributeStatement*>& attr = assertion.getAttributeStatements();
    for_each(attr.begin(), attr.end(), _checkMethod());
    const vector<SubjectStatement*>& sub = assertion.getSubjectStatements();
    for_each(sub.begin(), sub.end(), _checkMethod());

    // Pass up for additional checking.
    AssertionValidator::validateAssertion(assertion);
}