Class CustomUserDetailsService
java.lang.Object
com.JesacaLin.GrubGoblin_v13.services.CustomUserDetailsService
- All Implemented Interfaces:
org.springframework.security.core.userdetails.UserDetailsService
@Component
public class CustomUserDetailsService
extends Object
implements org.springframework.security.core.userdetails.UserDetailsService
This class loads users for the authentication system.
-
Constructor Summary
ConstructorsConstructorDescriptionCustomUserDetailsService
(UserDAO userDAO) Class constructor, creates a new instance of the class. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.userdetails.UserDetails
loadUserByUsername
(String username) Load a user by their username
-
Constructor Details
-
CustomUserDetailsService
Class constructor, creates a new instance of the class.
-
-
Method Details
-
loadUserByUsername
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException Load a user by their username- Specified by:
loadUserByUsername
in interfaceorg.springframework.security.core.userdetails.UserDetailsService
- Parameters:
username
- The username to load- Returns:
- The user details as a jwtUser
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
- if the user is not found
-