protected function getAccessToken()
	{
		$token = self::$persistance->getVariable('token');
		if(!$this->isAccessTokenExpired($token))
		{
			return $token->access_token;
		}
		else if ($token !== null && $token->refresh_token !== null)
		{
			$token = $this->getTokenFromRefreshToken($token->refresh_token);
			return $token->access_token;
		}

		if(isset($_REQUEST['code']))
		{
			$code = $_REQUEST['code'];
			if($code)
			{
				$redirectURI = self::$persistance->getVariable('redirect_uri') ? : $this->getCurrentURI();

				$token = $this->getTokenFromCode($code, $redirectURI);

				self::$persistance->deleteVariable('redirect_uri');
				self::$persistance->deleteVariable('code');

				return $token->access_token;
			}
		}
	}