use of org.apereo.cas.mfa.simple.ticket.CasSimpleMultifactorAuthenticationTicketFactory in project cas by apereo.
the class CasSimpleMultifactorAuthenticationTicketFactoryTests method verifyCustomExpirationPolicy.
@Test
public void verifyCustomExpirationPolicy() {
val factory = (CasSimpleMultifactorAuthenticationTicketFactory) this.ticketFactory.get(CasSimpleMultifactorAuthenticationTicket.class);
val ticket = factory.create(RegisteredServiceTestUtils.getService("example"), CollectionUtils.wrap(ExpirationPolicy.class.getName(), HardTimeoutExpirationPolicy.builder().timeToKillInSeconds(60).build()));
assertNotNull(ticket);
assertEquals(60, ticket.getExpirationPolicy().getTimeToLive());
}
Aggregations