File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Webapi/Model/Authorization Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ public function getConsumerPostTimeout()
121
121
public function getCustomerTokenLifetime ()
122
122
{
123
123
$ hours = $ this ->_scopeConfig ->getValue ('oauth/access_token_lifetime/customer ' );
124
- return is_numeric ($ hours ) ? $ hours : 0 ;
124
+ return is_numeric ($ hours ) && $ hours > 0 ? $ hours : 0 ;
125
125
}
126
126
127
127
/**
@@ -132,6 +132,6 @@ public function getCustomerTokenLifetime()
132
132
public function getAdminTokenLifetime ()
133
133
{
134
134
$ hours = $ this ->_scopeConfig ->getValue ('oauth/access_token_lifetime/admin ' );
135
- return is_numeric ($ hours ) ? $ hours : 0 ;
135
+ return is_numeric ($ hours ) && $ hours > 0 ? $ hours : 0 ;
136
136
}
137
137
}
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ private function isTokenExpired(Token $token): bool
137
137
return false ;
138
138
}
139
139
140
- if (strtotime ($ token ->getCreatedAt ()) < ($ this ->date ->gmtTimestamp () - $ tokenTtl * 3600 )) {
140
+ if ($ this -> dateTime -> strToTime ($ token ->getCreatedAt ()) < ($ this ->date ->gmtTimestamp () - $ tokenTtl * 3600 )) {
141
141
return true ;
142
142
}
143
143
You can’t perform that action at this time.
0 commit comments