diff --git a/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/AfsRequest.java b/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/AfsRequest.java index 79ccc37e6..d41765720 100644 --- a/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/AfsRequest.java +++ b/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/AfsRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.dataadapter.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.dataadapter.model.entity.OperationContext; import java.util.LinkedHashMap; @@ -52,6 +54,7 @@ public class AfsRequest { /** * Extra parameters sent with the request depending on AFS type, e.g. cookies for Threat Mark. */ + @JsonSetter(nulls = Nulls.SKIP) private final Map extras = new LinkedHashMap<>(); /** diff --git a/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/SaveConsentFormRequest.java b/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/SaveConsentFormRequest.java index 44bcc7a68..5b9f496e1 100644 --- a/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/SaveConsentFormRequest.java +++ b/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/SaveConsentFormRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.dataadapter.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.dataadapter.model.entity.ConsentOption; import io.getlime.security.powerauth.lib.dataadapter.model.entity.OperationContext; @@ -48,6 +50,7 @@ public class SaveConsentFormRequest { /** * Consent options with values set by the user. */ + @JsonSetter(nulls = Nulls.SKIP) private final List options; /** diff --git a/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/ValidateConsentFormRequest.java b/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/ValidateConsentFormRequest.java index 361b9fac9..c4460614a 100644 --- a/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/ValidateConsentFormRequest.java +++ b/powerauth-data-adapter-model/src/main/java/io/getlime/security/powerauth/lib/dataadapter/model/request/ValidateConsentFormRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.dataadapter.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.dataadapter.model.entity.ConsentOption; import io.getlime.security.powerauth.lib.dataadapter.model.entity.OperationContext; @@ -53,6 +55,7 @@ public class ValidateConsentFormRequest { /** * Consent options with values set by the user. */ + @JsonSetter(nulls = Nulls.SKIP) private final List options; /** diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateHashConfigRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateHashConfigRequest.java index bda1645b5..73a19986c 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateHashConfigRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateHashConfigRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.nextstep.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.HashAlgorithm; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; @@ -39,6 +41,8 @@ public class CreateHashConfigRequest { private String hashConfigName; @NotNull private HashAlgorithm algorithm; + + @JsonSetter(nulls = Nulls.SKIP) private final Map parameters = new LinkedHashMap<>(); } diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateOperationRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateOperationRequest.java index 6ee015dac..a25896699 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateOperationRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateOperationRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.nextstep.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.nextstep.model.entity.ApplicationContext; import io.getlime.security.powerauth.lib.nextstep.model.entity.KeyValueParameter; import io.getlime.security.powerauth.lib.nextstep.model.entity.OperationFormData; @@ -52,6 +54,8 @@ public class CreateOperationRequest { private String organizationId; @Size(min = 1, max = 256) private String externalTransactionId; + + @JsonSetter(nulls = Nulls.SKIP) private final List params = new ArrayList<>(); private OperationFormData formData; private ApplicationContext applicationContext; diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateUserAliasRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateUserAliasRequest.java index 771112c88..2cfff56af 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateUserAliasRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateUserAliasRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.nextstep.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.Size; import lombok.Data; @@ -41,6 +43,8 @@ public class CreateUserAliasRequest { @NotBlank @Size(min = 2, max = 256) private String aliasValue; + + @JsonSetter(nulls = Nulls.SKIP) private final Map extras = new LinkedHashMap<>(); } diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateUserRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateUserRequest.java index 4540bdd1d..09e151d7e 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateUserRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/CreateUserRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.nextstep.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.ContactType; import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.CredentialType; import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.CredentialValidationMode; @@ -40,14 +42,18 @@ public class CreateUserRequest { @Size(min = 1, max = 256) private String userId; + @JsonSetter(nulls = Nulls.SKIP) private final Map extras = new LinkedHashMap<>(); + @JsonSetter(nulls = Nulls.SKIP) private final List roles = new ArrayList<>(); @Valid + @JsonSetter(nulls = Nulls.SKIP) private final List contacts = new ArrayList<>(); @Valid + @JsonSetter(nulls = Nulls.SKIP) private final List credentials = new ArrayList<>(); /** @@ -87,6 +93,7 @@ public static class NewCredential { // Null value allowed, defaults to CredentialValidationMode.VALIDATE_USERNAME_AND_CREDENTIAL private CredentialValidationMode validationMode; @Valid + @JsonSetter(nulls = Nulls.SKIP) private final List credentialHistory = new ArrayList<>(); } diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/LookupUsersRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/LookupUsersRequest.java index e3f2e7879..607b7ad60 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/LookupUsersRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/LookupUsersRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.nextstep.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.CredentialStatus; import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.UserIdentityStatus; import jakarta.validation.constraints.Size; @@ -42,6 +44,7 @@ public class LookupUsersRequest { private UserIdentityStatus userIdentityStatus; // Filter by roles + @JsonSetter(nulls = Nulls.SKIP) private final List roles = new ArrayList<>(); // Filter by username and credentialName to allow username -> user ID mapping diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateAuthMethodRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateAuthMethodRequest.java index 1239b5956..a0ac6e3b3 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateAuthMethodRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateAuthMethodRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.nextstep.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.nextstep.model.enumeration.AuthMethod; import jakarta.validation.constraints.NotBlank; import jakarta.validation.constraints.NotNull; @@ -40,6 +42,7 @@ public class UpdateAuthMethodRequest { @NotNull private AuthMethod authMethod; @NotNull + @JsonSetter(nulls = Nulls.SKIP) private final Map config = new LinkedHashMap<>(); } diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateOperationRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateOperationRequest.java index be3b4353e..88313bc4e 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateOperationRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateOperationRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.nextstep.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.nextstep.model.entity.ApplicationContext; import io.getlime.security.powerauth.lib.nextstep.model.entity.KeyValueParameter; import io.getlime.security.powerauth.lib.nextstep.model.entity.PAAuthenticationContext; @@ -46,11 +48,15 @@ public class UpdateOperationRequest { @Size(min = 2, max = 256) private String organizationId; private AuthMethod authMethod; + + @JsonSetter(nulls = Nulls.SKIP) private final List authInstruments = new ArrayList<>(); private AuthStepResult authStepResult; private AuthMethod targetAuthMethod; @Size(min = 2, max = 256) private String authStepResultDescription; + + @JsonSetter(nulls = Nulls.SKIP) private final List params = new ArrayList<>(); private ApplicationContext applicationContext; @Size(min = 36, max = 36) diff --git a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateUsersRequest.java b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateUsersRequest.java index 19bb6aac8..1f2843900 100644 --- a/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateUsersRequest.java +++ b/powerauth-nextstep-model/src/main/java/io/getlime/security/powerauth/lib/nextstep/model/request/UpdateUsersRequest.java @@ -17,6 +17,8 @@ */ package io.getlime.security.powerauth.lib.nextstep.model.request; +import com.fasterxml.jackson.annotation.JsonSetter; +import com.fasterxml.jackson.annotation.Nulls; import io.getlime.security.powerauth.lib.nextstep.model.entity.enumeration.UserIdentityStatus; import jakarta.validation.constraints.NotNull; import lombok.Data; @@ -33,6 +35,7 @@ public class UpdateUsersRequest { @NotNull + @JsonSetter(nulls = Nulls.SKIP) private final List userIds = new ArrayList<>(); @NotNull private UserIdentityStatus userIdentityStatus;