diff --git a/build.savant b/build.savant
index 80727ff7..e3c4a092 100644
--- a/build.savant
+++ b/build.savant
@@ -24,7 +24,7 @@ javaErrorVersion = "2.2.3"
restifyVersion = "4.4.0"
testngVersion = "7.5.1"
-project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.67.0", licenses: ["ApacheV2_0"]) {
+project(group: "io.fusionauth", name: "fusionauth-java-client", version: "1.68.0", licenses: ["ApacheV2_0"]) {
workflow {
fetch {
cache()
diff --git a/pom.xml b/pom.xml
index 31a37ba1..ed33fb2c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -17,7 +17,7 @@
io.fusionauth
fusionauth-java-client
- 1.67.0
+ 1.68.0
jar
FusionAuth Java Client Library
diff --git a/src/main/java/io/fusionauth/client/FusionAuthClient.java b/src/main/java/io/fusionauth/client/FusionAuthClient.java
index 363406e8..adaa0d31 100644
--- a/src/main/java/io/fusionauth/client/FusionAuthClient.java
+++ b/src/main/java/io/fusionauth/client/FusionAuthClient.java
@@ -144,6 +144,7 @@
import io.fusionauth.domain.api.ThemeSearchRequest;
import io.fusionauth.domain.api.ThemeSearchResponse;
import io.fusionauth.domain.api.TwoFactorDisableRequest;
+import io.fusionauth.domain.api.TwoFactorUpdateRequest;
import io.fusionauth.domain.api.TwoFactorRecoveryCodeResponse;
import io.fusionauth.domain.api.TwoFactorRequest;
import io.fusionauth.domain.api.TwoFactorResponse;
@@ -6296,6 +6297,22 @@ public ClientResponse updateTheme(UUID themeId, ThemeRequ
.go();
}
+ /**
+ * Updates the two-factor method for the given user using a JSON body.
+ *
+ * @param userId The Id of the user to update.
+ * @param request The request information that contains the name and methodId along with any event information.
+ * @return The ClientResponse object.
+ */
+ public ClientResponse updateTwoFactor(UUID userId, TwoFactorUpdateRequest request) {
+ return start(Void.TYPE, Errors.class)
+ .uri("/api/user/two-factor")
+ .urlSegment(userId)
+ .bodyHandler(new JSONBodyHandler(request, objectMapper()))
+ .put()
+ .go();
+ }
+
/**
* Updates the user with the given Id.
*
diff --git a/src/main/java/io/fusionauth/domain/Application.java b/src/main/java/io/fusionauth/domain/Application.java
index f3bd2b20..7d9a5685 100644
--- a/src/main/java/io/fusionauth/domain/Application.java
+++ b/src/main/java/io/fusionauth/domain/Application.java
@@ -55,6 +55,8 @@ public class Application implements Buildable, Tenantable {
public AuthenticationTokenConfiguration authenticationTokenConfiguration = new AuthenticationTokenConfiguration();
+ public URI baseURL;
+
public CleanSpeakConfiguration cleanSpeakConfiguration;
public Map data = new LinkedHashMap<>();
@@ -126,6 +128,7 @@ public Application(Application other) {
this.active = other.active;
this.accessControlConfiguration = new ApplicationAccessControlConfiguration(other.accessControlConfiguration);
this.authenticationTokenConfiguration = new AuthenticationTokenConfiguration(other.authenticationTokenConfiguration);
+ this.baseURL = other.baseURL;
if (other.cleanSpeakConfiguration != null) {
this.cleanSpeakConfiguration = new CleanSpeakConfiguration(other.cleanSpeakConfiguration);
}
@@ -196,6 +199,7 @@ public boolean equals(Object o) {
return verifyRegistration == that.verifyRegistration &&
Objects.equals(accessControlConfiguration, that.accessControlConfiguration) &&
Objects.equals(authenticationTokenConfiguration, that.authenticationTokenConfiguration) &&
+ Objects.equals(baseURL, that.baseURL) &&
Objects.equals(cleanSpeakConfiguration, that.cleanSpeakConfiguration) &&
Objects.equals(data, that.data) &&
Objects.equals(emailConfiguration, that.emailConfiguration) &&
@@ -264,7 +268,7 @@ public boolean hasDefaultRole() {
@Override
public int hashCode() {
// active is omitted
- return Objects.hash(accessControlConfiguration, authenticationTokenConfiguration, cleanSpeakConfiguration, data, emailConfiguration, externalIdentifierConfiguration, formConfiguration, id, insertInstant, jwtConfiguration, lambdaConfiguration, lastUpdateInstant, loginConfiguration, multiFactorConfiguration, name, oauthConfiguration, passwordlessConfiguration, phoneConfiguration, registrationConfiguration, registrationDeletePolicy, roles, samlv2Configuration, scopes, state, tenantId, themeId, universalConfiguration, unverified, verificationEmailTemplateId, verificationStrategy, verifyRegistration, webAuthnConfiguration);
+ return Objects.hash(accessControlConfiguration, authenticationTokenConfiguration, baseURL, cleanSpeakConfiguration, data, emailConfiguration, externalIdentifierConfiguration, formConfiguration, id, insertInstant, jwtConfiguration, lambdaConfiguration, lastUpdateInstant, loginConfiguration, multiFactorConfiguration, name, oauthConfiguration, passwordlessConfiguration, phoneConfiguration, registrationConfiguration, registrationDeletePolicy, roles, samlv2Configuration, scopes, state, tenantId, themeId, universalConfiguration, unverified, verificationEmailTemplateId, verificationStrategy, verifyRegistration, webAuthnConfiguration);
}
public void normalize() {
diff --git a/src/main/java/io/fusionauth/domain/EmailConfiguration.java b/src/main/java/io/fusionauth/domain/EmailConfiguration.java
index 246f1184..bfd2800e 100644
--- a/src/main/java/io/fusionauth/domain/EmailConfiguration.java
+++ b/src/main/java/io/fusionauth/domain/EmailConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2024, FusionAuth, All Rights Reserved
+ * Copyright (c) 2019-2026, FusionAuth, All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,6 +31,8 @@
public class EmailConfiguration implements Buildable {
public List additionalHeaders = new ArrayList<>();
+ public UUID adminTwoFactorMethodRemoveEmailTemplateId;
+
public boolean debug;
public String defaultFromEmail = "change-me@example.com";
@@ -96,6 +98,7 @@ public EmailConfiguration() {
public EmailConfiguration(EmailConfiguration other) {
this.additionalHeaders.addAll(other.additionalHeaders);
+ this.adminTwoFactorMethodRemoveEmailTemplateId = other.adminTwoFactorMethodRemoveEmailTemplateId;
this.debug = other.debug;
this.defaultFromEmail = other.defaultFromEmail;
this.defaultFromName = other.defaultFromName;
@@ -139,6 +142,7 @@ public boolean equals(Object o) {
verifyEmail == that.verifyEmail &&
verifyEmailWhenChanged == that.verifyEmailWhenChanged &&
Objects.equals(additionalHeaders, that.additionalHeaders) &&
+ Objects.equals(adminTwoFactorMethodRemoveEmailTemplateId, that.adminTwoFactorMethodRemoveEmailTemplateId) &&
Objects.equals(debug, that.debug) &&
Objects.equals(defaultFromEmail, that.defaultFromEmail) &&
Objects.equals(defaultFromName, that.defaultFromName) &&
@@ -168,7 +172,7 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(additionalHeaders, debug, defaultFromEmail, defaultFromName, emailUpdateEmailTemplateId, emailVerifiedEmailTemplateId, forgotPasswordEmailTemplateId, host, implicitEmailVerificationAllowed, loginIdInUseOnCreateEmailTemplateId, loginIdInUseOnUpdateEmailTemplateId, loginNewDeviceEmailTemplateId, loginSuspiciousEmailTemplateId, password, passwordResetSuccessEmailTemplateId, passwordUpdateEmailTemplateId, passwordlessEmailTemplateId, port, properties, security, setPasswordEmailTemplateId, twoFactorMethodAddEmailTemplateId, twoFactorMethodRemoveEmailTemplateId, unverified, username, verificationEmailTemplateId, verificationStrategy, verifyEmail, verifyEmailWhenChanged);
+ return Objects.hash(additionalHeaders, adminTwoFactorMethodRemoveEmailTemplateId, debug, defaultFromEmail, defaultFromName, emailUpdateEmailTemplateId, emailVerifiedEmailTemplateId, forgotPasswordEmailTemplateId, host, implicitEmailVerificationAllowed, loginIdInUseOnCreateEmailTemplateId, loginIdInUseOnUpdateEmailTemplateId, loginNewDeviceEmailTemplateId, loginSuspiciousEmailTemplateId, password, passwordResetSuccessEmailTemplateId, passwordUpdateEmailTemplateId, passwordlessEmailTemplateId, port, properties, security, setPasswordEmailTemplateId, twoFactorMethodAddEmailTemplateId, twoFactorMethodRemoveEmailTemplateId, unverified, username, verificationEmailTemplateId, verificationStrategy, verifyEmail, verifyEmailWhenChanged);
}
public void normalize() {
diff --git a/src/main/java/io/fusionauth/domain/FIPS.java b/src/main/java/io/fusionauth/domain/FIPS.java
index 115d2189..286464a5 100644
--- a/src/main/java/io/fusionauth/domain/FIPS.java
+++ b/src/main/java/io/fusionauth/domain/FIPS.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2025-2025, FusionAuth, All Rights Reserved
+ * Copyright (c) 2025-2026, FusionAuth, All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,8 +28,12 @@
public class FIPS {
public static final int FIPS_MIN_PASSWORD_LENGTH = 14;
+ public static final int FIPS_RECOVERY_CODE_LENGTH = 14;
+
public static final int STANDARD_MIN_PASSWORD_LENGTH = 8;
+ public static final int STANDARD_RECOVERY_CODE_LENGTH = 10;
+
private static volatile Boolean Enabled;
/**
@@ -58,4 +62,8 @@ public static boolean isEnabled() {
public static int minimumPasswordLength() {
return isEnabled() ? FIPS_MIN_PASSWORD_LENGTH : STANDARD_MIN_PASSWORD_LENGTH;
}
+
+ public static int minimumRecoveryCodeLength() {
+ return isEnabled() ? FIPS_RECOVERY_CODE_LENGTH : STANDARD_RECOVERY_CODE_LENGTH;
+ }
}
diff --git a/src/main/java/io/fusionauth/domain/Tenant.java b/src/main/java/io/fusionauth/domain/Tenant.java
index a8123f18..fa77a978 100644
--- a/src/main/java/io/fusionauth/domain/Tenant.java
+++ b/src/main/java/io/fusionauth/domain/Tenant.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2019-2025, FusionAuth, All Rights Reserved
+ * Copyright (c) 2019-2026, FusionAuth, All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -43,6 +43,8 @@ public class Tenant implements Buildable {
public TenantAccessControlConfiguration accessControlConfiguration = new TenantAccessControlConfiguration();
+ public URI baseURL;
+
public TenantCaptchaConfiguration captchaConfiguration = new TenantCaptchaConfiguration();
public boolean configured;
@@ -129,6 +131,7 @@ public Tenant() {
}
public Tenant(Tenant other) {
+ this.baseURL = other.baseURL;
this.captchaConfiguration = new TenantCaptchaConfiguration(other.captchaConfiguration);
this.configured = other.configured;
this.connectorPolicies.addAll(other.connectorPolicies.stream().map(ConnectorPolicy::new).collect(Collectors.toList()));
@@ -179,6 +182,7 @@ public boolean equals(Object o) {
Tenant tenant = (Tenant) o;
return configured == tenant.configured &&
httpSessionMaxInactiveInterval == tenant.httpSessionMaxInactiveInterval &&
+ Objects.equals(baseURL, tenant.baseURL) &&
Objects.equals(captchaConfiguration, tenant.captchaConfiguration) &&
Objects.equals(connectorPolicies, tenant.connectorPolicies) &&
Objects.equals(data, tenant.data) &&
@@ -222,7 +226,8 @@ public ConnectorPolicy getPolicyByConnectorId(UUID connectorId) {
@Override
public int hashCode() {
- return Objects.hash(captchaConfiguration,
+ return Objects.hash(baseURL,
+ captchaConfiguration,
configured,
connectorPolicies,
data,
diff --git a/src/main/java/io/fusionauth/domain/TenantPhoneConfiguration.java b/src/main/java/io/fusionauth/domain/TenantPhoneConfiguration.java
index 64406e55..18866753 100644
--- a/src/main/java/io/fusionauth/domain/TenantPhoneConfiguration.java
+++ b/src/main/java/io/fusionauth/domain/TenantPhoneConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2024-2025, FusionAuth, All Rights Reserved
+ * Copyright (c) 2024-2026, FusionAuth, All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,8 @@
*/
public class TenantPhoneConfiguration implements Buildable {
+ public UUID adminTwoFactorMethodRemoveTemplateId;
+
public UUID forgotPasswordTemplateId;
public UUID identityUpdateTemplateId;
@@ -70,6 +72,7 @@ public TenantPhoneConfiguration() {
}
public TenantPhoneConfiguration(TenantPhoneConfiguration other) {
+ this.adminTwoFactorMethodRemoveTemplateId = other.adminTwoFactorMethodRemoveTemplateId;
this.forgotPasswordTemplateId = other.forgotPasswordTemplateId;
this.identityUpdateTemplateId = other.identityUpdateTemplateId;
this.implicitPhoneVerificationAllowed = other.implicitPhoneVerificationAllowed;
@@ -102,6 +105,7 @@ public boolean equals(Object o) {
TenantPhoneConfiguration that = (TenantPhoneConfiguration) o;
return implicitPhoneVerificationAllowed == that.implicitPhoneVerificationAllowed &&
verifyPhoneNumber == that.verifyPhoneNumber &&
+ Objects.equals(adminTwoFactorMethodRemoveTemplateId, that.adminTwoFactorMethodRemoveTemplateId) &&
Objects.equals(forgotPasswordTemplateId, that.forgotPasswordTemplateId) &&
Objects.equals(identityUpdateTemplateId, that.identityUpdateTemplateId) &&
Objects.equals(loginIdInUseOnCreateTemplateId, that.loginIdInUseOnCreateTemplateId) &&
@@ -124,6 +128,6 @@ public boolean equals(Object o) {
@Override
public int hashCode() {
- return Objects.hash(forgotPasswordTemplateId, identityUpdateTemplateId, implicitPhoneVerificationAllowed, loginIdInUseOnCreateTemplateId, loginIdInUseOnUpdateTemplateId, loginNewDeviceTemplateId, loginSuspiciousTemplateId, messengerId, passwordResetSuccessTemplateId, passwordUpdateTemplateId, passwordlessTemplateId, setPasswordTemplateId, twoFactorMethodAddTemplateId, twoFactorMethodRemoveTemplateId, unverified, verificationCompleteTemplateId, verificationStrategy, verificationTemplateId, verifyPhoneNumber);
+ return Objects.hash(adminTwoFactorMethodRemoveTemplateId, forgotPasswordTemplateId, identityUpdateTemplateId, implicitPhoneVerificationAllowed, loginIdInUseOnCreateTemplateId, loginIdInUseOnUpdateTemplateId, loginNewDeviceTemplateId, loginSuspiciousTemplateId, messengerId, passwordResetSuccessTemplateId, passwordUpdateTemplateId, passwordlessTemplateId, setPasswordTemplateId, twoFactorMethodAddTemplateId, twoFactorMethodRemoveTemplateId, unverified, verificationCompleteTemplateId, verificationStrategy, verificationTemplateId, verifyPhoneNumber);
}
}
diff --git a/src/main/java/io/fusionauth/domain/Theme.java b/src/main/java/io/fusionauth/domain/Theme.java
index 99a80360..70f05414 100644
--- a/src/main/java/io/fusionauth/domain/Theme.java
+++ b/src/main/java/io/fusionauth/domain/Theme.java
@@ -198,6 +198,7 @@ public boolean missingTemplate() {
return Stream.of(templates.accountEdit,
templates.accountIndex,
templates.accountTwoFactorDisable,
+ templates.accountTwoFactorEdit,
templates.accountTwoFactorEnable,
templates.accountTwoFactorIndex,
templates.accountWebAuthnAdd,
@@ -298,6 +299,7 @@ public static class Templates implements Buildable {
"accountEdit",
"accountIndex",
"accountTwoFactorDisable",
+ "accountTwoFactorEdit",
"accountTwoFactorEnable",
"accountTwoFactorIndex",
"accountWebAuthnAdd",
@@ -353,6 +355,8 @@ public static class Templates implements Buildable {
public String accountTwoFactorDisable;
+ public String accountTwoFactorEdit;
+
public String accountTwoFactorEnable;
public String accountTwoFactorIndex;
@@ -454,6 +458,7 @@ public Templates(Templates other) {
this.accountEdit = other.accountEdit;
this.accountIndex = other.accountIndex;
this.accountTwoFactorDisable = other.accountTwoFactorDisable;
+ this.accountTwoFactorEdit = other.accountTwoFactorEdit;
this.accountTwoFactorEnable = other.accountTwoFactorEnable;
this.accountTwoFactorIndex = other.accountTwoFactorIndex;
this.accountWebAuthnAdd = other.accountWebAuthnAdd;
@@ -515,6 +520,7 @@ public boolean equals(Object o) {
return Objects.equals(accountEdit, that.accountEdit) &&
Objects.equals(accountIndex, that.accountIndex) &&
Objects.equals(accountTwoFactorDisable, that.accountTwoFactorDisable) &&
+ Objects.equals(accountTwoFactorEdit, that.accountTwoFactorEdit) &&
Objects.equals(accountTwoFactorEnable, that.accountTwoFactorEnable) &&
Objects.equals(accountTwoFactorIndex, that.accountTwoFactorIndex) &&
Objects.equals(accountWebAuthnAdd, that.accountWebAuthnAdd) &&
@@ -590,6 +596,7 @@ public int hashCode() {
accountEdit,
accountIndex,
accountTwoFactorDisable,
+ accountTwoFactorEdit,
accountTwoFactorEnable,
accountTwoFactorIndex,
accountWebAuthnAdd,
@@ -644,6 +651,7 @@ public void normalize() {
accountEdit = lineReturns(trimToNull(accountEdit));
accountIndex = lineReturns(trimToNull(accountIndex));
accountTwoFactorDisable = lineReturns(trimToNull(accountTwoFactorDisable));
+ accountTwoFactorEdit = lineReturns(trimToNull(accountTwoFactorEdit));
accountTwoFactorEnable = lineReturns(trimToNull(accountTwoFactorEnable));
accountTwoFactorIndex = lineReturns(trimToNull(accountTwoFactorIndex));
accountWebAuthnAdd = lineReturns(trimToNull(accountWebAuthnAdd));
diff --git a/src/main/java/io/fusionauth/domain/TwoFactorMethod.java b/src/main/java/io/fusionauth/domain/TwoFactorMethod.java
index 9e1542ec..b4c9c727 100644
--- a/src/main/java/io/fusionauth/domain/TwoFactorMethod.java
+++ b/src/main/java/io/fusionauth/domain/TwoFactorMethod.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2024, FusionAuth, All Rights Reserved
+ * Copyright (c) 2021-2026, FusionAuth, All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,6 +35,8 @@ public class TwoFactorMethod implements Buildable {
*/
public static final String Email = "email";
+ public static final int MaximumNameLength = 256;
+
/**
* Method which authenticates using a code sent to a phone via SMS or voice.
*/
@@ -54,6 +56,8 @@ public class TwoFactorMethod implements Buildable {
public String mobilePhone;
+ public String name;
+
public String secret;
@JacksonConstructor
@@ -73,6 +77,7 @@ public TwoFactorMethod(TwoFactorMethod other) {
this.lastUsed = other.lastUsed;
this.method = other.method;
this.mobilePhone = other.mobilePhone;
+ this.name = other.name;
this.secret = other.secret;
}
@@ -85,12 +90,12 @@ public boolean equals(Object o) {
return false;
}
TwoFactorMethod that = (TwoFactorMethod) o;
- return Objects.equals(authenticator, that.authenticator) && Objects.equals(email, that.email) && Objects.equals(id, that.id) && Objects.equals(lastUsed, that.lastUsed) && Objects.equals(method, that.method) && Objects.equals(mobilePhone, that.mobilePhone) && Objects.equals(secret, that.secret);
+ return Objects.equals(authenticator, that.authenticator) && Objects.equals(email, that.email) && Objects.equals(id, that.id) && Objects.equals(lastUsed, that.lastUsed) && Objects.equals(method, that.method) && Objects.equals(mobilePhone, that.mobilePhone) && Objects.equals(name, that.name) && Objects.equals(secret, that.secret);
}
@Override
public int hashCode() {
- return Objects.hash(authenticator, email, id, lastUsed, method, mobilePhone, secret);
+ return Objects.hash(authenticator, email, id, lastUsed, method, mobilePhone, name, secret);
}
public void normalize() {
diff --git a/src/main/java/io/fusionauth/domain/UserTwoFactorConfiguration.java b/src/main/java/io/fusionauth/domain/UserTwoFactorConfiguration.java
index 080e0133..e004cbe7 100644
--- a/src/main/java/io/fusionauth/domain/UserTwoFactorConfiguration.java
+++ b/src/main/java/io/fusionauth/domain/UserTwoFactorConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2023, FusionAuth, All Rights Reserved
+ * Copyright (c) 2021-2026, FusionAuth, All Rights Reserved
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,6 +33,10 @@ public class UserTwoFactorConfiguration implements Buildable recoveryCodes = new ArrayList<>();
+ public String recoveryCodeEncryptionScheme;
+
+ public Integer recoveryCodeWorkFactor;
+
@JacksonConstructor
public UserTwoFactorConfiguration() {
}
@@ -40,6 +44,8 @@ public UserTwoFactorConfiguration() {
public UserTwoFactorConfiguration(UserTwoFactorConfiguration other) {
other.methods.forEach(m -> methods.add(new TwoFactorMethod(m)));
this.recoveryCodes.addAll(other.recoveryCodes);
+ this.recoveryCodeEncryptionScheme = other.recoveryCodeEncryptionScheme;
+ this.recoveryCodeWorkFactor = other.recoveryCodeWorkFactor;
}
@Override
@@ -51,7 +57,10 @@ public boolean equals(Object o) {
return false;
}
UserTwoFactorConfiguration that = (UserTwoFactorConfiguration) o;
- return Objects.equals(methods, that.methods) && Objects.equals(recoveryCodes, that.recoveryCodes);
+ return Objects.equals(methods, that.methods) &&
+ Objects.equals(recoveryCodes, that.recoveryCodes) &&
+ Objects.equals(recoveryCodeEncryptionScheme, that.recoveryCodeEncryptionScheme) &&
+ Objects.equals(recoveryCodeWorkFactor, that.recoveryCodeWorkFactor);
}
@JsonIgnore
@@ -74,11 +83,14 @@ public TwoFactorMethod getMethodById(String id) {
@Override
public int hashCode() {
- return Objects.hash(methods, recoveryCodes);
+ return Objects.hash(methods, recoveryCodes, recoveryCodeEncryptionScheme, recoveryCodeWorkFactor);
}
public UserTwoFactorConfiguration secure() {
recoveryCodes.clear();
+ recoveryCodeWorkFactor = null;
+ recoveryCodeEncryptionScheme = null;
+
methods.forEach(TwoFactorMethod::secure);
return this;
}
diff --git a/src/main/java/io/fusionauth/domain/api/TwoFactorRequest.java b/src/main/java/io/fusionauth/domain/api/TwoFactorRequest.java
index 7d267923..38a41eae 100644
--- a/src/main/java/io/fusionauth/domain/api/TwoFactorRequest.java
+++ b/src/main/java/io/fusionauth/domain/api/TwoFactorRequest.java
@@ -37,6 +37,8 @@ public class TwoFactorRequest extends BaseEventRequest implements Buildable {
+ public String methodId;
+
+ public String name;
+
+ @JacksonConstructor
+ public TwoFactorUpdateRequest() {
+ }
+
+ public TwoFactorUpdateRequest(EventInfo eventInfo, String methodId, String name) {
+ super(eventInfo);
+ this.methodId = methodId;
+ this.name = name;
+ }
+}
diff --git a/src/main/java/io/fusionauth/domain/connector/ConnectorPolicy.java b/src/main/java/io/fusionauth/domain/connector/ConnectorPolicy.java
index 74f5ded8..4d5a6936 100644
--- a/src/main/java/io/fusionauth/domain/connector/ConnectorPolicy.java
+++ b/src/main/java/io/fusionauth/domain/connector/ConnectorPolicy.java
@@ -42,7 +42,7 @@ public ConnectorPolicy(ConnectorPolicy other) {
this.migrate = other.migrate;
this.connectorId = other.connectorId;
this.data.putAll(other.data);
- this.domains.addAll(other.domains);
+ this.domains = new HashSet<>(other.domains);
}
@Override