cloudwalker84
2013-12-19 18:58:19 UTC
I'm trying to use some custom handlers for authentication failure/success
with the spring security plugin but I can't get it to work. Based on some
stuff I read I putt he following in my resources.groovy:
authSuccessHandler(com.test.springsecurity.LoginSuccessHandler)
authenticationFailureHandler(com.test.springsecurity.LoginFailureHandler)
My LoginSuccessHandler looks like this:
class LoginSuccessHandler extends
SavedRequestAwareAuthenticationSuccessHandler {
@Override
protected String determineTargetUrl(HttpServletRequest request,
HttpServletResponse response) {
String targetUrl = super.determineTargetUrl(request);
String value = request.getParameter("lineOfBusinessUuid");
if (value != null) {
if (targetUrl.indexOf('?') > 0) {
targetUrl += "&lineOfBusinessUuid=" + value;
} else {
targetUrl += "?lineOfBusinessUuid=" + value;
}
}
return targetUrl;
}
}
It never uses my custom handler though. Is there something else that I need
to do to wire this up correctly? On a side note, I'm also using the
"grails.plugin.springsecurity.successHandler.defaultTargetUrl =
''/someCustomUrl" property in my Config.groovy, and this never seems to get
set on the login handler either. It's always just defaulting to '/'
--
View this message in context: http://grails.1312388.n4.nabble.com/Custom-success-failure-handler-with-spring-security-plugin-tp4652671.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
with the spring security plugin but I can't get it to work. Based on some
stuff I read I putt he following in my resources.groovy:
authSuccessHandler(com.test.springsecurity.LoginSuccessHandler)
authenticationFailureHandler(com.test.springsecurity.LoginFailureHandler)
My LoginSuccessHandler looks like this:
class LoginSuccessHandler extends
SavedRequestAwareAuthenticationSuccessHandler {
@Override
protected String determineTargetUrl(HttpServletRequest request,
HttpServletResponse response) {
String targetUrl = super.determineTargetUrl(request);
String value = request.getParameter("lineOfBusinessUuid");
if (value != null) {
if (targetUrl.indexOf('?') > 0) {
targetUrl += "&lineOfBusinessUuid=" + value;
} else {
targetUrl += "?lineOfBusinessUuid=" + value;
}
}
return targetUrl;
}
}
It never uses my custom handler though. Is there something else that I need
to do to wire this up correctly? On a side note, I'm also using the
"grails.plugin.springsecurity.successHandler.defaultTargetUrl =
''/someCustomUrl" property in my Config.groovy, and this never seems to get
set on the login handler either. It's always just defaulting to '/'
--
View this message in context: http://grails.1312388.n4.nabble.com/Custom-success-failure-handler-with-spring-security-plugin-tp4652671.html
Sent from the Grails - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email