Skip to content

Commit 0bda8d0

Browse files
committed
Minor updates for resolving errors on tests run
1 parent c283bba commit 0bda8d0

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/Webapi/Model/Authorization/TokenUserContext.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function __construct(
9999
}
100100

101101
/**
102-
* {@inheritdoc}
102+
* @inheritdoc
103103
*/
104104
public function getUserId()
105105
{
@@ -108,7 +108,7 @@ public function getUserId()
108108
}
109109

110110
/**
111-
* {@inheritdoc}
111+
* @inheritdoc
112112
*/
113113
public function getUserType()
114114
{
@@ -137,7 +137,7 @@ private function isTokenExpired(Token $token): bool
137137
return false;
138138
}
139139

140-
if ($this->date->timestamp($token->getCreatedAt()) < ($this->date->gmtTimestamp() - $tokenTtl * 3600)) {
140+
if (strtotime($token->getCreatedAt()) < ($this->date->gmtTimestamp() - $tokenTtl * 3600)) {
141141
return true;
142142
}
143143

@@ -187,6 +187,8 @@ protected function processRequest()
187187
}
188188

189189
/**
190+
* Set user data based on user type received from token data.
191+
*
190192
* @param Token $token
191193
* @return void
192194
*/

0 commit comments

Comments
 (0)