Merge commit 'f14fd73f6364ce6623a53074a24d8c49d93921de' into wip-customer
* commit 'f14fd73f6364ce6623a53074a24d8c49d93921de': temporarily removed authentication temporarily removed authentication temporarily removed authentication
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user