Finished first draft of the authorization endpoint implementation
Made some minor tweaks and improvements to the utility classes Required some new dependencies Server::__construct now takes a single config array as the list of parameters was getting rather long.
This commit is contained in:
@@ -23,9 +23,9 @@ class FilesystemJsonStorage implements TokenStorageInterface {
|
||||
$deleted = 0;
|
||||
|
||||
// A TTL of 0 means the token should live until deleted, and negative TTLs are invalid.
|
||||
if ($ttl >= 0) {
|
||||
if ($ttl > 0) {
|
||||
foreach (new DirectoryIterator($this->path) as $fileInfo) {
|
||||
if ($fileInfo->isFile() && time() - max($fileInfo->getMTime(), $fileInfo->getCTime()) > $ttl) {
|
||||
if ($fileInfo->isFile() && $fileInfo->getExtension() == 'json' && time() - max($fileInfo->getMTime(), $fileInfo->getCTime()) > $ttl) {
|
||||
unlink($fileInfo->getPathname());
|
||||
$deleted++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user