From 4ce77f8f0fb21de8aecf2d115e5a89715d1c229f Mon Sep 17 00:00:00 2001 From: zolij <zolij86@gmail.com> Date: Wed, 8 Jan 2014 12:39:19 +0100 Subject: [PATCH] =?UTF-8?q?session=20kezel=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- php/AuthSCHClient.class.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/php/AuthSCHClient.class.php b/php/AuthSCHClient.class.php index b80aa68..89450f7 100644 --- a/php/AuthSCHClient.class.php +++ b/php/AuthSCHClient.class.php @@ -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']); } } -- GitLab