-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
https://github.com/magento/magento2/issues/24716 #24769
https://github.com/magento/magento2/issues/24716 #24769
Conversation
Hi @ivan-koliadynskyy. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
Hi @ivan-koliadynskyy , please, sign CLA, otherwise, we can't process your pull request |
a82ebd9
to
e314f3c
Compare
Hello @sidolov , thank you for pointing to required changes. Author of commit updated and CLA was signed. Please let me know if more changes required. |
@ivan-koliadynskyy looks like you cherry-picked the first commit and it has two authors right now (ivan_ko and ivan-koliadynskyy). I propose you to make one commit with the correct account and force push the branch. |
72f31f4
to
5cda6c4
Compare
Not Able to set Rest API oAuth admin token expire in minutes or seconds. magento#24716
5cda6c4
to
c283bba
Compare
@sidolov , sorry for delay with these changes. Commit updated again and looks like CLA test passed well. Please let me know if more changes required. Thanks. |
@ivan-koliadynskyy , please, take a look at failed tests. |
@sidolov , thanks for hints. Code updated to pass failed tests but I have doubt about unit test for update. Initially I have updated app/code/Magento/Webapi/Model/Authorization/TokenUserContext.php: 140 to use \Magento\Framework\Stdlib\DateTime\DateTime::timestamp() instead of \Magento\Framework\Stdlib\DateTime::strToTime() which is simple wrapper for php strtotime(), because strToTime() noted like deprecated method. Everything looks good in this case but unit test not pass because of lib/internal/Magento/Framework/Stdlib/DateTime/DateTime.php:147. On unit test I have received $this->_localeDate equal null and error that can not call date() on null. |
@ivan-koliadynskyy you are right, you should return back usage of Regarding the failed test: please, make sure that |
…\DateTime::strToTime instead of php strtotime. Updated helpers to get token expire time to check if value is positive before response.
@sidolov, thank you for hints. Code for time comparison reverted to use |
Hi @ivan-koliadynskyy, thank you for your contribution! |
Hi @sidolov, thank you for the review.
|
✔️ QA Passed |
Hi @ivan-koliadynskyy, thank you for your contribution! |
Not Able to set Rest API oAuth admin token expire in minutes or seconds. #24716
Description (*)
Checking of expiration time for oAuth tokens worked only with integers. After update it is able to use float values without rounding.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Questions or comments
app/code/Magento/Webapi/Model/Authorization/TokenUserContext.php: Line 140 - deprecated \Magento\Framework\Stdlib\DateTime:strToTime replaced to \Magento\Framework\Stdlib\DateTime\DateTime:timestamp method
Contribution checklist (*)