Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-dheyman committed Dec 4, 2024
1 parent 857d8a2 commit 4662dfc
Showing 1 changed file with 10 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,14 @@ private AuthorizationCode requestAuthorizationCode(
SFLoginInput loginInput, CodeVerifier pkceVerifier) throws SFException, IOException {
AuthorizationRequest request = buildAuthorizationRequest(loginInput, pkceVerifier);
URI authorizeRequestURI = request.toURI();
logger.debug("Executing authorization code request to: " + authorizeRequestURI.getAuthority() + authorizeRequestURI.getPath());
logger.debug(
"Executing authorization code request to: "
+ authorizeRequestURI.getAuthority()
+ authorizeRequestURI.getPath());
HttpServer httpServer = createHttpServer(loginInput);
CompletableFuture<String> codeFuture = setupRedirectURIServerForAuthorizationCode(httpServer);
logger.debug("Waiting for authorization code redirection to " + buildRedirectUri(loginInput) + "...");
logger.debug(
"Waiting for authorization code redirection to " + buildRedirectUri(loginInput) + "...");
return letUserAuthorize(authorizeRequestURI, codeFuture, httpServer);
}

Expand All @@ -93,7 +97,8 @@ private String exchangeAuthorizationCodeForAccessToken(
try {
TokenRequest request = buildTokenRequest(loginInput, authorizationCode, pkceVerifier);
URI requestUri = request.getEndpointURI();
logger.debug("Requesting access token from: " + requestUri.getAuthority() + requestUri.getPath());
logger.debug(
"Requesting access token from: " + requestUri.getAuthority() + requestUri.getPath());
String tokenResponse =
HttpUtil.executeGeneralRequest(
convertToBaseRequest(request.toHTTPRequest()),
Expand All @@ -104,7 +109,8 @@ private String exchangeAuthorizationCodeForAccessToken(
loginInput.getHttpClientSettingsKey());
TokenResponseDTO tokenResponseDTO =
objectMapper.readValue(tokenResponse, TokenResponseDTO.class);
logger.debug("Received OAuth access token from: " + requestUri.getAuthority() + requestUri.getPath());
logger.debug(
"Received OAuth access token from: " + requestUri.getAuthority() + requestUri.getPath());
return tokenResponseDTO.getAccessToken();
} catch (Exception e) {
throw new RuntimeException(e);
Expand Down

0 comments on commit 4662dfc

Please sign in to comment.