Skip to content

Commit

Permalink
Use GET request method for calling OAuth2 userInfoUri
Browse files Browse the repository at this point in the history
  • Loading branch information
mdesmet committed Mar 10, 2022
1 parent f551dd2 commit 49972fb
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -316,7 +316,7 @@ private Optional<Claims> 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();
Expand Down

0 comments on commit 49972fb

Please sign in to comment.