File tree Expand file tree Collapse file tree
src/main/java/com/ourmenu/backend/domain/user/application Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88import lombok .RequiredArgsConstructor ;
99import lombok .extern .slf4j .Slf4j ;
1010import org .springframework .security .core .userdetails .UserDetails ;
11- import org .springframework .security .core .userdetails .UserDetailsService ;
1211import org .springframework .security .core .userdetails .UsernameNotFoundException ;
1312import org .springframework .stereotype .Service ;
1413
1514@ Service
1615@ RequiredArgsConstructor
1716@ Slf4j
18- public class CustomUserDetailsService implements UserDetailsService {
17+ public class CustomUserDetailsService {
1918
2019 private final UserRepository userRepository ;
2120
22- @ Override
23- public UserDetails loadUserByUsername (String email ) throws UsernameNotFoundException {
24-
25- User user = userRepository .findByEmailAndSignInType (email , SignInType .EMAIL ).
26- orElseThrow (NotFoundUserException ::new );
27-
28- return new CustomUserDetails (
29- user .getId (),
30- user .getEmail (),
31- user .getPassword ()
32- );
33- }
34-
3521 public UserDetails loadUserByEmailAndSignInType (String email , SignInType signInType ) throws UsernameNotFoundException {
3622 User user = userRepository .findByEmailAndSignInType (email , signInType ).
3723 orElseThrow (NotFoundUserException ::new );
You can’t perform that action at this time.
0 commit comments