mirror of https://gitee.com/topiam/eiam
⚡ 优化身份提供商
parent
92913e68b1
commit
cbfc9a5460
|
@ -23,12 +23,15 @@ import com.fasterxml.jackson.databind.annotation.JsonPOJOBuilder;
|
|||
|
||||
import cn.topiam.employee.authentication.common.IdentityProviderType;
|
||||
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* IDP用户信息
|
||||
*
|
||||
* @author TopIAM
|
||||
* Created by support@topiam.cn on 2022/9/18 21:23
|
||||
*/
|
||||
@Getter
|
||||
public class IdpUserDetails {
|
||||
|
||||
/**
|
||||
|
@ -90,50 +93,6 @@ public class IdpUserDetails {
|
|||
return new IdpUserDetailsBuilder();
|
||||
}
|
||||
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
|
||||
public String getMobile() {
|
||||
return mobile;
|
||||
}
|
||||
|
||||
public String getNickName() {
|
||||
return nickName;
|
||||
}
|
||||
|
||||
public String getAvatarUrl() {
|
||||
return avatarUrl;
|
||||
}
|
||||
|
||||
public String getOpenId() {
|
||||
return openId;
|
||||
}
|
||||
|
||||
public String getStateCode() {
|
||||
return stateCode;
|
||||
}
|
||||
|
||||
public String getUnionId() {
|
||||
return unionId;
|
||||
}
|
||||
|
||||
public String getProviderId() {
|
||||
return providerId;
|
||||
}
|
||||
|
||||
public String getProviderCode() {
|
||||
return providerCode;
|
||||
}
|
||||
|
||||
public IdentityProviderType getProviderType() {
|
||||
return providerType;
|
||||
}
|
||||
|
||||
public Map<String, Object> getAdditionalInfo() {
|
||||
return additionalInfo;
|
||||
}
|
||||
|
||||
IdpUserDetails(final String email, final String mobile, final String nickName,
|
||||
final String avatarUrl, final String openId, final String stateCode,
|
||||
final String unionId, final String providerId, final String providerCode,
|
||||
|
|
|
@ -25,7 +25,7 @@ import org.springframework.security.oauth2.client.web.AuthorizationRequestReposi
|
|||
import org.springframework.security.oauth2.client.web.HttpSessionOAuth2AuthorizationRequestRepository;
|
||||
import org.springframework.security.oauth2.core.endpoint.OAuth2AuthorizationRequest;
|
||||
import org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter;
|
||||
import org.springframework.security.web.util.matcher.AntPathRequestMatcher;
|
||||
import org.springframework.security.web.util.matcher.RequestMatcher;
|
||||
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
||||
|
@ -131,7 +131,6 @@ public abstract class AbstractIdpAuthenticationProcessingFilter extends
|
|||
}
|
||||
|
||||
public static final String GET_USERINFO_ERROR_CODE = "get_userinfo_error_code";
|
||||
public static final String AUTH_CODE = "authCode";
|
||||
|
||||
public static final String INVALID_IDP_CONFIG = "invalid_idp_config";
|
||||
|
||||
|
@ -156,14 +155,14 @@ public abstract class AbstractIdpAuthenticationProcessingFilter extends
|
|||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param defaultFilterProcessesUrl the {@link String}
|
||||
* @param requiresAuthenticationRequestMatcher the {@link RequestMatcher}
|
||||
* @param userIdpService {@link UserIdpService}
|
||||
* @param identityProviderRepository {@link IdentityProviderRepository}
|
||||
*/
|
||||
protected AbstractIdpAuthenticationProcessingFilter(String defaultFilterProcessesUrl,
|
||||
protected AbstractIdpAuthenticationProcessingFilter(RequestMatcher requiresAuthenticationRequestMatcher,
|
||||
UserIdpService userIdpService,
|
||||
IdentityProviderRepository identityProviderRepository) {
|
||||
super(new AntPathRequestMatcher(defaultFilterProcessesUrl));
|
||||
super(requiresAuthenticationRequestMatcher);
|
||||
this.userIdpService = userIdpService;
|
||||
this.identityProviderRepository = identityProviderRepository;
|
||||
this.authorizationRequestRepository = new HttpSessionOAuth2AuthorizationRequestRepository();
|
||||
|
|
Loading…
Reference in New Issue