com.evolveum.midpoint.web.security
Class MidPointRedirectStrategy

java.lang.Object
  extended by com.evolveum.midpoint.web.security.MidPointRedirectStrategy
All Implemented Interfaces:
org.springframework.security.web.RedirectStrategy

public class MidPointRedirectStrategy
extends java.lang.Object
implements org.springframework.security.web.RedirectStrategy

This class represents an extension to the way DefaultRedirectStrategy works. This class takes into account if the incoming request causing action by Spring Security requires a "partail-response" xml redirect instead of a response.sendRedirect().

Author:
Ben Simpson ben.simpson@icesoft.com

Constructor Summary
MidPointRedirectStrategy()
           
 
Method Summary
 void sendRedirect(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String url)
          Redirects the response to the supplied URL.
 void setContextRelative(boolean useRelativeContext)
          If true, causes any redirection URLs to be calculated minus the protocol and context path (defaults to false).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MidPointRedirectStrategy

public MidPointRedirectStrategy()
Method Detail

sendRedirect

public void sendRedirect(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response,
                         java.lang.String url)
                  throws java.io.IOException
Redirects the response to the supplied URL.

If contextRelative is set, the redirect value will be the value after the request context path. Note that this will result in the loss of protocol information (HTTP or HTTPS), so will cause problems if a redirect is being performed to change to HTTPS, for example.

Specified by:
sendRedirect in interface org.springframework.security.web.RedirectStrategy
Throws:
java.io.IOException

setContextRelative

public void setContextRelative(boolean useRelativeContext)
If true, causes any redirection URLs to be calculated minus the protocol and context path (defaults to false).



Copyright © 2012 evolveum. All Rights Reserved.