otpCaptcha

This commit is contained in:
MaxKey
2022-04-22 11:46:01 +08:00
parent a02822d0b3
commit e31a83b679
8 changed files with 34 additions and 7 deletions

View File

@@ -118,8 +118,12 @@ public class LoginEntryPoint {
Institutions inst = (Institutions)WebContext.getAttribute(WebConstants.CURRENT_INST);
model.put("inst", inst);
model.put("captcha", inst.getCaptchaSupport());
model.put("captchaType", inst.getCaptchaType());
if(applicationConfig.getLoginConfig().isCaptcha()) {
model.put("captcha", "true");
}else {
model.put("captcha", inst.getCaptchaSupport());
model.put("captchaType", inst.getCaptchaType());
}
model.put("state", authJwtService.genJwt());
//load Social Sign On Providers
model.put("socials", socialSignOnProviderService.loadSocials(inst.getId()));

View File

@@ -56,6 +56,8 @@ maxkey.auth.jwt.secret =7heM-14BtxjyKPuH3ITIm7q2-ps5MuB
############################################################################
#Login configuration #
############################################################################
#enable captcha
maxkey.login.captcha =${LOGIN_CAPTCHA:false}
#enable two factor,use one time password
maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
#TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud

View File

@@ -52,6 +52,8 @@ maxkey.auth.jwt.secret =7heM-14BtxjyKPuH3ITIm7q2-ps5MuB
############################################################################
#Login configuration #
############################################################################
#enable captcha
maxkey.login.captcha =${LOGIN_CAPTCHA:false}
#enable two factor,use one time password
maxkey.login.mfa =${LOGIN_MFA_ENABLED:true}
#TimeBasedOtpAuthn MailOtpAuthn SmsOtpAuthnYunxin SmsOtpAuthnAliyun SmsOtpAuthnTencentCloud