Skip to content
Snippets Groups Projects
Commit 5ebd8c5a authored by Zoltán's avatar Zoltán
Browse files

refresh token segitsegevel access token frissitese

parent 4bacc8b2
No related branches found
No related tags found
No related merge requests found
......@@ -30,11 +30,13 @@ class AuthSCHClient {
} else {
// load tokendata from session
$this->tokens = unserialize($_SESSION['tokens']);
}
//refresh access token if it!s too old
if($this->tokens->lastUpdate + 3600 < time()) {
$this->reauthenticate();
$_SESSION['tokens'] = serialize($this->tokens);
}
}
} else {
$this->tokens = $tokens;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment