I am implementing SAML2.0 ServiceProvider in java using spring-security-saml-sample code. After successful login response gets redirect to root path(welcome file) of application.How to redirect it to any controller ?
Thanks, Tejas
You can customize URL to which user gets redirected after successful authentication by changing bean successRedirectHandler
, for example to:
<bean id="successRedirectHandler"
class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler">
<property name="defaultTargetUrl" value="/myControllerURL"/>
</bean>