Reputation: 673
My application's entry point is a custom URL , how do I tell Spring to redirect to my URL after a successful SAML dance ? I am using IDP initiated flow.
In my app. I have several versions defined depending on a client.
e.g Client abc goes to https:\localhost:8443\abc\admin and client xyz goes to https:\localhost:8443\xyz\admin
thanks
Upvotes: 0
Views: 919
Reputation: 673
Turns out there is a handler called SAMLRelayStateSuccessHandler which redirects to an endpoint defined in "Default Relay State" configuration item in Okta (application configuration).
So first thing go to Okta and specify a redirect URL in "Default Relay State" property. Then add this property to SAMLProcessingFilter :
samlWebSSOProcessingFilter.setAuthenticationSuccessHandler(new SAMLRelayStateSuccessHandler());
and once Spring-SAML authenticates successfully it'll redirect to your relay URL.
Upvotes: 1