Interface SocialAuthenticationHandler
- All Known Implementing Classes:
AbstractSocialAuthenticationHandler,DefaultSocialAuthenticationHandler
public interface SocialAuthenticationHandler
Description: 社交登录处理器
- Author:
- : gengwei.zheng
- Date:
- : 2021/4/4 17:34
-
Method Summary
Modifier and TypeMethodDescriptioncn.herodotus.engine.core.identity.domain.HerodotusUserauthentication(String source, cn.herodotus.engine.core.identity.domain.AccessPrincipal accessPrincipal) 社交登录
-
Method Details
-
authentication
cn.herodotus.engine.core.identity.domain.HerodotusUser authentication(String source, cn.herodotus.engine.core.identity.domain.AccessPrincipal accessPrincipal) throws org.springframework.security.core.AuthenticationException 社交登录1. 首先在第三方系统进行认证,或者手机号码、扫码认证。返回认证后的信息 2. 根据认证返回的信息,在系统中查询是否有对应的用户信息。 2.1. 如果有对应的信息,根据需要更新社交用户的信息,然后返回系统用户信息,进行登录。 2.2. 如果没有对应信息,就先进行用户的注册,然后进行社交用户和系统用户的绑定。
- Parameters:
source- 社交登录提供者分类accessPrincipal- 社交登录所需要的信息AccessPrincipal- Returns:
- 系统用户
- Throws:
org.springframework.security.core.AuthenticationException-AuthenticationException认证错误
-