Package org.springframework.security.web.session

Examples of org.springframework.security.web.session.ConcurrentSessionFilter.afterPropertiesSet()


    }

    @Test(expected=IllegalArgumentException.class)
    public void detectsMissingSessionRegistry() throws Exception {
        ConcurrentSessionFilter filter = new ConcurrentSessionFilter();
        filter.afterPropertiesSet();
    }

    @Test(expected=IllegalArgumentException.class)
    public void detectsInvalidUrl() throws Exception {
        ConcurrentSessionFilter filter = new ConcurrentSessionFilter();
View Full Code Here


    @Test(expected=IllegalArgumentException.class)
    public void detectsInvalidUrl() throws Exception {
        ConcurrentSessionFilter filter = new ConcurrentSessionFilter();
        filter.setExpiredUrl("ImNotValid");
        filter.afterPropertiesSet();
    }

    @Test
    public void lastRequestTimeUpdatesCorrectly() throws Exception {
        // Setup our HTTP request
View Full Code Here

        SessionRegistry registry = new SessionRegistryImpl();
        registry.registerNewSession(session.getId(), "principal");
        registry.getSessionInformation(session.getId()).expireNow();
        filter.setSessionRegistry(registry);
        filter.setExpiredUrl("/expired.jsp");
        filter.afterPropertiesSet();

        FilterChain fc = mock(FilterChain.class);
        filter.doFilter(request, response, fc);
        // Expect that the filter chain will not be invoked, as we redirect to expiredUrl
        verifyZeroInteractions(fc);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.