File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
src/main/java/eu/openanalytics/containerproxy/security Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change 25
25
import javax .inject .Inject ;
26
26
27
27
import org .springframework .beans .factory .annotation .Autowired ;
28
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnExpression ;
29
+ import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
28
30
import org .springframework .context .annotation .Bean ;
29
31
import org .springframework .context .annotation .Configuration ;
30
32
import org .springframework .core .env .Environment ;
31
33
import org .springframework .security .authentication .AuthenticationEventPublisher ;
34
+ import org .springframework .security .authentication .AuthenticationManager ;
32
35
import org .springframework .security .config .annotation .authentication .builders .AuthenticationManagerBuilder ;
33
36
import org .springframework .security .config .annotation .authentication .configuration .GlobalAuthenticationConfigurerAdapter ;
34
37
import org .springframework .security .config .annotation .web .builders .HttpSecurity ;
@@ -162,5 +165,12 @@ public void init(AuthenticationManagerBuilder amb) throws Exception {
162
165
}
163
166
};
164
167
}
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
+
166
176
}
You can’t perform that action at this time.
0 commit comments