diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java index 68089e4de..d03aeebae 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/interceptor/LocalServerLoginAccountsInterceptor.java @@ -83,7 +83,7 @@ public class LocalServerLoginAccountsInterceptor extends HandlerInterceptorAdapt // 验证时间 不能大于5秒 if (StringUtil.isNotBlank(authTime)) { long authTimeLong = Long.parseLong(authTime); - if (secondTimestamp - authTimeLong > 5) { + if (secondTimestamp - authTimeLong > suoFeiYaProperties.getAuthTime()) { returnJson(response, JSONObject.toJSONString(R.fail(1, "认证不通过,时间戳过期"))); return false; } diff --git a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/pros/FactoryDataSuoFeiYaProperties.java b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/pros/FactoryDataSuoFeiYaProperties.java index dc1ccc648..d744c2f1c 100644 --- a/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/pros/FactoryDataSuoFeiYaProperties.java +++ b/blade-service/logpm-factory-data/logpm-factory-data-suofeiya/src/main/java/com/logpm/factorydata/suofeiya/pros/FactoryDataSuoFeiYaProperties.java @@ -16,5 +16,7 @@ public class FactoryDataSuoFeiYaProperties { * 颁布给工厂的认证码 */ private String auth; + /** auth过期时间 */ + private Long authTime; }