Class JpaUserDetailsService
java.lang.Object
ntnu.idatt2016.v233.SmartMat.service.user.JpaUserDetailsService
- All Implemented Interfaces:
org.springframework.security.core.userdetails.UserDetailsService
@Service
public class JpaUserDetailsService
extends Object
implements org.springframework.security.core.userdetails.UserDetailsService
JpaUserDetailsService is a class that implements the UserDetailsService interface.
- Version:
- 1.0
- Author:
- Birk
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.userdetails.UserDetails
loadUserByUsername
(String username) gets user from username out of database
-
Constructor Details
-
JpaUserDetailsService
public JpaUserDetailsService()
-
-
Method Details
-
loadUserByUsername
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException gets user from username out of database- Specified by:
loadUserByUsername
in interfaceorg.springframework.security.core.userdetails.UserDetailsService
- Parameters:
username
- username of user- Returns:
- user
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
- if user is not found
-