temporarily removed authentication
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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