接口 EnhanceUserDetailsService
- 所有超级接口:
org.springframework.security.core.userdetails.UserDetailsService
public interface EnhanceUserDetailsService
extends org.springframework.security.core.userdetails.UserDetailsService
Description: 自定义UserDetailsService接口,方便以后扩展
- 作者:
- : gengwei.zheng
- Date:
- : 2021/1/17 12:49
-
方法概要
修饰符和类型方法说明loadHerodotusUserBySocial(String source, AccessPrincipal accessPrincipal) 通过社交集成的唯一id,获取用户信息loadHerodotusUserByUsername(String username) 系统用户名从接口继承的方法 org.springframework.security.core.userdetails.UserDetailsService
loadUserByUsername
-
方法详细资料
-
loadHerodotusUserBySocial
HerodotusUser loadHerodotusUserBySocial(String source, AccessPrincipal accessPrincipal) throws org.springframework.security.core.AuthenticationException 通过社交集成的唯一id,获取用户信息如果是短信验证码,openId就是手机号码
- 参数:
source- 社交集成提供商类型accessPrincipal- 社交登录提供的相关信息- 返回:
HerodotusUser- 抛出:
org.springframework.security.core.userdetails.UsernameNotFoundException- 用户不存在org.springframework.security.core.AuthenticationException
-
loadHerodotusUserByUsername
HerodotusUser loadHerodotusUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException 系统用户名- 参数:
username- 用户账号- 返回:
HerodotusUser- 抛出:
org.springframework.security.core.userdetails.UsernameNotFoundException- 用户不存在
-