Package org.acegisecurity.ui.savedrequest

Examples of org.acegisecurity.ui.savedrequest.SavedRequest


        Authentication auth = getSession().getAuthentication();
        if(auth == null || !auth.isAuthenticated()) {
            // emulate what acegi url control would do so that we get a proper redirect after login
            HttpServletRequest httpRequest = ((WebRequest) getRequest()).getHttpServletRequest();
            ExceptionTranslationFilter translator = (ExceptionTranslationFilter) getGeoServerApplication().getBean("consoleExceptionTranslationFilter");
            SavedRequest savedRequest = new SavedRequest(httpRequest, translator.getPortResolver());
           
            HttpSession session = httpRequest.getSession();
            session.setAttribute(AbstractProcessingFilter.ACEGI_SAVED_REQUEST_KEY, savedRequest);
           
            // then redirect to the login page
View Full Code Here


    public void testSecuredPageGivesRedirectWhenLoggedOut() {
        logout();
        tester.startPage(LayerPage.class);
        tester.assertRenderedPage(GeoServerLoginPage.class);
        // make sure the acegi emulation is properly setup
        SavedRequest sr = (SavedRequest) tester.getServletSession().getAttribute(AbstractProcessingFilter.ACEGI_SAVED_REQUEST_KEY);
        assertNotNull(sr);
        assertTrue(sr.getFullRequestUrl().endsWith("?wicket:bookmarkablePage=:org.geoserver.web.data.layer.LayerPage"));
    }
View Full Code Here

            }

            return;
        }

        SavedRequest saved = (SavedRequest) session.getAttribute(AbstractProcessingFilter.ACEGI_SAVED_REQUEST_KEY);

        if ((saved != null) && saved.doesRequestMatch(request, portResolver)) {
            if (logger.isDebugEnabled()) {
                logger.debug("Wrapper replaced; SavedRequest was: " + saved);
            }

            savedRequest = saved;
View Full Code Here

  protected void sendStartAuthentication(ServletRequest request, ServletResponse response, FilterChain chain,
      AuthenticationException reason) throws ServletException, IOException {
    HttpServletRequest httpRequest = (HttpServletRequest) request;

    SavedRequest savedRequest = new SavedRequest(httpRequest, portResolver);

    if (logger.isDebugEnabled()) {
      logger.debug("Authentication entry point being called; SavedRequest added to Session: " + savedRequest);
    }
View Full Code Here

  public boolean isContinueChainBeforeSuccessfulAuthentication() {
    return continueChainBeforeSuccessfulAuthentication;
  }

  public static String obtainFullRequestUrl(HttpServletRequest request) {
    SavedRequest savedRequest = (SavedRequest) request.getSession().getAttribute(
        AbstractProcessingFilter.ACEGI_SAVED_REQUEST_KEY);

    return (savedRequest == null) ? null : savedRequest.getFullRequestUrl();
  }
View Full Code Here

TOP

Related Classes of org.acegisecurity.ui.savedrequest.SavedRequest

Copyright © 2018 www.massapicom. 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.