Package org.springframework.security.web

Examples of org.springframework.security.web.DefaultRedirectStrategy.sendRedirect()


      request.getSession(true).setAttribute(ModelKeys.NEW_USER, user);

      DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
      log.info("Redirecting to new user account creation page");
      super.setRedirectStrategy(redirectStrategy);
      redirectStrategy.sendRedirect(request, response, "/"+ViewNames.CREATE_ACCOUNT_PAGE);
      return;
    } else {
      super.onAuthenticationFailure(request, response, exception);
    }
  }
View Full Code Here


      request.getSession(true).setAttribute(ModelKeys.NEW_USER, user);

      DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
      log.info("Redirecting to new user account creation page");
      super.setRedirectStrategy(redirectStrategy);
      redirectStrategy.sendRedirect(request, response, "/"+ViewNames.CREATE_ACCOUNT_PAGE);
      return;
    } else {
      super.onAuthenticationFailure(request, response, exception);
    }
  }
View Full Code Here

    }

    private void redirectToOpenIdRegistrationUrl(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException {
        DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
        addOpenIdAttributesToSession(request, getOpenIdAuthenticationToken((OpenIDUserNotFoundException) exception));
        redirectStrategy.sendRedirect(request, response, openIdRegistrationUrl);
    }

    private void addOpenIdAttributesToSession(HttpServletRequest request, OpenIDAuthenticationToken openIdAuthenticationToken) throws ServletException {
        HttpSession session = request.getSession();
        sessionShouldBePresent(session);
View Full Code Here

      request.getSession(true).setAttribute(ModelKeys.NEW_USER, user);

      DefaultRedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
      log.info("Redirecting to new user account creation page");
      super.setRedirectStrategy(redirectStrategy);
      redirectStrategy.sendRedirect(request, response, "/"+ViewNames.CREATE_ACCOUNT_PAGE);
      return;
    } else {
      super.onAuthenticationFailure(request, response, exception);
    }
  }
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.