當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Zend_Gdata_AuthSub::AuthSubRevokeToken方法代碼示例

本文整理匯總了PHP中Zend_Gdata_AuthSub::AuthSubRevokeToken方法的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_Gdata_AuthSub::AuthSubRevokeToken方法的具體用法?PHP Zend_Gdata_AuthSub::AuthSubRevokeToken怎麽用?PHP Zend_Gdata_AuthSub::AuthSubRevokeToken使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Zend_Gdata_AuthSub的用法示例。


在下文中一共展示了Zend_Gdata_AuthSub::AuthSubRevokeToken方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: stripslashes

    if (get_magic_quotes_gpc()) {
        $q = stripslashes($q);
    }
    $gdata = new Zend_Gdata_Base($client);
    $gdata->setQuery($q);
    $feed = $gdata->getBaseFeed();
}
/**
 * Filter php_self to avoid a security vulnerability.
 */
$php_self = htmlentities(substr($_SERVER['PHP_SELF'], 0, strcspn($_SERVER['PHP_SELF'], "\n\r")), ENT_QUOTES);
/**
 * Logout and revoke AuthSub token when we are done with it.
 */
if (isset($_GET['logout'])) {
    Zend_Gdata_AuthSub::AuthSubRevokeToken($_SESSION['base_token']);
    unset($_SESSION['base_token']);
    header('Location: ' . $php_self);
    exit;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Google Base Demo</title>
<style>
body{ font-family: Arial; }
input,select{font-size: 32px;}
</style>
</head>
開發者ID:jorgenils,項目名稱:zend-framework,代碼行數:31,代碼來源:Base-AuthSub.php

示例2: revokeToken

function revokeToken($client)
{
    $sessionToken = $client->getAuthSubToken();
    return Zend_Gdata_AuthSub::AuthSubRevokeToken($sessionToken, $client);
}
開發者ID:SustainableCoastlines,項目名稱:loveyourwater,代碼行數:5,代碼來源:Health.php

示例3: testAuthSubRevokeTokenCatchesHttpClientException

 /**
  * @expectedException Zend_Gdata_App_HttpException
  */
 public function testAuthSubRevokeTokenCatchesHttpClientException()
 {
     $adapter = new Zend_Http_Client_Adapter_Test();
     $adapter->setNextRequestWillFail(true);
     $client = new Zend_Gdata_HttpClient();
     $client->setUri('http://example.com/AuthSub');
     $client->setAdapter($adapter);
     $revoked = Zend_Gdata_AuthSub::AuthSubRevokeToken($this->token, $client);
 }
開發者ID:omusico,項目名稱:logica,代碼行數:12,代碼來源:AuthSubTest.php

示例4: logout

 /**
  * If there are some discrepancies in the session or user
  * wants not to connect his/her Google Calendars with ATutor
  * then this function will securely log out the user.
  *
  * @return void
  */
 public function logout()
 {
     // Carefully construct this value to avoid application security problems.
     $php_self = htmlentities(substr($_SERVER['PHP_SELF'], 0, strcspn($_SERVER['PHP_SELF'], "\n\r")), ENT_QUOTES);
     //Revoke access for the stored token
     Zend_Gdata_AuthSub::AuthSubRevokeToken($_SESSION['sessionToken']);
     unset($_SESSION['sessionToken']);
     //Close this popup window
     echo "<script>window.opener.location.reload(true);window.close();</script>";
     exit;
 }
開發者ID:genaromendezl,項目名稱:ATutor,代碼行數:18,代碼來源:googlecalendar.class.php

示例5: revokeTokenAction

 public function revokeTokenAction()
 {
     $this->_helper->layout->disableLayout();
     Zend_Gdata_AuthSub::AuthSubRevokeToken($_SESSION['sessionToken']);
     unset($_SESSION['sessionToken']);
 }
開發者ID:rommmka,項目名稱:axiscommerce,代碼行數:6,代碼來源:IndexController.php


注:本文中的Zend_Gdata_AuthSub::AuthSubRevokeToken方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。