Skip to content

Commit 2a720c3

Browse files
committed
CABPI-324: Change Org check to use new endpoint
1 parent 1bf4b00 commit 2a720c3

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

app/code/Magento/AdminAdobeIms/Service/ImsOrganizationService.php

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,9 @@
99
namespace Magento\AdminAdobeIms\Service;
1010

1111
use Magento\AdminAdobeIms\Exception\AdobeImsOrganizationAuthorizationException;
12-
use Magento\Framework\Exception\InvalidArgumentException;
1312

1413
class ImsOrganizationService
1514
{
16-
/**
17-
* Regex to verify a valid AdobeOrg Organization ID string.
18-
*/
19-
private const ORGANIZATION_REGEX = '/([A-Z0-9]{24})(@AdobeOrg)?/i';
20-
2115
/**
2216
* @var ImsConfig
2317
*/
@@ -52,24 +46,4 @@ public function checkOrganizationAllocation(string $token): bool
5246

5347
return true;
5448
}
55-
56-
/**
57-
* Check if OrganizationID matches pattern
58-
*
59-
* @param string $organizationId
60-
* @return string
61-
* @throws AdobeImsOrganizationAuthorizationException
62-
*/
63-
private function validateAndExtractOrganizationId(string $organizationId): string
64-
{
65-
if (preg_match(self::ORGANIZATION_REGEX, $organizationId, $matches)) {
66-
if (!empty($matches) && isset($matches[1])) {
67-
return $matches[1];
68-
}
69-
}
70-
71-
throw new AdobeImsOrganizationAuthorizationException(
72-
__('No valid organization ID provided')
73-
);
74-
}
7549
}

0 commit comments

Comments
 (0)