Merge branch 'master' into eureka

eureka
tanghc 5 years ago
commit d281d72deb
  1. 4
      sop-common/sop-gateway-common/src/main/java/com/gitee/sop/gatewaycommon/validate/taobao/TaobaoSigner.java

@ -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);

Loading…
Cancel
Save