mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-14 12:32:09 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -155,6 +155,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab
|
||||
| 路特斯中国 |
|
||||
| 宇通客车股份有限公司 |
|
||||
| 国家能源局 |
|
||||
| 国务院港澳事务办公室 |
|
||||
| 百度智能云身份管理服务 |
|
||||
| 360公司 |
|
||||
| 三一华兴 |
|
||||
@@ -163,6 +164,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab
|
||||
| 联鹏应用软件(上海)有限公司 |
|
||||
| 上海万序健康科技有限公司 |
|
||||
| 上海中商网络股份有限公司 |
|
||||
| 上海半天妖餐饮管理有限公司 |
|
||||
| 跳羚科技(厦门)有限公司 |
|
||||
| 飞天诚信科技股份有限公司 |
|
||||
| 浪潮工业互联网股份有限公司 |
|
||||
@@ -170,6 +172,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab
|
||||
| 中创智维科技有限公司 |
|
||||
| 中航金网(北京)电子商务有限公司 |
|
||||
| 中国航空制造技术研究院 |
|
||||
| 中建国际投资集团有限公司 |
|
||||
| 同方节能工程技术有限公司 |
|
||||
| 云南航天工程物探检测股份有限公司 |
|
||||
| 山东港口陆海国际物流集团有限公司 |
|
||||
|
||||
@@ -154,6 +154,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab
|
||||
| 路特斯中国 |
|
||||
| 宇通客车股份有限公司 |
|
||||
| 国家能源局 |
|
||||
| 国务院港澳事务办公室 |
|
||||
| 百度智能云身份管理服务 |
|
||||
| 360公司 |
|
||||
| 三一华兴 |
|
||||
@@ -162,6 +163,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab
|
||||
| 联鹏应用软件(上海)有限公司 |
|
||||
| 上海万序健康科技有限公司 |
|
||||
| 上海中商网络股份有限公司 |
|
||||
| 上海半天妖餐饮管理有限公司 |
|
||||
| 跳羚科技(厦门)有限公司 |
|
||||
| 飞天诚信科技股份有限公司 |
|
||||
| 浪潮工业互联网股份有限公司 |
|
||||
@@ -169,6 +171,7 @@ Download the current version from Baidu Pan,<a href="http://www.maxkey.top/zh/ab
|
||||
| 中创智维科技有限公司 |
|
||||
| 中航金网(北京)电子商务有限公司 |
|
||||
| 中国航空制造技术研究院 |
|
||||
| 中建国际投资集团有限公司 |
|
||||
| 同方节能工程技术有限公司 |
|
||||
| 云南航天工程物探检测股份有限公司 |
|
||||
| 山东港口陆海国际物流集团有限公司 |
|
||||
|
||||
@@ -156,6 +156,7 @@ MaxKey注重企业级场景下的性能、安全和易用性,广泛应用于
|
||||
| 路特斯中国 |
|
||||
| 宇通客车股份有限公司 |
|
||||
| 国家能源局 |
|
||||
| 国务院港澳事务办公室 |
|
||||
| 百度智能云身份管理服务 |
|
||||
| 360公司 |
|
||||
| 三一华兴 |
|
||||
@@ -164,6 +165,7 @@ MaxKey注重企业级场景下的性能、安全和易用性,广泛应用于
|
||||
| 联鹏应用软件(上海)有限公司 |
|
||||
| 上海万序健康科技有限公司 |
|
||||
| 上海中商网络股份有限公司 |
|
||||
| 上海半天妖餐饮管理有限公司 |
|
||||
| 跳羚科技(厦门)有限公司 |
|
||||
| 飞天诚信科技股份有限公司 |
|
||||
| 浪潮工业互联网股份有限公司 |
|
||||
@@ -171,6 +173,7 @@ MaxKey注重企业级场景下的性能、安全和易用性,广泛应用于
|
||||
| 中创智维科技有限公司 |
|
||||
| 中航金网(北京)电子商务有限公司 |
|
||||
| 中国航空制造技术研究院 |
|
||||
| 中建国际投资集团有限公司 |
|
||||
| 同方节能工程技术有限公司 |
|
||||
| 云南航天工程物探检测股份有限公司 |
|
||||
| 山东港口陆海国际物流集团有限公司 |
|
||||
|
||||
@@ -95,22 +95,32 @@ public class ExtendApiQQExmailAdapter extends AbstractAuthorizeAdapter {
|
||||
public String getToken(String corpid , String corpsecret) {
|
||||
String accessToken = tokenCache.getIfPresent(corpid);
|
||||
if(accessToken == null) {
|
||||
_logger.debug("corpid {} , corpsecret {}" , corpid , corpsecret);
|
||||
_logger.debug("get token url {}" , String.format(TOKEN_URI,corpid,corpsecret));
|
||||
String responseBody = new HttpRequestAdapter().get(String.format(TOKEN_URI,corpid,corpsecret),null);
|
||||
Token token =JsonUtils.gsonStringToObject(responseBody,Token.class);
|
||||
_logger.debug("access_token {}" , token);
|
||||
accessToken = token.getAccess_token();
|
||||
tokenCache.put(corpid, accessToken);
|
||||
_logger.debug("Response Body {}" , responseBody);
|
||||
Token token = JsonUtils.gsonStringToObject(responseBody,Token.class);
|
||||
if(token.getErrcode() == 0 ) {
|
||||
_logger.debug("access_token {}" , token);
|
||||
accessToken = token.getAccess_token();
|
||||
tokenCache.put(corpid, accessToken);
|
||||
}else {
|
||||
_logger.debug("Error Code {}" , exMailMsgMapper.get(token.getErrcode()));;
|
||||
}
|
||||
}
|
||||
return accessToken;
|
||||
}
|
||||
|
||||
public ExMailLoginUrl getLoginUrl(String accessToken,String userId) {
|
||||
_logger.debug("userId {}" , userId);
|
||||
String authKeyBody = new HttpRequestAdapter().get(String.format(AUTHKEY_URI,accessToken,userId),null);
|
||||
|
||||
ExMailLoginUrl exMailLoginUrl = JsonUtils.gsonStringToObject(authKeyBody, ExMailLoginUrl.class);
|
||||
_logger.debug("LoginUrl {} " , exMailLoginUrl);
|
||||
return exMailLoginUrl;
|
||||
if(accessToken != null) {
|
||||
_logger.debug("userId {}" , userId);
|
||||
String authKeyBody = new HttpRequestAdapter().get(String.format(AUTHKEY_URI,accessToken,userId),null);
|
||||
|
||||
ExMailLoginUrl exMailLoginUrl = JsonUtils.gsonStringToObject(authKeyBody, ExMailLoginUrl.class);
|
||||
_logger.debug("LoginUrl {} " , exMailLoginUrl);
|
||||
return exMailLoginUrl;
|
||||
}
|
||||
return new ExMailLoginUrl(-1,"access_token is null .");
|
||||
}
|
||||
|
||||
class ExMailMsg{
|
||||
@@ -168,7 +178,7 @@ public class ExtendApiQQExmailAdapter extends AbstractAuthorizeAdapter {
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("Token [access_token=");
|
||||
builder.append("Token [access_token = ");
|
||||
builder.append(access_token);
|
||||
builder.append("]");
|
||||
return builder.toString();
|
||||
@@ -190,6 +200,11 @@ public class ExtendApiQQExmailAdapter extends AbstractAuthorizeAdapter {
|
||||
|
||||
public ExMailLoginUrl() {
|
||||
}
|
||||
|
||||
public ExMailLoginUrl(Integer errcode,String errmsg) {
|
||||
super.errcode = errcode;
|
||||
super.errmsg = errmsg;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@@ -83,8 +83,7 @@ public class OpenHTTPRedirectDecoder extends HTTPRedirectDeflateDecoder {
|
||||
String receiverEndpoint = DatatypeHelper
|
||||
.safeTrimOrNullString(getActualReceiverEndpointURI(messageContext));
|
||||
|
||||
log.debug("Intended message destination endpoint: {}",
|
||||
messageDestination);
|
||||
log.debug("Intended message destination endpoint: {}",messageDestination);
|
||||
log.debug("Actual message receiver endpoint: {}", receiverEndpoint);
|
||||
|
||||
// 协议头统一(http或https,需要和destination统一)
|
||||
|
||||
Reference in New Issue
Block a user