Skip to content

Commit

Permalink
ENGCOM-2066: [Forwardport] [BUGFIX] #15564 Generated admin API token …
Browse files Browse the repository at this point in the history
…expires immediately #15744

 - Merge Pull Request #15744 from vijay-wagento/magento2:2.3-develop-PR-port-15598
 - Merged commits:
   1. 7f34b22
   2. 349d178
  • Loading branch information
magento-engcom-team committed Jun 20, 2018
2 parents e47b0d7 + 349d178 commit 9669bd6
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 9669bd6

Please sign in to comment.