Skip to content
Snippets Groups Projects
Unverified Commit 892f9410 authored by Martin Weise's avatar Martin Weise
Browse files

Securityconfig is not productive

parent fff1e891
No related branches found
No related tags found
4 merge requests!81New stable release,!43Merge dev to master,!33Draft: merge dev to master,!30Resolve "Refactor: fix all TODOs and FIXMEs in the backend"
package at.tuwien.config;
import at.tuwien.service.AuthenticationService;
import lombok.extern.log4j.Log4j2;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager;
......@@ -106,13 +107,6 @@ public class SamlConfig extends WebSecurityConfigurerAdapter {
return new HttpClient(multiThreadedHttpConnectionManager());
}
@Bean
public SAMLAuthenticationProvider samlAuthenticationProvider() {
final SAMLAuthenticationProvider samlAuthenticationProvider = new SAMLAuthenticationProvider();
samlAuthenticationProvider.setForcePrincipalAsString(false);
return samlAuthenticationProvider;
}
@Bean
public WebSSOProfileConsumer webSSOprofileConsumer() {
return new WebSSOProfileConsumerImpl();
......@@ -353,6 +347,11 @@ public class SamlConfig extends WebSecurityConfigurerAdapter {
return new JKSKeyManager(storeFile, samlKeystorePassword, passwords, samlKeystoreAlias);
}
@Bean
public SAMLAuthenticationProvider samlAuthenticationProvider() {
return new AuthenticationService();
}
@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
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 to comment