File tree Expand file tree Collapse file tree 1 file changed +0
-26
lines changed
app/code/Magento/AdminAdobeIms/Service Expand file tree Collapse file tree 1 file changed +0
-26
lines changed Original file line number Diff line number Diff line change 99namespace Magento \AdminAdobeIms \Service ;
1010
1111use Magento \AdminAdobeIms \Exception \AdobeImsOrganizationAuthorizationException ;
12- use Magento \Framework \Exception \InvalidArgumentException ;
1312
1413class 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}
You can’t perform that action at this time.
0 commit comments