File tree Expand file tree Collapse file tree
src/main/java/eu/openanalytics/containerproxy/auth/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020 */
2121package eu .openanalytics .containerproxy .auth .impl ;
2222
23+ import javax .inject .Inject ;
24+
25+ import org .springframework .core .env .Environment ;
2326import org .springframework .beans .factory .annotation .Autowired ;
2427import org .springframework .security .config .annotation .authentication .builders .AuthenticationManagerBuilder ;
2528import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
@@ -50,6 +53,9 @@ public class SAMLAuthenticationBackend implements IAuthenticationBackend {
5053
5154 @ Autowired (required = false )
5255 private SAMLAuthenticationProvider samlAuthenticationProvider ;
56+
57+ @ Inject
58+ private Environment environment ;
5359
5460 @ Override
5561 public String getName () {
@@ -77,6 +83,9 @@ public void configureAuthenticationManagerBuilder(AuthenticationManagerBuilder a
7783
7884 @ Override
7985 public String getLogoutSuccessURL () {
80- return "/" ;
86+ String logoutURL = environment .getProperty ("proxy.saml.logout-url" );
87+ System .out .println ("LogoutURL: " + logoutURL );
88+ if (logoutURL == null || logoutURL .trim ().isEmpty ()) logoutURL = "/" ;
89+ return logoutURL ;
8190 }
8291}
You can’t perform that action at this time.
0 commit comments