Skip to content

Commit 09a402e

Browse files
authored
Merge pull request dokuwiki#4295 from maulware/4239_jwt-no-cache
Move JWT token into metadir dokuwiki#4239
2 parents df2dbbd + 4a9d6ae commit 09a402e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

inc/JWT.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,10 @@ public function getIssued()
179179
*/
180180
public static function getStorageFile($user)
181181
{
182-
return getCacheName($user, '.token');
182+
global $conf;
183+
$hash = hash('sha256', $user);
184+
$file = $conf['metadir'] . '/jwt/' . $hash[0] . '/' . $hash . '.token';
185+
io_makeFileDir($file);
186+
return $file;
183187
}
184188
}

0 commit comments

Comments
 (0)