temporarily removed authentication

This commit is contained in:
Main
2016-02-16 23:57:02 +03:00
parent 1e2e564c29
commit ffeb521e3b
2 changed files with 13 additions and 8 deletions

View File

@@ -46,19 +46,18 @@ public class AuthConfiguration extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.formLogin().loginPage("/index.html").failureUrl("/index.html").and()
.authorizeRequests()
.antMatchers("/index.html").permitAll()
http.csrf().disable();
/*.authorizeRequests()
.antMatchers("*//**").permitAll()
.antMatchers("/health").permitAll()
.antMatchers("/swagger-ui.html").permitAll()
.antMatchers("/v2/api-docs").permitAll()
.antMatchers("/**.js").permitAll()
.antMatchers("/**.css").permitAll()
.antMatchers("*//**.js").permitAll()
.antMatchers("*//**.css").permitAll()
.antMatchers(HttpMethod.POST, "/customers").permitAll()
.antMatchers(HttpMethod.POST, "/login").permitAll()
.anyRequest().authenticated().and()
.addFilterBefore(new StatelessAuthenticationFilter(tokenAuthenticationService), UsernamePasswordAuthenticationFilter.class);
.addFilterBefore(new StatelessAuthenticationFilter(tokenAuthenticationService), UsernamePasswordAuthenticationFilter.class);*/
}
@Bean

View File

@@ -15,12 +15,14 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
@Configuration
@Import({CommandSideWebAccountsConfiguration.class, CommandSideWebTransactionsConfiguration.class, JdbcEventStoreConfiguration.class, QuerySideWebConfiguration.class, CustomersQuerySideWebConfiguration.class, CustomersCommandSideWebConfiguration.class, CustomerAuthConfiguration.class})
@EnableAutoConfiguration
@ComponentScan
public class BankingWebConfiguration {
public class BankingWebConfiguration extends WebMvcConfigurerAdapter {
@Bean
@@ -29,4 +31,8 @@ public class BankingWebConfiguration {
return new HttpMessageConverters(additional);
}
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/*").setViewName("forward:/index.html");
}
}