use of org.apereo.cas.ticket.factory.DefaultProxyGrantingTicketFactory in project cas by apereo.
the class CentralAuthenticationServiceImplWithMockitoTests method getTicketFactory.
private TicketFactory getTicketFactory() {
final DefaultTicketFactory factory = new DefaultTicketFactory();
factory.addTicketFactory(ProxyGrantingTicket.class, new DefaultProxyGrantingTicketFactory(null, null, null));
factory.addTicketFactory(TicketGrantingTicket.class, new DefaultTicketGrantingTicketFactory(null, null, null));
factory.addTicketFactory(ServiceTicket.class, new DefaultServiceTicketFactory(new NeverExpiresExpirationPolicy(), new HashMap<>(0), false, null));
factory.addTicketFactory(ProxyTicket.class, new DefaultProxyTicketFactory(null, new HashMap<>(0), null, true));
factory.addTicketFactory(TransientSessionTicket.class, new DefaultTransientSessionTicketFactory(new NeverExpiresExpirationPolicy()));
return factory;
}
use of org.apereo.cas.ticket.factory.DefaultProxyGrantingTicketFactory in project cas by apereo.
the class DefaultCentralAuthenticationServiceMockitoTests method getTicketFactory.
private static TicketFactory getTicketFactory() {
val factory = new DefaultTicketFactory();
factory.addTicketFactory(ProxyGrantingTicket.class, new DefaultProxyGrantingTicketFactory(null, null, CipherExecutor.noOpOfStringToString(), mock(ServicesManager.class)));
factory.addTicketFactory(TicketGrantingTicket.class, new DefaultTicketGrantingTicketFactory(null, null, CipherExecutor.noOpOfSerializableToString(), mock(ServicesManager.class)));
factory.addTicketFactory(ServiceTicket.class, new DefaultServiceTicketFactory(neverExpiresExpirationPolicyBuilder(), new HashMap<>(0), false, CipherExecutor.noOpOfStringToString(), mock(ServicesManager.class)));
factory.addTicketFactory(ProxyTicket.class, new DefaultProxyTicketFactory(null, new HashMap<>(0), CipherExecutor.noOpOfStringToString(), true, mock(ServicesManager.class)));
factory.addTicketFactory(TransientSessionTicket.class, new DefaultTransientSessionTicketFactory(neverExpiresExpirationPolicyBuilder()));
assertEquals(Ticket.class, factory.getTicketType());
return factory;
}
Aggregations