当前位置: 首页>>代码示例>>PHP>>正文


PHP OAuthServer::requestToken方法代码示例

本文整理汇总了PHP中OAuthServer::requestToken方法的典型用法代码示例。如果您正苦于以下问题:PHP OAuthServer::requestToken方法的具体用法?PHP OAuthServer::requestToken怎么用?PHP OAuthServer::requestToken使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OAuthServer的用法示例。


在下文中一共展示了OAuthServer::requestToken方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: request_token_action

 /**
  *
  **/
 public function request_token_action()
 {
     try {
         $server = new OAuthServer();
         $token = $server->requestToken();
         $this->render_nothing();
     } catch (Exception $e) {
         $this->render_text($e->getMessage());
     }
 }
开发者ID:ratbird,项目名称:hope,代码行数:13,代码来源:oauth.php

示例2: OAuthServer

/*
 * Always announce XRDS OAuth discovery
 */
header('X-XRDS-Location: ' . get_config('wwwroot') . 'webservice/oauthv1/services.xrds');
/*
 * Initialize OAuth store
 */
require_once get_config('docroot') . 'webservice/libs/oauth-php/OAuthServer.php';
require_once get_config('docroot') . 'webservice/libs/oauth-php/OAuthStore.php';
OAuthStore::instance('Mahara');
global $server;
$server = new OAuthServer();
!isset($_SERVER['PATH_INFO']) && ($_SERVER['PATH_INFO'] = null);
// Now - what kind of OAuth interaction are we handling?
if ($_SERVER['PATH_INFO'] == '/request_token') {
    $server->requestToken();
    exit;
} else {
    if ($_SERVER['PATH_INFO'] == '/access_token') {
        $server->accessToken();
        exit;
    } else {
        if ($_SERVER['PATH_INFO'] == '/authorize') {
            # logon
            require_once 'pieforms/pieform.php';
            if (!$USER->is_logged_in()) {
                $form = new Pieform(auth_get_login_form());
                auth_draw_login_page(null, $form);
                exit;
            }
            $rs = null;
开发者ID:vohung96,项目名称:mahara,代码行数:31,代码来源:oauthv1.php

示例3: actionRequest_token

 public function actionRequest_token()
 {
     $server = new OAuthServer();
     $token = $server->requestToken();
     exit;
 }
开发者ID:vangogogo,项目名称:justsns,代码行数:6,代码来源:OauthController.php

示例4: requesttoken

 private function requesttoken()
 {
     Neuron_Auth_OAuthStore::getStore();
     $server = new OAuthServer();
     $token = $server->requestToken();
 }
开发者ID:catlabinteractive,项目名称:dolumar-engine,代码行数:6,代码来源:OAuth.php

示例5: executeRequestToken

 public function executeRequestToken(sfWebRequest $request)
 {
     $store = $this->getStore();
     $server = new OAuthServer();
     try {
         $server->requestToken();
         sfContext::getInstance()->getLogger()->info("Got request token ");
         die;
     } catch (OAuthException $e) {
         sfContext::getInstance()->getLogger()->err("Request token: OAuth Execption: " . $e->getMessage());
     } catch (Exception $e) {
         sfContext::getInstance()->getLogger()->err("Request token error: " . $e->getMessage());
     }
 }
开发者ID:voota,项目名称:voota,代码行数:14,代码来源:BaseSfOauthServerActions.class.php

示例6: requesttokenAction

 public function requesttokenAction()
 {
     $server = new OAuthServer();
     $token = $server->requestToken();
     exit;
 }
开发者ID:henvic,项目名称:MediaLab,代码行数:6,代码来源:OauthController.php


注:本文中的OAuthServer::requestToken方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。