-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Introduce Login As Customer token generation REST API with full test coverage #40310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.4-develop
Are you sure you want to change the base?
Introduce Login As Customer token generation REST API with full test coverage #40310
Conversation
|
Hi @mimou78. Thank you for your contribution!
Allowed build names are:
You can find more information about the builds here For more details, review the Code Contributions documentation. |
|
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
1 similar comment
|
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
|
@magento run all tests |
|
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
1 similar comment
|
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
|
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
2 similar comments
|
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
|
The security team has been informed about this pull request due to the presence of risky security keywords. For security vulnerability reports, please visit Adobe's vulnerability disclosure program on HackerOne or email [email protected]. |
|
@magento run all tests |
Description (*)
This Pull Request introduces a new Login As Customer Token Generation API, providing a secure and extensible WebAPI endpoint used to initiate customer login sessions from the Admin panel.
This enhancement modernizes the Login As Customer workflow by adding a dedicated token-generation mechanism with proper ACL control, REST exposure, fixtures, unit tests and API-functional tests.
What’s included
LoginAsCustomerTokenServiceInterface+ implementationPOST /V1/integration/customer/login-as-customerMagento_LoginAsCustomerApi::tokenBackward Compatibility
Security Considerations
GenerateAuthenticationSecretserviceManual testing scenarios (*)
Stores → Configuration → Customers → Login as Customer → Enable = YesPOST /V1/integration/admin/token`POST /V1/integration/customer/login-as-customer
Authorization: Bearer <admin_token>
{
"secret": "<valid_secret>"
}`
Questions or comments
If any additional scenarios or test coverage are required, I’m happy to expand this PR.
Contribution checklist (*)