-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Closed
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed
Description
When you create a token for an admin user and have set the options (Admin Token Lifetime (hours)) to empty, you will get an access denied because the token immediately expires.
Preconditions
- Set the option Admin Token Lifetime (hours)) to empty.
Steps to reproduce
- Create admin token with /V1/integration/admin/token
- Do any other call with this token
Expected result
- get result back for given API call
Actual result
- Consumer is not authorized to access %resources
For keeping the empty feature that is wont expire, we need to add a check for the token TTL: https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Webapi/Model/Authorization/TokenUserContext.php#L135
If I have some time I will create a pull request for this.
Metadata
Metadata
Assignees
Labels
Fixed in 2.2.xThe issue has been fixed in 2.2 release lineThe issue has been fixed in 2.2 release lineFixed in 2.3.xThe issue has been fixed in 2.3 release lineThe issue has been fixed in 2.3 release lineIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passed