protected function restoreAccessToken()
{
if (!$this->authenticated) {
if ($this->hasState('auth_token') && $this->getState('expires', 0) > time()) {
$this->access_token = $this->getState('auth_token');
$this->authenticated = true;
} else {
$this->access_token = null;
$this->authenticated = false;
}
}
return $this->authenticated;
}