Skip to content

Commit

Permalink
Merge pull request #10 from vijay-wagento/2.3-develop-PR-port-15598
Browse files Browse the repository at this point in the history
[Forwardport] [BUGFIX] magento#15564 Generated admin API token expires immediately
  • Loading branch information
vijay-wagento authored Jun 4, 2018
2 parents 19af728 + 349d178 commit c18db91
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ private function isTokenExpired(Token $token): bool
// other user-type tokens are considered always valid
return false;
}

if (empty($tokenTtl)) {
return false;
}

if ($this->dateTime->strToTime($token->getCreatedAt()) < ($this->date->gmtTimestamp() - $tokenTtl * 3600)) {
return true;
}
Expand Down

0 comments on commit c18db91

Please # to comment.