I am integrating our exsisting application with spring security. Our exsisting application triggers saml request and validates the saml response inside a controller using openam. I am able to trigger the saml request inside the servlet by redirecting to "/saml2/authenticate/" + registrationID. But when it comes to validating the response received inside the controller I am not sure how to. I tried creating a controller mapping to "login/saml2/sso" but the spring security filters will be called first before hitting this servlet so not sure how I can validate the saml response inside the servlet and redirect to the login page or error page.

@jzheaux can you point me to the right direction how I can implement or any examples to know how to implement.