Jani, I don't know how you have your identity provider configured but
my IdP won't redirect back to a service upon a failed login attempt.
The user would be stuck on a "failed to login" page on the IdP side
and would never get back to CASShib. But presuming you configure/
modify your IdP's login service to redirect back to services upon a
failed attempt, you should be able to redirect to a different url upon
an authentication error by modifying the flow in the casshib-login-
webflow.xml file. Look at the "remoteAuthenticate" action-state and
the <transition on="error" to="casShibAuthErrorView"/> part. You can
either modify that to do something like what the <end-state
id="redirect"...> state is doing, or you can modify
casShibAuthErrorView.jsp to redirect somewhere rather than display an
error message.