Skip to content

Commit 539ba21

Browse files
authored
Merge pull request #320 from intuit/hot-fix
Revert OAuth Logging changes.
2 parents 1700b72 + ccea8f5 commit 539ba21

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/Core/OAuth/OAuth2/OAuth2LoginHelper.php

+10-10
Original file line numberDiff line numberDiff line change
@@ -260,9 +260,9 @@ public function exchangeAuthorizationCodeForToken($code, $realmID){
260260
'Authorization' => $authorizationHeaderInfo,
261261
'Content-Type' => 'application/x-www-form-urlencoded'
262262
);
263-
$this->LogAPIRequestToLog(http_build_query($parameters), CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, $http_header);
263+
// $this->LogAPIRequestToLog(http_build_query($parameters), CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, $http_header);
264264
$intuitResponse = $this->curlHttpClient->makeAPICall(CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, CoreConstants::HTTP_POST, $http_header, http_build_query($parameters), null, true);
265-
$this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
265+
// $this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
266266
$this->faultHandler = $intuitResponse->getFaultHandler();
267267
if($this->faultHandler) {
268268
throw new ServiceException("Exchange Authorization Code for Access Token failed. Body: [" . $this->faultHandler->getResponseBody() . "].", $this->faultHandler->getHttpStatusCode());
@@ -281,9 +281,9 @@ public function refreshToken(){
281281
$refreshToken = $this->getAccessToken()->getRefreshToken();
282282
$http_header = $this->constructRefreshTokenHeader();
283283
$requestBody = $this->constructRefreshTokenBody($refreshToken);
284-
$this->LogAPIRequestToLog($requestBody, CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, $http_header);
284+
// $this->LogAPIRequestToLog($requestBody, CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, $http_header);
285285
$intuitResponse = $this->curlHttpClient->makeAPICall(CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, CoreConstants::HTTP_POST, $http_header, $requestBody, null, true);
286-
$this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
286+
// $this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
287287
$this->faultHandler = $intuitResponse->getFaultHandler();
288288
if($this->faultHandler) {
289289
throw new ServiceException("Refresh OAuth 2 Access token with Refresh Token failed. Body: [" . $this->faultHandler->getResponseBody() . "].", $this->faultHandler->getHttpStatusCode());
@@ -301,9 +301,9 @@ public function refreshToken(){
301301
public function refreshAccessTokenWithRefreshToken($refreshToken){
302302
$http_header = $this->constructRefreshTokenHeader();
303303
$requestBody = $this->constructRefreshTokenBody($refreshToken);
304-
$this->LogAPIRequestToLog($requestBody, CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, $http_header);
304+
// $this->LogAPIRequestToLog($requestBody, CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, $http_header);
305305
$intuitResponse = $this->curlHttpClient->makeAPICall(CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, CoreConstants::HTTP_POST, $http_header, $requestBody, null, true);
306-
$this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
306+
// $this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
307307
$this->faultHandler = $intuitResponse->getFaultHandler();
308308
if($this->faultHandler) {
309309
throw new ServiceException("Refresh OAuth 2 Access token with Refresh Token failed. Body: [" . $this->faultHandler->getResponseBody() . "].", $this->faultHandler->getHttpStatusCode());
@@ -333,9 +333,9 @@ public function revokeToken($accessTokenOrRefreshToken){
333333
'Authorization' => $authorizationHeaderInfo,
334334
'Content-Type' => 'application/json'
335335
);
336-
$this->LogAPIRequestToLog($parameters, CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, $http_header);
336+
// $this->LogAPIRequestToLog($parameters, CoreConstants::OAUTH2_TOKEN_ENDPOINT_URL, $http_header);
337337
$intuitResponse = $this->curlHttpClient->makeAPICall(CoreConstants::REVOCATION_ENDPONT, CoreConstants::HTTP_POST, $http_header, json_encode($parameters), null, true);
338-
$this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
338+
// $this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
339339
$this->faultHandler = $intuitResponse->getFaultHandler();
340340
if($this->faultHandler) {
341341
throw new ServiceException("Revoke Token failed. Body: [" . $this->faultHandler->getResponseBody() . "].", $this->faultHandler->getHttpStatusCode());
@@ -366,9 +366,9 @@ public function getUserInfo($accessToken = null, $env = "production"){
366366
'Authorization' => 'Bearer ' . $accessToken
367367
);
368368

369-
$this->LogAPIRequestToLog(null, $url, $http_header);
369+
// $this->LogAPIRequestToLog(null, $url, $http_header);
370370
$intuitResponse = $this->curlHttpClient->makeAPICall($url, CoreConstants::HTTP_GET, $http_header, null, null, true);
371-
$this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
371+
// $this->LogAPIResponseToLog($intuitResponse->getBody(), $requestUri, $intuitResponse->getHeaders());
372372
$this->faultHandler = $intuitResponse->getFaultHandler();
373373
if($this->faultHandler) {
374374
throw new ServiceException("Get UrerInfo failed. Body: [" . $this->faultHandler->getResponseBody() . "].", $this->faultHandler->getHttpStatusCode());

0 commit comments

Comments
 (0)