Skip to content

Commit cf91a02

Browse files
committed
优化拆分费用
1 parent a6ece2b commit cf91a02

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

java110-core/src/main/java/com/java110/core/factory/AuthenticationFactory.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.auth0.jwt.interfaces.DecodedJWT;
1212
import com.java110.core.context.ApiDataFlow;
1313
import com.java110.core.context.DataFlow;
14+
import com.java110.core.log.LoggerFactory;
1415
import com.java110.dto.reportData.ReportDataDto;
1516
import com.java110.dto.reportData.ReportDataHeaderDto;
1617
import com.java110.utils.cache.CommonCache;
@@ -23,6 +24,7 @@
2324
import com.java110.utils.util.Base64Convert;
2425
import com.java110.utils.util.StringUtil;
2526
import org.apache.commons.codec.digest.DigestUtils;
27+
import org.slf4j.Logger;
2628

2729
import javax.crypto.Cipher;
2830
import javax.crypto.SecretKeyFactory;
@@ -45,6 +47,7 @@
4547
* Created by wuxw on 2018/4/23.
4648
*/
4749
public class AuthenticationFactory {
50+
private static Logger logger = LoggerFactory.getLogger(AuthenticationFactory.class);
4851

4952
public final static String PASSWD_SALT = "hc@java110";
5053

@@ -234,6 +237,7 @@ public static String dataFlowMd5(DataFlow dataFlow) throws NoAuthorityException
234237
reqInfo += ((dataFlow.getReqBusiness() == null || dataFlow.getReqBusiness().size() == 0)
235238
? dataFlow.getReqData() : dataFlow.getReqBusiness().toJSONString());
236239
reqInfo += dataFlow.getAppRoutes().get(0).getSecurityCode();
240+
logger.debug("加密字符串={}",reqInfo);
237241
return md5(reqInfo);
238242
}
239243

@@ -280,6 +284,7 @@ public static String apiDataFlowMd5(ApiDataFlow dataFlow) throws NoAuthorityExce
280284
reqInfo += "GET".equals(dataFlow.getRequestHeaders().get(CommonConstant.HTTP_METHOD)) ?
281285
param : dataFlow.getReqData();
282286
reqInfo += dataFlow.getAppRoutes().get(0).getSecurityCode();
287+
283288
return md5(reqInfo);
284289
}
285290

0 commit comments

Comments
 (0)