info.magnolia.cms.security.auth.callback
Class RedirectClientCallback

java.lang.Object
  extended by info.magnolia.cms.security.auth.callback.AbstractHttpClientCallback
      extended by info.magnolia.cms.security.auth.callback.RedirectClientCallback
All Implemented Interfaces:
HttpClientCallback

public class RedirectClientCallback
extends AbstractHttpClientCallback

An HttpClientCallback implementation which redirects to a configured path or URL. This can be useful, for instance, in SSO contexts where the login screen is handled by a different application, or if one wants to simply hide the login form from a public instance using a fronting server configuration.

Version:
$Revision: $ ($Author: $)
Author:
gjoseph

Constructor Summary
RedirectClientCallback()
           
 
Method Summary
protected  String getLocation()
           
 void handle(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Override this method to provide the specific functionality.
 void setLocation(String location)
          The location field as sent to the browser.
 
Methods inherited from class info.magnolia.cms.security.auth.callback.AbstractHttpClientCallback
accepts, doCallback, getHostPattern, getOriginalUrlPattern, getUrlPattern, getVoters, setHostPattern, setOriginalUrlPattern, setUrlPattern, setVoters
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedirectClientCallback

public RedirectClientCallback()
Method Detail

handle

public void handle(javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
Description copied from class: AbstractHttpClientCallback
Override this method to provide the specific functionality. This implementation is only kept for backwards compatibility with versions prior to 4.5, and merely delegates the call to AbstractHttpClientCallback.doCallback(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse).

Specified by:
handle in interface HttpClientCallback
Overrides:
handle in class AbstractHttpClientCallback

setLocation

public void setLocation(String location)
The location field as sent to the browser. If the value starts with a /, it is preceded by the context path of the current request. The default value is "/.magnolia". If you need to the current request location in an external login form, you can use the {0} tag: a value of "http://sso.mycompany.com/login/?backto={0}" will pass the current request url as the "backto" parameter to the location url.


getLocation

protected String getLocation()


Copyright © 2003-2013 Magnolia International Ltd.. All Rights Reserved.