当前位置: 首页>>代码示例>>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;未经允许,请勿转载。