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

refresh token segitsegevel access token frissitese

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