added PATCH and PUT methods to get FormBodyHandler (#25093)
Signed-off-by: Garth <244253+xgp@users.noreply.github.com>
This commit is contained in:
parent
b8467d80f1
commit
ba790f1bca
1 changed files with 6 additions and 1 deletions
|
@ -17,7 +17,9 @@
|
|||
|
||||
package org.keycloak.quarkus.runtime.integration.resteasy;
|
||||
|
||||
import static jakarta.ws.rs.HttpMethod.PATCH;
|
||||
import static jakarta.ws.rs.HttpMethod.POST;
|
||||
import static jakarta.ws.rs.HttpMethod.PUT;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -51,7 +53,10 @@ public final class KeycloakHandlerChainCustomizer implements HandlerChainCustomi
|
|||
|
||||
switch (phase) {
|
||||
case BEFORE_METHOD_INVOKE:
|
||||
if (POST.equalsIgnoreCase(resourceMethod.getHttpMethod())) {
|
||||
if (!resourceMethod.isFormParamRequired() &&
|
||||
(PATCH.equalsIgnoreCase(resourceMethod.getHttpMethod()) ||
|
||||
POST.equalsIgnoreCase(resourceMethod.getHttpMethod()) ||
|
||||
PUT.equalsIgnoreCase(resourceMethod.getHttpMethod()))) {
|
||||
handlers.add(formBodyHandler);
|
||||
}
|
||||
handlers.add(TRANSACTIONAL_SESSION_HANDLER);
|
||||
|
|
Loading…
Reference in a new issue