Search in sources :

Example 1 with DefaultProxyGrantingTicketFactory

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;
}
Also used : DefaultServiceTicketFactory(org.apereo.cas.ticket.factory.DefaultServiceTicketFactory) NeverExpiresExpirationPolicy(org.apereo.cas.ticket.support.NeverExpiresExpirationPolicy) HashMap(java.util.HashMap) DefaultProxyTicketFactory(org.apereo.cas.ticket.factory.DefaultProxyTicketFactory) DefaultTicketGrantingTicketFactory(org.apereo.cas.ticket.factory.DefaultTicketGrantingTicketFactory) DefaultTicketFactory(org.apereo.cas.ticket.factory.DefaultTicketFactory) DefaultTransientSessionTicketFactory(org.apereo.cas.ticket.factory.DefaultTransientSessionTicketFactory) DefaultProxyGrantingTicketFactory(org.apereo.cas.ticket.factory.DefaultProxyGrantingTicketFactory)

Example 2 with DefaultProxyGrantingTicketFactory

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;
}
Also used : lombok.val(lombok.val) DefaultServiceTicketFactory(org.apereo.cas.ticket.factory.DefaultServiceTicketFactory) HashMap(java.util.HashMap) DefaultProxyTicketFactory(org.apereo.cas.ticket.factory.DefaultProxyTicketFactory) DefaultTicketGrantingTicketFactory(org.apereo.cas.ticket.factory.DefaultTicketGrantingTicketFactory) DefaultTicketFactory(org.apereo.cas.ticket.factory.DefaultTicketFactory) DefaultTransientSessionTicketFactory(org.apereo.cas.ticket.factory.DefaultTransientSessionTicketFactory) DefaultProxyGrantingTicketFactory(org.apereo.cas.ticket.factory.DefaultProxyGrantingTicketFactory)

Aggregations

HashMap (java.util.HashMap)2 DefaultProxyGrantingTicketFactory (org.apereo.cas.ticket.factory.DefaultProxyGrantingTicketFactory)2 DefaultProxyTicketFactory (org.apereo.cas.ticket.factory.DefaultProxyTicketFactory)2 DefaultServiceTicketFactory (org.apereo.cas.ticket.factory.DefaultServiceTicketFactory)2 DefaultTicketFactory (org.apereo.cas.ticket.factory.DefaultTicketFactory)2 DefaultTicketGrantingTicketFactory (org.apereo.cas.ticket.factory.DefaultTicketGrantingTicketFactory)2 DefaultTransientSessionTicketFactory (org.apereo.cas.ticket.factory.DefaultTransientSessionTicketFactory)2 lombok.val (lombok.val)1 NeverExpiresExpirationPolicy (org.apereo.cas.ticket.support.NeverExpiresExpirationPolicy)1