Interface EnhanceUserDetailsService

All Superinterfaces:
org.springframework.security.core.userdetails.UserDetailsService

public interface EnhanceUserDetailsService extends org.springframework.security.core.userdetails.UserDetailsService

Description: 自定义UserDetailsService接口,方便以后扩展

Author:
: gengwei.zheng
Date:
: 2021/1/17 12:49
  • Method Summary

    Modifier and Type
    Method
    Description
    系统用户名
    org.springframework.security.core.userdetails.UserDetails
    loadUserBySocial(String source, cn.herodotus.engine.assistant.definition.domain.oauth2.AccessPrincipal accessPrincipal)
    通过社交集成的唯一id,获取用户信息

    Methods inherited from interface org.springframework.security.core.userdetails.UserDetailsService

    loadUserByUsername
  • Method Details

    • loadUserBySocial

      org.springframework.security.core.userdetails.UserDetails loadUserBySocial(String source, cn.herodotus.engine.assistant.definition.domain.oauth2.AccessPrincipal accessPrincipal) throws org.springframework.security.core.AuthenticationException
      通过社交集成的唯一id,获取用户信息

      如果是短信验证码,openId就是手机号码

      Parameters:
      accessPrincipal - 社交登录提供的相关信息
      source - 社交集成提供商类型
      Returns:
      UserDetails
      Throws:
      org.springframework.security.core.userdetails.UsernameNotFoundException - 用户不存在
      org.springframework.security.core.AuthenticationException
    • loadHerodotusUserByUsername

      HerodotusUser loadHerodotusUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
      系统用户名
      Parameters:
      username - 用户账号
      Returns:
      HerodotusUser
      Throws:
      org.springframework.security.core.userdetails.UsernameNotFoundException - 用户不存在