Class UserDetailsServiceImpl

java.lang.Object
com.deusto.coffeestack.config.UserDetailsServiceImpl
All Implemented Interfaces:
org.springframework.security.core.userdetails.UserDetailsService

@Service public class UserDetailsServiceImpl extends Object implements org.springframework.security.core.userdetails.UserDetailsService
Loads a Usuario from the database and wraps it as a Spring Security UserDetails with authority ROLE_<ROL>.
  • Constructor Details

    • UserDetailsServiceImpl

      public UserDetailsServiceImpl(UsuarioRepository repository)
  • Method Details

    • loadUserByUsername

      public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
      Specified by:
      loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsService
      Throws:
      org.springframework.security.core.userdetails.UsernameNotFoundException