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 authored and kokosing committed Mar 11, 2022
1 parent e5732f8 commit 74661d6
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 74661d6

Please sign in to comment.