提交 | 用户 | 时间
|
71e81e
|
1 |
package cn.stylefeng.guns.sys.core.auth.userdetail; |
懒 |
2 |
|
|
3 |
import cn.stylefeng.guns.base.auth.model.LoginUser; |
|
4 |
import cn.stylefeng.guns.base.auth.service.AuthService; |
|
5 |
import org.springframework.beans.factory.annotation.Autowired; |
|
6 |
import org.springframework.security.core.userdetails.UserDetailsService; |
|
7 |
import org.springframework.security.core.userdetails.UsernameNotFoundException; |
|
8 |
import org.springframework.stereotype.Service; |
|
9 |
|
|
10 |
/** |
|
11 |
* 用户详情信息获取 |
|
12 |
* |
|
13 |
* @author fengshuonan |
|
14 |
* @Date 2019-09-28 14:07 |
|
15 |
*/ |
|
16 |
@Service("jwtUserDetailsService") |
|
17 |
public class JwtUserDetailsServiceImpl implements UserDetailsService { |
|
18 |
|
|
19 |
@Autowired |
|
20 |
private AuthService authService; |
|
21 |
|
|
22 |
@Override |
|
23 |
public LoginUser loadUserByUsername(String username) throws UsernameNotFoundException { |
|
24 |
return authService.user(username); |
|
25 |
} |
|
26 |
} |