Skip to content
Snippets Groups Projects
Commit 0b11a54e authored by Martin Weise's avatar Martin Weise
Browse files

Securityconfig is not productive

Former-commit-id: 892f9410
parent f149e2f1
Branches
Tags
1 merge request!42Fixed the query service tests
package at.tuwien.config; package at.tuwien.config;
import at.tuwien.service.AuthenticationService;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
...@@ -106,13 +107,6 @@ public class SamlConfig extends WebSecurityConfigurerAdapter { ...@@ -106,13 +107,6 @@ public class SamlConfig extends WebSecurityConfigurerAdapter {
return new HttpClient(multiThreadedHttpConnectionManager()); return new HttpClient(multiThreadedHttpConnectionManager());
} }
@Bean
public SAMLAuthenticationProvider samlAuthenticationProvider() {
final SAMLAuthenticationProvider samlAuthenticationProvider = new SAMLAuthenticationProvider();
samlAuthenticationProvider.setForcePrincipalAsString(false);
return samlAuthenticationProvider;
}
@Bean @Bean
public WebSSOProfileConsumer webSSOprofileConsumer() { public WebSSOProfileConsumer webSSOprofileConsumer() {
return new WebSSOProfileConsumerImpl(); return new WebSSOProfileConsumerImpl();
...@@ -353,6 +347,11 @@ public class SamlConfig extends WebSecurityConfigurerAdapter { ...@@ -353,6 +347,11 @@ public class SamlConfig extends WebSecurityConfigurerAdapter {
return new JKSKeyManager(storeFile, samlKeystorePassword, passwords, samlKeystoreAlias); return new JKSKeyManager(storeFile, samlKeystorePassword, passwords, samlKeystoreAlias);
} }
@Bean
public SAMLAuthenticationProvider samlAuthenticationProvider() {
return new AuthenticationService();
}
@Override @Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception { protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.authenticationProvider(samlAuthenticationProvider()); auth.authenticationProvider(samlAuthenticationProvider());
......
package at.tuwien.config;
import at.tuwien.service.AuthenticationService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.saml.SAMLAuthenticationProvider;
@Configuration
public class SecurityConfig {
@Bean
public SAMLAuthenticationProvider samlAuthenticationProvider() {
return new AuthenticationService();
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment