| | |
| | | public class AppSmsAuthProperties { |
| | | |
| | | private int expireSeconds = 300; |
| | | private boolean debugEnabled = false; |
| | | private String debugCode = ""; |
| | | private DebugScene login = new DebugScene(); |
| | | private DebugScene register = new DebugScene(); |
| | | private DebugScene passwordReset = new DebugScene(); |
| | | private DebugScene phoneChange = new DebugScene(); |
| | | |
| | | /** |
| | | * 获取验证码有效期秒数。 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取是否启用开发调试验证码。 |
| | | * 获取短信登录调试验证码配置。 |
| | | */ |
| | | public boolean isDebugEnabled() { |
| | | return debugEnabled; |
| | | public DebugScene getLogin() { |
| | | return login; |
| | | } |
| | | |
| | | /** |
| | | * 设置是否启用开发调试验证码。 |
| | | * 设置短信登录调试验证码配置。 |
| | | */ |
| | | public void setDebugEnabled(boolean debugEnabled) { |
| | | this.debugEnabled = debugEnabled; |
| | | public void setLogin(DebugScene login) { |
| | | this.login = login; |
| | | } |
| | | |
| | | /** |
| | | * 获取开发调试验证码。 |
| | | * 获取注册调试验证码配置。 |
| | | */ |
| | | public String getDebugCode() { |
| | | return debugCode; |
| | | public DebugScene getRegister() { |
| | | return register; |
| | | } |
| | | |
| | | /** |
| | | * 设置开发调试验证码。 |
| | | * 设置注册调试验证码配置。 |
| | | */ |
| | | public void setDebugCode(String debugCode) { |
| | | this.debugCode = debugCode; |
| | | public void setRegister(DebugScene register) { |
| | | this.register = register; |
| | | } |
| | | |
| | | /** |
| | | * 获取重置密码调试验证码配置。 |
| | | */ |
| | | public DebugScene getPasswordReset() { |
| | | return passwordReset; |
| | | } |
| | | |
| | | /** |
| | | * 设置重置密码调试验证码配置。 |
| | | */ |
| | | public void setPasswordReset(DebugScene passwordReset) { |
| | | this.passwordReset = passwordReset; |
| | | } |
| | | |
| | | /** |
| | | * 获取修改手机号调试验证码配置。 |
| | | */ |
| | | public DebugScene getPhoneChange() { |
| | | return phoneChange; |
| | | } |
| | | |
| | | /** |
| | | * 设置修改手机号调试验证码配置。 |
| | | */ |
| | | public void setPhoneChange(DebugScene phoneChange) { |
| | | this.phoneChange = phoneChange; |
| | | } |
| | | |
| | | /** |
| | | * 单个短信验证码场景的调试配置。 |
| | | */ |
| | | public static class DebugScene { |
| | | |
| | | private boolean enabled = false; |
| | | private String code = ""; |
| | | |
| | | /** |
| | | * 获取当前场景是否启用调试验证码。 |
| | | */ |
| | | public boolean isEnabled() { |
| | | return enabled; |
| | | } |
| | | |
| | | /** |
| | | * 设置当前场景是否启用调试验证码。 |
| | | */ |
| | | public void setEnabled(boolean enabled) { |
| | | this.enabled = enabled; |
| | | } |
| | | |
| | | /** |
| | | * 获取当前场景调试验证码。 |
| | | */ |
| | | public String getCode() { |
| | | return code; |
| | | } |
| | | |
| | | /** |
| | | * 设置当前场景调试验证码。 |
| | | */ |
| | | public void setCode(String code) { |
| | | this.code = code; |
| | | } |
| | | } |
| | | } |