Skip to content
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

Added token revocation for REST API #32481

Merged

Conversation

ProkopovVitaliy
Copy link
Contributor

Description (*)

Created new token revocation endpoint for REST API: /V1/integration/customer/revoke-customer-token.
Feature have similar functionality like here https://devdocs.magento.com/guides/v2.3/graphql/mutations/revoke-customer-token.html.

Related Pull Requests

Fixed Issues (if relevant)

  1. Fixes Token Revocation REST API #30820

Manual testing scenarios (*)

  1. Generate customer authorization token.
  2. Send request to new created /V1/integration/customer/revoke-customer-token endpoint
  3. Check if token was removed

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@magento-engcom-team magento-engcom-team added Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Mar 15, 2021
@m2-assistant
Copy link

m2-assistant bot commented Mar 15, 2021

Hi @ProkopovVitaliy. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.5-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review.

For more details, please, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket.

🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@m2-community-project m2-community-project bot added Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Severity: S1 Affects critical data or functionality and forces users to employ a workaround. labels Mar 15, 2021
@m2-community-project m2-community-project bot added this to Pending Review in 2.5 Milestone PRs Dashboard Mar 15, 2021
@ProkopovVitaliy
Copy link
Contributor Author

@magento run all tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Functional Tests B2B

1 similar comment
@ProkopovVitaliy
Copy link
Contributor Author

@magento run Functional Tests B2B

@ProkopovVitaliy
Copy link
Contributor Author

@magento run all tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Integration Tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Functional Tests B2B

Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ProkopovVitaliy please find below couple minor suggestions.

Thank you.

@ProkopovVitaliy
Copy link
Contributor Author

@magento run all tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Functional Tests CE

@ProkopovVitaliy
Copy link
Contributor Author

@magento run WebAPI Tests

@ProkopovVitaliy
Copy link
Contributor Author

@magento run Functional Tests B2B

@ProkopovVitaliy
Copy link
Contributor Author

@magento run WebAPI Tests, Functional Tests B2B

1 similar comment
@eduard13
Copy link
Contributor

@magento run WebAPI Tests, Functional Tests B2B

@eduard13 eduard13 added Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: test coverage labels Mar 17, 2021
@ProkopovVitaliy
Copy link
Contributor Author

@magento run WebAPI Tests, Functional Tests B2B

@ProkopovVitaliy
Copy link
Contributor Author

@eduard13 Code review recommendations implemented, tests passed.

Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this cool feature 👍.

@magento-engcom-team
Copy link
Contributor

Hi @eduard13, thank you for the review.
ENGCOM-8937 has been created to process this Pull Request

@eduard13
Copy link
Contributor

Hi @sidolov, it seems that we are fine here, all the builds are green as well for 2.4-develop.

Copy link
Contributor

@ihor-sviziev ihor-sviziev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved ✔

Note: this PR was already tested in #32481 (comment), but should be re-tested again

@magento-engcom-team
Copy link
Contributor

Hi @ihor-sviziev, thank you for the review.
ENGCOM-8937 has been created to process this Pull Request

@engcom-Alfa engcom-Alfa moved this from Ready for Testing to Testing in Progress in High Priority Pull Requests Dashboard Nov 11, 2021
@engcom-Alfa engcom-Alfa self-assigned this Nov 11, 2021
@m2-community-project m2-community-project bot moved this from Testing in Progress to Ready for Testing in High Priority Pull Requests Dashboard Nov 11, 2021
@engcom-Alfa engcom-Alfa moved this from Ready for Testing to Testing in Progress in High Priority Pull Requests Dashboard Nov 11, 2021
@engcom-Alfa
Copy link
Contributor

✔️ QA Passed

Preconditions:

  1. Have Magento latest installed

Manual testing scenario:

  1. Got the customer token using request /V1/integration/customer/token

  2. Cross checked using received token with another request /V1/carts/mine; Just to make sure the token is working!

  3. post requested - V1/integration/customer/revoke-customer-token; Validated the response

Before: ✖️ There was no revoke-customer-token API request at all

before

After: ✔️ revoke-customer-token introduced working absolutely fine

after

After the revoke-customer-token re-tried to access the /V1/carts/mine request and identified that the revoked token is no more valid!

This PR is relevant to API request and has no impact functionally. There is an auto-test covered in the PR and no hence additional regression is required

@ishakhsuvarov
Copy link
Contributor

@magento run all tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@ishakhsuvarov
Copy link
Contributor

@magento run Integration Tests

@magento-automated-testing
Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time.

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit 27b6e58 into magento:2.4-develop Nov 24, 2022
@ishakhsuvarov ishakhsuvarov moved this from Merge in Progress to Recently Merged in High Priority Pull Requests Dashboard Nov 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: test coverage Component: Integration Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Priority: P1 Once P0 defects have been fixed, a defect having this priority is the next candidate for fixing. Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S1 Affects critical data or functionality and forces users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Token Revocation REST API