Untitled
unknown
plain_text
a year ago
848 B
9
Indexable
@Profile({Profiles.TEST, Profiles.LOCAL, Profiles.DEV})
@Bean
public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {
http.authorizeRequests()
.antMatchers("/swagger-ui/**").hasAnyRole(ROLE_SWAGGER)
.anyRequest()
.permitAll()
.and()
.formLogin();
return http.csrf().disable().build();
}
@Profile({Profiles.TEST, Profiles.LOCAL, Profiles.DEV})
@Bean
public UserDetailsService userDetailsService() {
UserDetails user = User.builder()
.username("swagger")
.password("{bcrypt}$2a$10$cA0mgdewq6gdhcvuwtdfhTQIPQAE0mRjzYf85.")
.roles(ROLE_SWAGGER)
.build();
return new InMemoryUserDetailsManager(user);
}Editor is loading...
Leave a Comment