接口 SocialAuthenticationHandler

所有已知实现类:
AbstractSocialAuthenticationHandler

public interface SocialAuthenticationHandler

Description: 社交登录处理器

作者:
: gengwei.zheng
Date:
: 2021/4/4 17:34
  • 方法概要

    修饰符和类型
    方法
    说明
    authentication(String source, cn.herodotus.engine.assistant.core.domain.AccessPrincipal accessPrincipal)
    社交登录
  • 方法详细资料

    • authentication

      HerodotusUser authentication(String source, cn.herodotus.engine.assistant.core.domain.AccessPrincipal accessPrincipal) throws org.springframework.security.core.AuthenticationException
      社交登录

      1. 首先在第三方系统进行认证,或者手机号码、扫码认证。返回认证后的信息 2. 根据认证返回的信息,在系统中查询是否有对应的用户信息。 2.1. 如果有对应的信息,根据需要更新社交用户的信息,然后返回系统用户信息,进行登录。 2.2. 如果没有对应信息,就先进行用户的注册,然后进行社交用户和系统用户的绑定。

      参数:
      source - 社交登录提供者分类
      accessPrincipal - 社交登录所需要的信息 AccessPrincipal
      返回:
      系统用户
      抛出:
      org.springframework.security.core.AuthenticationException - AuthenticationException 认证错误