Commit 4ce77f8f authored by zolij's avatar zolij

session kezelés

parent a687d8ef
......@@ -20,8 +20,14 @@ class AuthSCHClient {
}
if(!isset($_SESSION['access_token'])) {
// auth token not exists
// get tokens from auth.sch.bme.hu
$this->authenticate();
$_SESSION['access_token'] = $this->tokens->access_token;
//save tokendata to session
$_SESSION['tokens'] = serialize($this->tokens);
} else {
// load tokendata from session
$this->tokens = unserialize($_SESSION['tokens']);
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment