mirror of
https://gitee.com/dromara/MaxKey.git
synced 2026-05-15 04:52:09 +08:00
Opt
This commit is contained in:
@@ -52,7 +52,7 @@ public abstract class AbstractAuthenticationProvider {
|
||||
|
||||
protected AbstractAuthenticationRealm authenticationRealm;
|
||||
|
||||
protected AbstractOtpAuthn tfaOptAuthn;
|
||||
protected AbstractOtpAuthn tfaOtpAuthn;
|
||||
|
||||
protected AbstractRemeberMeService remeberMeService;
|
||||
|
||||
@@ -227,7 +227,7 @@ public abstract class AbstractAuthenticationProvider {
|
||||
validUserInfo.setSharedSecret(sharedSecret);
|
||||
validUserInfo.setSharedCounter(userInfo.getSharedCounter());
|
||||
validUserInfo.setId(userInfo.getId());
|
||||
if (otpCaptcha == null || !tfaOptAuthn.validate(validUserInfo, otpCaptcha)) {
|
||||
if (otpCaptcha == null || !tfaOtpAuthn.validate(validUserInfo, otpCaptcha)) {
|
||||
String message = WebContext.getI18nValue("login.error.captcha");
|
||||
_logger.debug("login captcha valid error.");
|
||||
throw new BadCredentialsException(message);
|
||||
@@ -320,8 +320,8 @@ public abstract class AbstractAuthenticationProvider {
|
||||
this.authenticationRealm = authenticationRealm;
|
||||
}
|
||||
|
||||
public void setTfaOptAuthn(AbstractOtpAuthn tfaOptAuthn) {
|
||||
this.tfaOptAuthn = tfaOptAuthn;
|
||||
public void setTfaOtpAuthn(AbstractOtpAuthn tfaOtpAuthn) {
|
||||
this.tfaOtpAuthn = tfaOtpAuthn;
|
||||
}
|
||||
|
||||
public void setRemeberMeService(AbstractRemeberMeService remeberMeService) {
|
||||
|
||||
@@ -61,12 +61,12 @@ public class RealmAuthenticationProvider extends AbstractAuthenticationProvider
|
||||
public RealmAuthenticationProvider(
|
||||
AbstractAuthenticationRealm authenticationRealm,
|
||||
ApplicationConfig applicationConfig,
|
||||
AbstractOtpAuthn tfaOptAuthn,
|
||||
AbstractOtpAuthn tfaOtpAuthn,
|
||||
AbstractRemeberMeService remeberMeService,
|
||||
OnlineTicketServices onlineTicketServices) {
|
||||
this.authenticationRealm = authenticationRealm;
|
||||
this.applicationConfig = applicationConfig;
|
||||
this.tfaOptAuthn = tfaOptAuthn;
|
||||
this.tfaOtpAuthn = tfaOtpAuthn;
|
||||
this.remeberMeService = remeberMeService;
|
||||
this.onlineTicketServices = onlineTicketServices;
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public class AuthenticationAutoConfiguration implements InitializingBean {
|
||||
public AbstractAuthenticationProvider authenticationProvider(
|
||||
AbstractAuthenticationRealm authenticationRealm,
|
||||
ApplicationConfig applicationConfig,
|
||||
AbstractOtpAuthn tfaOptAuthn,
|
||||
AbstractOtpAuthn tfaOtpAuthn,
|
||||
AbstractRemeberMeService remeberMeService,
|
||||
OnlineTicketServices onlineTicketServices
|
||||
) {
|
||||
@@ -88,7 +88,7 @@ public class AuthenticationAutoConfiguration implements InitializingBean {
|
||||
return new RealmAuthenticationProvider(
|
||||
authenticationRealm,
|
||||
applicationConfig,
|
||||
tfaOptAuthn,
|
||||
tfaOtpAuthn,
|
||||
remeberMeService,
|
||||
onlineTicketServices
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user