Search in sources :

Example 1 with CookieRetrievingCookieGenerator

use of org.apereo.cas.web.support.CookieRetrievingCookieGenerator in project cas by apereo.

the class InitialFlowSetupActionCookieTests method setUp.

@Before
public void setUp() throws Exception {
    this.warnCookieGenerator = new CookieRetrievingCookieGenerator("warn", "", 2, false, null, false);
    this.warnCookieGenerator.setCookiePath(StringUtils.EMPTY);
    this.tgtCookieGenerator = new CookieRetrievingCookieGenerator("tgt", "", 2, false, null, false);
    this.tgtCookieGenerator.setCookiePath(StringUtils.EMPTY);
    final List<ArgumentExtractor> argExtractors = Collections.singletonList(new DefaultArgumentExtractor(new WebApplicationServiceFactory()));
    final ServicesManager servicesManager = mock(ServicesManager.class);
    when(servicesManager.findServiceBy(any(Service.class))).thenReturn(RegisteredServiceTestUtils.getRegisteredService("test"));
    this.action = new InitialFlowSetupAction(argExtractors, servicesManager, authenticationRequestServiceSelectionStrategies, tgtCookieGenerator, warnCookieGenerator, casProperties);
    this.action.afterPropertiesSet();
}
Also used : ArgumentExtractor(org.apereo.cas.web.support.ArgumentExtractor) DefaultArgumentExtractor(org.apereo.cas.web.support.DefaultArgumentExtractor) DefaultArgumentExtractor(org.apereo.cas.web.support.DefaultArgumentExtractor) ServicesManager(org.apereo.cas.services.ServicesManager) CookieRetrievingCookieGenerator(org.apereo.cas.web.support.CookieRetrievingCookieGenerator) WebApplicationServiceFactory(org.apereo.cas.authentication.principal.WebApplicationServiceFactory) Service(org.apereo.cas.authentication.principal.Service) InitialFlowSetupAction(org.apereo.cas.web.flow.login.InitialFlowSetupAction) Before(org.junit.Before)

Aggregations

Service (org.apereo.cas.authentication.principal.Service)1 WebApplicationServiceFactory (org.apereo.cas.authentication.principal.WebApplicationServiceFactory)1 ServicesManager (org.apereo.cas.services.ServicesManager)1 InitialFlowSetupAction (org.apereo.cas.web.flow.login.InitialFlowSetupAction)1 ArgumentExtractor (org.apereo.cas.web.support.ArgumentExtractor)1 CookieRetrievingCookieGenerator (org.apereo.cas.web.support.CookieRetrievingCookieGenerator)1 DefaultArgumentExtractor (org.apereo.cas.web.support.DefaultArgumentExtractor)1 Before (org.junit.Before)1