/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.ttech.cordovabuild.infrastructure.security;
import com.ttech.cordovabuild.domain.user.UserRepository;
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;
/**
*
* @author capacman
*/
@Service("userService")
public class UserDetailsServiceImpl implements UserDetailsService {
@Autowired
UserRepository UserRepository;
@Override
public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
return UserRepository.findUserByUserName(username);
}
}