Compare commits
2 Commits
af437963bb
...
02e9aa1ac4
| Author | SHA1 | Date | |
|---|---|---|---|
| 02e9aa1ac4 | |||
| b3be74e652 |
@ -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,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 ^
|
||||
|
||||
Reference in New Issue
Block a user