public interface EnhanceUserDetailsService
extends org.springframework.security.core.userdetails.UserDetailsService
Description: 自定义UserDetailsService接口,方便以后扩展
| 限定符和类型 | 方法和说明 |
|---|---|
HerodotusUser |
loadHerodotusUserByUsername(String username)
系统用户名
|
org.springframework.security.core.userdetails.UserDetails |
loadUserBySocial(String source,
cn.herodotus.engine.assistant.core.domain.AccessPrincipal accessPrincipal)
通过社交集成的唯一id,获取用户信息
如果是短信验证码,openId就是手机号码
|
org.springframework.security.core.userdetails.UserDetails loadUserBySocial(String source, cn.herodotus.engine.assistant.core.domain.AccessPrincipal accessPrincipal) throws org.springframework.security.core.AuthenticationException
如果是短信验证码,openId就是手机号码
accessPrincipal - 社交登录提供的相关信息source - 社交集成提供商类型UserDetailsorg.springframework.security.core.userdetails.UsernameNotFoundException - 用户不存在org.springframework.security.core.AuthenticationExceptionHerodotusUser loadHerodotusUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
username - 用户账号HerodotusUserorg.springframework.security.core.userdetails.UsernameNotFoundException - 用户不存在Copyright © 2023 Dromara. All rights reserved.