Skip to content

Commit

Permalink
fix: fix object name
Browse files Browse the repository at this point in the history
  • Loading branch information
andreibogus committed Apr 18, 2024
1 parent 6a67c92 commit 59ccdb2
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
public class SecureTokenRequestValidator implements Validator {

public static final String LINKED_MULTI_VALUE_MAP_CLASS_NAME = "org.springframework.util.LinkedMultiValueMap";
public static final String OBJECT_NAME = "multiValueMap";

@Override
public boolean supports(Class<?> clazz) {
Expand All @@ -47,7 +46,7 @@ public void validate(Object target, Errors errors) {
requestParams = (LinkedMultiValueMap) target;
}
SecureTokenRequest secureTokenRequest = requestParams != null ? getSecureTokenRequest(requestParams) : (SecureTokenRequest) target;
Errors errorsHandled = new BeanPropertyBindingResult(secureTokenRequest, OBJECT_NAME);
Errors errorsHandled = new BeanPropertyBindingResult(secureTokenRequest, errors.getObjectName());
ValidationUtils.rejectIfEmptyOrWhitespace(errorsHandled, "audience", "audience.empty", "The 'audience' cannot be empty or missing.");
ValidationUtils.rejectIfEmptyOrWhitespace(errorsHandled, "clientId", "client_id.empty", "The 'client_id' cannot be empty or missing.");
ValidationUtils.rejectIfEmptyOrWhitespace(errorsHandled, "clientSecret", "client_secret.empty", "The 'client_secret' cannot be empty or missing.");
Expand Down

0 comments on commit 59ccdb2

Please sign in to comment.