Skip to content

Commit 4c13d93

Browse files
committed
CABPI-429: Review and Update Project Documentation
1 parent 82e471d commit 4c13d93

File tree

5 files changed

+13
-12
lines changed

5 files changed

+13
-12
lines changed

app/code/Magento/AdminAdobeIms/Console/Command/AdminAdobeImsEnableCommand.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class AdminAdobeImsEnableCommand extends Command
4646
/**
4747
* Name of "two-factor-auth" input option
4848
*/
49-
private const TWO_FACTOR_AUTH_ARGUMENT = '2fa-auth';
49+
private const TWO_FACTOR_AUTH_ARGUMENT = '2fa';
5050

5151
/**
5252
* @var ImsConfig
@@ -119,7 +119,8 @@ public function __construct(
119119
self::TWO_FACTOR_AUTH_ARGUMENT,
120120
't',
121121
InputOption::VALUE_OPTIONAL,
122-
'Check if 2FA Auth is enabled on Adobe IMS Side. Enables or disables the Magento 2FA'
122+
'Check if 2FA is enabled for Organization in Adobe Admin Console. ' .
123+
'Required when enabling the module'
123124
)
124125
]);
125126
}
@@ -169,7 +170,7 @@ protected function execute(InputInterface $input, OutputInterface $output): ?int
169170
}
170171

171172
throw new LocalizedException(
172-
__('The Client ID, Client Secret, Organization ID and 2FA Auth are required ' .
173+
__('The Client ID, Client Secret, Organization ID and 2FA are required ' .
173174
'when enabling the Admin Adobe IMS Module')
174175
);
175176
} catch (\Exception $e) {

app/code/Magento/AdminAdobeIms/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ For information about module installation in Magento 2, see [Enable or disable m
66
# CLI command usage:
77
## bin/magento admin:adobe-ims:enable
88
Enables the AdminAdobeIMS Module. \
9-
Required values are `Organization ID`, `Client ID`, `Client Secret` and `2FA enabled on AdobeIMS`
9+
Required values are `Organization ID`, `Client ID`, `Client Secret` and `2FA enabled`
1010

1111
### Argument Validation
1212
On enabling the AdminAdobeIMS Module, the input arguments will be validated. \
@@ -27,7 +27,7 @@ We check if the arguments are not empty, as they are all required.
2727

2828
For the Organization ID, Client ID and Client Secret, we check if they contain only alphanumeric characters. \
2929
Additionally for the Organization ID, we check if it matches 24 characters and optional has the suffix `@AdobeOrg`. But we only store the ID and ignore the suffix.
30-
Also make sure 2FA is enabled on AdobeIMS.
30+
Also make sure 2FA is enabled for the Organization in Adobe Admin Console.
3131

3232
## bin/magento admin:adobe-ims:disable
3333
Disables the AdminAdobeIMS Module.
@@ -197,7 +197,7 @@ curl -X GET "{domain}/rest/V1/customers/2" -H "Authorization: Bearer AddAdobeIms
197197
curl -X GET "{domain}/rest/V1/products/24-MB01" -H "Authorization: Bearer AddAdobeImsAccessToken"
198198

199199
### Two-factor authentication.
200-
During CLI enablement of the module, the admin user is asked, whether 2FA is enabled for him on Adobe side.
200+
During CLI enablement of the module, the admin user is asked, whether 2FA is enabled for Organization in Adobe Admin Console.
201201
If the answer is yes, Magento TFA module (if it's present in the code base), should be disable.
202202

203203
For this purpose the additional config value was added, this config value is read by Magento_TwoFactorAuth module.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class ImsCommandOptionService
2222
private const OPTION_QUESTION = 'Please enter your %s:';
2323

2424
/**
25-
* Prompt for 2FA Auth CLI Command option
25+
* Prompt for 2FA CLI Command option
2626
*/
27-
private const TWO_FACTOR_OPTION_QUESTION = 'Is 2FA enabled on AdobeIMS? (yes/no):';
27+
private const TWO_FACTOR_OPTION_QUESTION = 'Is 2FA enabled for Organization in Adobe Admin Console? (yes/no):';
2828

2929
/**
3030
* Human-readable name for Organization ID input option

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public function enableModule(
121121
): void {
122122
if (!$isAdobeIms2FAEnabled) {
123123
throw new LocalizedException(
124-
__('2FA Auth is required when enabling the Admin Adobe IMS Module')
124+
__('2FA is required when enabling the Admin Adobe IMS Module')
125125
);
126126
}
127127

app/code/Magento/AdminAdobeIms/Test/Unit/Command/AdminAdobeImsEnableCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,23 +171,23 @@ public function cliCommandProvider(): array
171171
false,
172172
$this->never(),
173173
$this->never(),
174-
'<error>The Client ID, Client Secret, Organization ID and 2FA Auth are required ' .
174+
'<error>The Client ID, Client Secret, Organization ID and 2FA are required ' .
175175
'when enabling the Admin Adobe IMS Module</error>',
176176
true
177177
],
178178
[
179179
true,
180180
$this->never(),
181181
$this->never(),
182-
'<error>The Client ID, Client Secret, Organization ID and 2FA Auth are required ' .
182+
'<error>The Client ID, Client Secret, Organization ID and 2FA are required ' .
183183
'when enabling the Admin Adobe IMS Module</error>',
184184
false
185185
],
186186
[
187187
false,
188188
$this->never(),
189189
$this->never(),
190-
'<error>The Client ID, Client Secret, Organization ID and 2FA Auth are required ' .
190+
'<error>The Client ID, Client Secret, Organization ID and 2FA are required ' .
191191
'when enabling the Admin Adobe IMS Module</error>',
192192
false
193193
]

0 commit comments

Comments
 (0)