From 49972fbea16de087959241e5c365e041eed2aadc Mon Sep 17 00:00:00 2001 From: Michiel De Smet Date: Thu, 10 Mar 2022 22:48:38 +0100 Subject: [PATCH] Use GET request method for calling OAuth2 userInfoUri --- .../java/io/trino/server/security/oauth2/OAuth2Service.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Service.java b/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Service.java index a4498060338b..ede863a9cddb 100644 --- a/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Service.java +++ b/core/trino-main/src/main/java/io/trino/server/security/oauth2/OAuth2Service.java @@ -63,7 +63,7 @@ import static java.nio.charset.StandardCharsets.UTF_8; import static java.time.Instant.now; import static java.util.Objects.requireNonNull; -import static javax.ws.rs.HttpMethod.POST; +import static javax.ws.rs.HttpMethod.GET; import static javax.ws.rs.core.Response.Status.BAD_REQUEST; public class OAuth2Service @@ -316,7 +316,7 @@ private Optional internalConvertTokenToClaims(String accessToken) if (userinfoUri.isPresent()) { // validate access token is trusted by remote userinfo endpoint Request request = Request.builder() - .setMethod(POST) + .setMethod(GET) .addHeader(AUTHORIZATION, "Bearer " + accessToken) .setUri(userinfoUri.get()) .build();