File tree Expand file tree Collapse file tree
src/main/java/eu/openanalytics/containerproxy/security Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525import javax .inject .Inject ;
2626
2727import org .springframework .beans .factory .annotation .Autowired ;
28+ import org .springframework .boot .autoconfigure .condition .ConditionalOnExpression ;
29+ import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
2830import org .springframework .context .annotation .Bean ;
2931import org .springframework .context .annotation .Configuration ;
3032import org .springframework .core .env .Environment ;
3133import org .springframework .security .authentication .AuthenticationEventPublisher ;
34+ import org .springframework .security .authentication .AuthenticationManager ;
3235import org .springframework .security .config .annotation .authentication .builders .AuthenticationManagerBuilder ;
3336import org .springframework .security .config .annotation .authentication .configuration .GlobalAuthenticationConfigurerAdapter ;
3437import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
@@ -162,5 +165,12 @@ public void init(AuthenticationManagerBuilder amb) throws Exception {
162165 }
163166 };
164167 }
165-
168+
169+ @ Bean (name ="authenticationManager" )
170+ @ ConditionalOnExpression ("'${proxy.authentication}' == 'kerberos' || '${proxy.authentication}' == 'saml'" )
171+ @ Override
172+ public AuthenticationManager authenticationManagerBean () throws Exception {
173+ return super .authenticationManagerBean ();
174+ }
175+
166176}
You can’t perform that action at this time.
0 commit comments