Lines Matching refs:session
147 protected $session; variable in Facebook
313 * @param Array $session the session
317 public function setSession($session=null, $write_cookie=true) { argument
318 $session = $this->validateSessionObject($session);
320 $this->session = $session;
322 $this->setCookieFromSession($session);
335 $session = null;
342 $session = $this->createSessionFromSignedRequest($signedRequest);
346 if (!$session && isset($_REQUEST['session'])) {
347 $session = json_decode(
353 $session = $this->validateSessionObject($session);
357 if (!$session && $this->useCookieSupport()) {
360 $session = array();
366 ), $session);
367 $session = $this->validateSessionObject($session);
369 $write_cookie = empty($session);
373 $this->setSession($session, $write_cookie);
376 return $this->session;
385 $session = $this->getSession();
386 return $session ? $session['uid'] : null;
395 $session = $this->getSession();
397 if ($session) {
398 return $session['access_token'];
649 * @param Array $session the session to use for setting the cookie
651 protected function setCookieFromSession($session=null) { argument
660 if ($session) {
661 $value = '"' . http_build_query($session, null, '&') . '"';
662 if (isset($session['base_domain'])) {
663 $domain = $session['base_domain'];
665 $expires = $session['expires'];
693 * @param Array $session the session object
696 protected function validateSessionObject($session) { argument
698 if (is_array($session) &&
699 isset($session['uid']) &&
700 isset($session['access_token']) &&
701 isset($session['sig'])) {
703 $session_without_sig = $session;
709 if ($session['sig'] != $expected_sig) {
711 $session = null;
715 $session = null;
717 return $session;
734 $session = array(
741 $session['sig'] = self::generateSignature(
742 $session,
746 return $session;