-
Notifications
You must be signed in to change notification settings - Fork 137
Description
Describe the bug?
Calling the UserFactorApi enrollFactor method results into a MismatchedInputException with the following Exception message:
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize value of type
com.okta.sdk.resource.model.HrefObjectfrom Array value (tokenJsonToken.START_ARRAY)\n at [Source: REDACTED (StreamReadFeature.INCLUDE_SOURCE_IN_LOCATIONdisabled); line: 1, column: 255] (through reference chain: com.okta.sdk.resource.model.UserFactorSMS["_links"]->com.okta.sdk.resource.model.UserFactorLinks["resend"]
What is expected to happen?
UserFactorApi enrollFactor response mapped to the UserFactor object without any issue
What is the actual behavior?
MismatchedInputException encountered
Reproduction Steps?
private void enrollUserInFactor() throws ApiException {
UserFactorApi userFactorApi = new UserFactorApi(client);
UserFactorSMSProfile UserFactorSMSProfile = new UserFactorSMSProfile();
UserFactorSMSProfile.setPhoneNumber("555 867 5309");
UserFactorSMS UserFactorSMS = new UserFactorSMS();
UserFactorSMS.setProvider(UserFactorProvider.OKTA.name());
UserFactorSMS.setFactorType(UserFactorType.SMS);
UserFactorSMS.setProfile(UserFactorSMSProfile);
UserFactor userFactor = userFactorApi.enrollFactor("userId", UserFactorSMS, true, "templateId", 30, true, null);
}
Additional Information?
No response
Java Version
openjdk 21.0.7 2025-04-15 LTS
OpenJDK Runtime Environment (build 21.0.7+9-LTS)
OpenJDK 64-Bit Server VM (build 21.0.7+9-LTS, mixed mode, sharing)
SDK Version
v25.0.0
OS version
No response