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

session kezelés

parent a687d8ef
No related branches found
No related tags found
No related merge requests found
...@@ -20,8 +20,14 @@ class AuthSCHClient { ...@@ -20,8 +20,14 @@ class AuthSCHClient {
} }
if(!isset($_SESSION['access_token'])) { if(!isset($_SESSION['access_token'])) {
// auth token not exists // auth token not exists
// get tokens from auth.sch.bme.hu
$this->authenticate(); $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']);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment