-
Notifications
You must be signed in to change notification settings - Fork 10
Documentation: Note on spAuthenticationResponseFilter and defaultTargetUrl #4
Copy link
Copy link
Open
Description
Less issue than addition to the documentation:
I understand this is only a sample application, but with
public Filter spAuthenticationResponseFilter() {
SamlResponseAuthenticationFilter filter = (SamlResponseAuthenticationFilter) super.spAuthenticationResponseFilter();
filter.setAuthenticationManager(new SamlAuthenticationManager());
return filter;
}
in conjunction with SSL terminated by e.g. a load balancer you will run into the problem that after successful authentication via IdP a redirect is done to http:// ... instead of https://
(because the defaultTargetUrl is /, which then is expanded ...)
By setting the successhandler explicitely the defaultTargetUrl can be set, e.g. using the already defined basepath (which is used to generate the metadata?)
...
filter.setAuthenticationManager(new SamlAuthenticationManager());
SavedRequestAwareAuthenticationSuccessHandler successHandler = new SavedRequestAwareAuthenticationSuccessHandler();
successHandler.setDefaultTargetUrl(basePath);
filter.setAuthenticationSuccessHandler(successHandler);
...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels