Skip to content

Commit

Permalink
Usuario Tecnificado
Browse files Browse the repository at this point in the history
  • Loading branch information
jcbh committed Mar 28, 2021
1 parent 87faa31 commit 69e7131
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/main/java/org/tecnificados/boot/WebSecurityConfig.java
Expand Up @@ -8,10 +8,15 @@



import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.User;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
import org.tecnificados.boot.controller.StartController;


Expand Down Expand Up @@ -41,6 +46,22 @@ protected void configure(HttpSecurity http) throws Exception {
.and()
.logout()
.permitAll();

}



@Bean
@Override
public UserDetailsService userDetailsService() {
UserDetails user =
User.withDefaultPasswordEncoder()
.username("Tecnificado")
.password("ironman")
.roles("USER")
.build();

return new InMemoryUserDetailsManager(user);
}


Expand Down

0 comments on commit 69e7131

Please sign in to comment.