/** * Log cas validation assertion. * * @param assertion the assertion */ protected void logCasValidationAssertion(final Assertion assertion) { LOGGER.debug("CAS Assertion Valid: [{}]", assertion.isValid()); LOGGER.debug("CAS Assertion Principal: [{}]", assertion.getPrincipal().getName()); LOGGER.debug("CAS Assertion authentication Date: [{}]", assertion.getAuthenticationDate()); LOGGER.debug("CAS Assertion ValidFrom Date: [{}]", assertion.getValidFromDate()); LOGGER.debug("CAS Assertion ValidUntil Date: [{}]", assertion.getValidUntilDate()); LOGGER.debug("CAS Assertion Attributes: [{}]", assertion.getAttributes()); LOGGER.debug("CAS Assertion Principal Attributes: [{}]", assertion.getPrincipal().getAttributes()); }
public void testAssertionValidity() throws Exception { final Assertion assertion = new AssertionImpl(CONST_PRINCIPAL, new Date(), new Date(), new Date(), CONST_ATTRIBUTES); assertTrue(assertion.isValid()); }