CAS 5.2.1 login-webflow and exceptionHandlers

27 views
Skip to first unread message

Oscar del Pozo

unread,
Jan 24, 2018, 10:49:42 AM1/24/18
to CAS Community
Hi again...
 
Debugging the default CAS login flow when an AuthenticationHandler throws an Exception (i.e. UnauthorizedSsoServiceException) I see that the PolicyBasedAuthenticationManager handles that exception adding it to the failures list and finally throws an AuthenticationException. It seems to be fine.

But when that AuthenticationException is handled by the login web flow, the FlowExecutionExceptionHandlerSet has the following exceptions:
 class org.apereo.cas.services.UnauthorizedServiceForPrincipalException=serviceUnauthorizedCheck,
 class org.apereo.cas.services.UnauthorizedServiceException=serviceUnauthorizedCheck,
 class org.apereo.cas.services.UnauthorizedSsoServiceException=viewLoginForm,
 class org.springframework.webflow.execution.repository.NoSuchFlowExecutionException=viewServiceErrorView

Even when the thrown exception was one of that set, the login web flow is not able to identify that transition (it receives an AuthenticationException). This is a weird behaviour, isn't it?

Is there any easy way to extend the login web flow to add the org.apereo.cas.authentication.AuthenticationException to the exceptionHandlers set?
Reply all
Reply to author
Forward
0 new messages