Class UserDetailsServiceImpl

java.lang.Object
com.bytedesk.core.rbac.user.UserDetailsServiceImpl
All Implemented Interfaces:
org.springframework.security.core.userdetails.UserDetailsService

@Service public class UserDetailsServiceImpl extends Object implements org.springframework.security.core.userdetails.UserDetailsService
https://wankhedeshubham.medium.com/spring-boot-security-with-userdetailsservice-and-custom-authentication-provider-3df3a188993f
  • Field Details

  • Constructor Details

    • UserDetailsServiceImpl

      public UserDetailsServiceImpl()
  • Method Details

    • findByEmailAndPlatform

      @Cacheable(value="user", key="#email", unless="#result == null") public Optional<UserEntity> findByEmailAndPlatform(String email, String platform)
    • findByMobileAndPlatform

      @Cacheable(value="user", key="#mobile", unless="#result == null") public Optional<UserEntity> findByMobileAndPlatform(String mobile, String platform)
    • findByUsernameAndPlatform

      @Cacheable(value="user", key="#username", unless="#result == null") public Optional<UserEntity> findByUsernameAndPlatform(String username, String platform)
    • 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
    • loadUserByUsernameAndPlatform

      public org.springframework.security.core.userdetails.UserDetails loadUserByUsernameAndPlatform(String subject)
    • loadUserByEmailAndPlatform

      public UserDetailsImpl loadUserByEmailAndPlatform(String email, String platform)
    • loadUserByMobileAndPlatform

      public UserDetailsImpl loadUserByMobileAndPlatform(String mobile, String platform)