[R9] Implementation class for User Details Service
This commit is contained in:
parent
f00c38e102
commit
276e62da72
@ -0,0 +1,30 @@
|
|||||||
|
package com.mirna.hospitalmanagementapi.application.services.auth;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetails;
|
||||||
|
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||||
|
import org.springframework.security.core.userdetails.UsernameNotFoundException;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import com.mirna.hospitalmanagementapi.domain.services.UserService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This class is an implementation of the UserDetailsService interface.
|
||||||
|
*
|
||||||
|
* This class provides methods to perform operations on users information
|
||||||
|
*
|
||||||
|
* @author Mirna Gama
|
||||||
|
* @version 1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class UserDetailsServiceImpl implements UserDetailsService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private UserService userService;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
|
||||||
|
return userService.findUserByLogin(username);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user