info.magnolia.cms.security.auth.callback
Class RedirectClientCallback
java.lang.Object
info.magnolia.cms.security.auth.callback.RedirectClientCallback
- All Implemented Interfaces:
- HttpClientCallback
public class RedirectClientCallback
- extends Object
- implements HttpClientCallback
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
Method Summary |
String |
getLocation()
|
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
|
void |
setLocation(String location)
The location field as sent to the browser. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RedirectClientCallback
public RedirectClientCallback()
getLocation
public String getLocation()
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.
handle
public void handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
- Specified by:
handle
in interface HttpClientCallback
Copyright © 2003-2012 Magnolia International Ltd.. All Rights Reserved.