mirror of
https://gitee.com/durcframework/SOP.git
synced 2025-08-11 21:57:56 +08:00
3.1.0
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.gitee.sop.gatewaycommon.validate.taobao;
|
package com.gitee.sop.gatewaycommon.validate.taobao;
|
||||||
|
|
||||||
|
|
||||||
|
import com.gitee.sop.gatewaycommon.bean.SopConstants;
|
||||||
import com.gitee.sop.gatewaycommon.message.ErrorEnum;
|
import com.gitee.sop.gatewaycommon.message.ErrorEnum;
|
||||||
import com.gitee.sop.gatewaycommon.param.ApiParam;
|
import com.gitee.sop.gatewaycommon.param.ApiParam;
|
||||||
import com.gitee.sop.gatewaycommon.validate.AbstractSigner;
|
import com.gitee.sop.gatewaycommon.validate.AbstractSigner;
|
||||||
@@ -35,6 +36,9 @@ public class TaobaoSigner extends AbstractSigner {
|
|||||||
@Override
|
@Override
|
||||||
public String buildServerSign(ApiParam param, String secret) {
|
public String buildServerSign(ApiParam param, String secret) {
|
||||||
String signMethod = param.fetchSignMethod();
|
String signMethod = param.fetchSignMethod();
|
||||||
|
if (signMethod == null) {
|
||||||
|
signMethod = SopConstants.DEFAULT_SIGN_METHOD;
|
||||||
|
}
|
||||||
SignEncipher signEncipher = signEncipherMap.get(signMethod);
|
SignEncipher signEncipher = signEncipherMap.get(signMethod);
|
||||||
if (signEncipher == null) {
|
if (signEncipher == null) {
|
||||||
throw ErrorEnum.ISV_INVALID_SIGNATURE_TYPE.getErrorMeta().getException(signMethod);
|
throw ErrorEnum.ISV_INVALID_SIGNATURE_TYPE.getErrorMeta().getException(signMethod);
|
||||||
|
Reference in New Issue
Block a user