Compare commits

...
2 Commits
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -105,7 +105,7 @@ class Users extends \TPsoft\DBmodel\DBmodel {
return password_verify($password, $password_hash);
}
public function generateToken(int $user_id, int $ttl_seconds = 3600): string {
public function generateToken(int $user_id, int $ttl_seconds = 604800): string {
if ($user_id <= 0) {
throw new \Exception('Invalid user_id');
}
@@ -152,7 +152,7 @@ class Users extends \TPsoft\DBmodel\DBmodel {
if (!hash_equals($stored_token, $token)) {
return false;
}
$refresh_expires = date('Y-m-d H:i:s', time() + 3600);
$refresh_expires = date('Y-m-d H:i:s', time() + 604800); // 7 days
$updated = $this->user($user_id, array(
'token_expires' => $refresh_expires
));
+1 -1
View File
@@ -1,6 +1,6 @@
@echo off
call php d:\www\von\sftp\sftpsync2.php --host nutrio.tpsoft.org --user igor ^
call php d:\www\sftpsync\src\sftpsync.php --host nutrio.tpsoft.org --user igor ^
--delete-dir /storage/tpsoft.org/nutrio/public ^
--sync d:/www/Nutrio/dist /storage/tpsoft.org/nutrio ^
--skip .git ^