package com.nq.utils.sms;
|
|
public final class SmsConstants {
|
|
public static final String SMS_CODE_PREFIX = "SmsCode:";
|
public static final String SMS_SEND_LOCK_PREFIX = "SmsSendLock:";
|
/** 验证码有效期(秒) */
|
public static final int SMS_CODE_TTL_SECONDS = 60;
|
/** 同一手机号发送间隔(秒) */
|
public static final int SMS_SEND_INTERVAL_SECONDS = 60;
|
|
/** 短信验证码校验是否开启,对应 application.properties 中 sms.verify.enabled */
|
public static boolean isVerifyEnabled() {
|
String enabled = com.nq.utils.PropertiesUtil.getProperty("sms.verify.enabled");
|
return !"false".equalsIgnoreCase(org.apache.commons.lang3.StringUtils.trimToEmpty(enabled));
|
}
|
|
private SmsConstants() {
|
}
|
}
|