Skip to content

Commit c45c865

Browse files
committed
CABPI-324: Change Org check to use new endpoint
1 parent 24b0ab8 commit c45c865

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/AdminAdobeIms/Controller/Adminhtml/OAuth/ImsReauthCallback.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,16 @@ public function execute(): ResultInterface
118118
}
119119

120120
$tokenResponse = $this->adminImsConnection->getTokenResponse($code);
121+
$accessToken = $tokenResponse->getAccessToken();
121122

122-
$profile = $this->adminImsConnection->getProfile($tokenResponse->getAccessToken());
123+
$profile = $this->adminImsConnection->getProfile($accessToken);
123124
if (empty($profile['email'])) {
124125
throw new AuthenticationException(__('An authentication error occurred. Verify and try again.'));
125126
}
126127

127-
$accessToken = $tokenResponse->getAccessToken();
128-
$this->adminOrganizationService->checkOrganizationAllocation($accessToken);
128+
//check membership in organization
129+
$this->adminOrganizationService->checkOrganizationMembership($accessToken);
130+
129131
$this->adminReauthProcessService->execute($tokenResponse);
130132

131133
$response = sprintf(

0 commit comments

Comments
 (0)