Merge commit 'f14fd73f6364ce6623a53074a24d8c49d93921de' into wip-customer

* commit 'f14fd73f6364ce6623a53074a24d8c49d93921de':
  temporarily removed authentication
  temporarily removed authentication
  temporarily removed authentication
This commit is contained in:
Andrew Revinsky (DART)
2016-02-17 00:16:36 +03:00
2 changed files with 8 additions and 10 deletions

View File

@@ -47,16 +47,8 @@ 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()
.antMatchers("/health").permitAll()
.antMatchers("/swagger-ui.html").permitAll()
.antMatchers("/v2/api-docs").permitAll()
.antMatchers("/**.js").permitAll()
.antMatchers("/**.css").permitAll()
.antMatchers(HttpMethod.POST, "/customers").permitAll()
.antMatchers(HttpMethod.POST, "/login").permitAll()
.antMatchers("/**").permitAll()
.anyRequest().authenticated().and()
.addFilterBefore(new StatelessAuthenticationFilter(tokenAuthenticationService), UsernamePasswordAuthenticationFilter.class);
}

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");
}
}