mirror of
https://gitee.com/dromara/sms4j.git
synced 2025-12-06 17:08:40 +08:00
腾讯云的发送需要SmsSdkAppId,但是在授权拼接签名时同样也需要SecretId(accessKeyId)
This commit is contained in:
parent
822d01cce5
commit
14a4c60d34
@ -17,6 +17,10 @@ public abstract class BaseConfig implements SupplierConfig {
|
|||||||
* Access Key
|
* Access Key
|
||||||
*/
|
*/
|
||||||
private String accessKeyId;
|
private String accessKeyId;
|
||||||
|
/**
|
||||||
|
* Sdk App Id
|
||||||
|
*/
|
||||||
|
private String sdkAppId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Access Key Secret
|
* Access Key Secret
|
||||||
|
|||||||
@ -91,7 +91,7 @@ public class TencentSmsImpl extends AbstractSmsBlend<TencentConfig> {
|
|||||||
}
|
}
|
||||||
Map<String, String> headsMap = TencentUtils.generateHeadsMap(signature, timestamp, getConfig().getAction(),
|
Map<String, String> headsMap = TencentUtils.generateHeadsMap(signature, timestamp, getConfig().getAction(),
|
||||||
getConfig().getVersion(), getConfig().getTerritory(), getConfig().getRequestUrl());
|
getConfig().getVersion(), getConfig().getTerritory(), getConfig().getRequestUrl());
|
||||||
Map<String, Object> requestBody = TencentUtils.generateRequestBody(phones, getConfig().getAccessKeyId(),
|
Map<String, Object> requestBody = TencentUtils.generateRequestBody(phones, getConfig().getSdkAppId(),
|
||||||
getConfig().getSignature(), templateId, messages);
|
getConfig().getSignature(), templateId, messages);
|
||||||
String url = Constant.HTTPS_PREFIX + getConfig().getRequestUrl();
|
String url = Constant.HTTPS_PREFIX + getConfig().getRequestUrl();
|
||||||
|
|
||||||
|
|||||||
@ -65,7 +65,7 @@ public class TencentUtils {
|
|||||||
String signedHeaders = "content-type;host";
|
String signedHeaders = "content-type;host";
|
||||||
Map<String, Object> params = new HashMap<>();
|
Map<String, Object> params = new HashMap<>();
|
||||||
params.put("PhoneNumberSet", phones);
|
params.put("PhoneNumberSet", phones);
|
||||||
params.put("SmsSdkAppId", tencentConfig.getAccessKeyId());
|
params.put("SmsSdkAppId", tencentConfig.getSdkAppId());
|
||||||
params.put("SignName", tencentConfig.getSignature());
|
params.put("SignName", tencentConfig.getSignature());
|
||||||
params.put("TemplateId", templateId);
|
params.put("TemplateId", templateId);
|
||||||
params.put("TemplateParamSet", messages);
|
params.put("TemplateParamSet", messages);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user