Hi,
This is priyatham suresh. I have been working with shiro , cas to implement
single sign on for multiple components. It works fine for me. But I have
faced the following problems.
If i make a Get request from any component for the first time, it's working
fine. But the problem is with put and post requests.
If i made a put or post request from any component first time it is going
to the cas login page and redirected to the client after login success.
It's failing on the client side to redirect to actual url. I have verified
the shiro-cas, shiro-web. I found the following code snippet which is not
supporting for put and post.
public static void redirectToSavedRequest(ServletRequest request,
ServletResponse response, String fallbackUrl)
throws IOException {
String successUrl = null;
boolean contextRelative = true;
SavedRequest savedRequest =
WebUtils.getAndClearSavedRequest(request);
if (savedRequest != null &&
savedRequest.getMethod().equalsIgnoreCase(AccessControlFilter.GET_METHOD)) {
successUrl = savedRequest.getRequestUrl();
contextRelative = false;
}
if (successUrl == null) {
successUrl = fallbackUrl;
}
if (successUrl == null) {
throw new IllegalStateException("Success URL not available via
saved request or via the " +
"successUrlFallback method parameter. One of these must
be non-null for " +
"issueSuccessRedirect() to work.");
}
WebUtils.issueRedirect(request, response, successUrl, null,
contextRelative);
}
--
THANKS
PRIYATHAM SURESH KOTA
Software Engineer
AriveGuru Technology Solutions (P) Ltd
Bangalore
website: ariveguru.com
contact: 7259795166
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user