• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Auth_OpenID_KVForm类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Auth_OpenID_KVForm的典型用法代码示例。如果您正苦于以下问题:PHP Auth_OpenID_KVForm类的具体用法?PHP Auth_OpenID_KVForm怎么用?PHP Auth_OpenID_KVForm使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



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

示例1: Auth_OpenID_associate

function Auth_OpenID_associate($qs, $assoc_secret, $assoc_handle)
{
    $query_data = Auth_OpenID_parse($qs);
    assert(count($query_data) == 6 || count($query_data) == 4);
    assert($query_data['openid.mode'] == 'associate');
    assert($query_data['openid.assoc_type'] == 'HMAC-SHA1');
    assert($query_data['openid.session_type'] == 'DH-SHA1');
    $reply_dict = array('assoc_type' => 'HMAC-SHA1', 'assoc_handle' => $assoc_handle, 'expires_in' => '600');
    $dh_args = Auth_OpenID_DiffieHellman::serverAssociate($query_data, $assoc_secret);
    $reply_dict = array_merge($reply_dict, $dh_args);
    return Auth_OpenID_KVForm::fromArray($reply_dict);
}
开发者ID:aprilchild,项目名称:aprilchild,代码行数:12,代码来源:Consumer.php


示例2: Auth_OpenID_associate

function Auth_OpenID_associate($qs, $assoc_secret, $assoc_handle)
{
    $query_data = Auth_OpenID_parse($qs);
    assert($query_data['openid.mode'] == 'associate');
    assert($query_data['openid.assoc_type'] == 'HMAC-SHA1');
    $reply_dict = array('assoc_type' => 'HMAC-SHA1', 'assoc_handle' => $assoc_handle, 'expires_in' => '600');
    if (defined('Auth_OpenID_NO_MATH_SUPPORT')) {
        assert(count($query_data) == 2);
        $message = Auth_OpenID_Message::fromPostArgs($query_data);
        $session = Auth_OpenID_PlainTextServerSession::fromMessage($message);
    } else {
        assert(count($query_data) == 6 || count($query_data) == 4);
        assert($query_data['openid.mode'] == 'associate');
        assert($query_data['openid.session_type'] == 'DH-SHA1');
        $message = Auth_OpenID_Message::fromPostArgs($query_data);
        $session = Auth_OpenID_DiffieHellmanSHA1ServerSession::fromMessage($message);
        $reply_dict['session_type'] = 'DH-SHA1';
    }
    $reply_dict = array_merge($reply_dict, $session->answer($assoc_secret));
    return Auth_OpenID_KVForm::fromArray($reply_dict);
}
开发者ID:umbecr,项目名称:camilaframework,代码行数:21,代码来源:Consumer.php


示例3: encodeToKVForm

	/**
	 * Encodes the response to key-value form.  This is a
	 * machine-readable format used to respond to messages which came
	 * directly from the consumer and not through the user-agent.  See
	 * the OpenID specification.
	 */
	function encodeToKVForm()
	{
		return Auth_OpenID_KVForm::fromArray(
		array('mode' => 'error',
                                            'error' => $this->toString()));
	}
开发者ID:hoalangoc,项目名称:ftf,代码行数:12,代码来源:Server.php


示例4: sign

 /**
  * Generate a signature for a sequence of (key, value) pairs
  *
  * @access private
  * @param array $pairs The pairs to sign, in order.  This is an
  * array of two-tuples.
  * @return string $signature The binary signature of this sequence
  * of pairs
  */
 function sign($pairs)
 {
     $kv = Auth_OpenID_KVForm::fromArray($pairs);
     /* Invalid association types should be caught at constructor */
     $callback = $this->_macs[$this->assoc_type];
     return call_user_func_array($callback, array($this->secret, $kv));
 }
开发者ID:hilkeros,项目名称:MMM-php-cake,代码行数:16,代码来源:Association.php


示例5: toKVForm

 function toKVForm()
 {
     // Generate a KVForm string that contains the parameters in
     // this message. This will fail if the message contains
     // arguments outside of the 'openid.' prefix.
     return Auth_OpenID_KVForm::fromArray($this->toArgs());
 }
开发者ID:BackupTheBerlios,项目名称:oos-svn,代码行数:7,代码来源:Message.php


示例6: encodeToKVForm

 function encodeToKVForm()
 {
     return Auth_OpenID_KVForm::fromArray($this->fields);
 }
开发者ID:Fellah,项目名称:govnobaki,代码行数:4,代码来源:Server.php


示例7: _runTest

 function _runTest()
 {
     $serialized = Auth_OpenID_KVForm::fromArray($this->arr);
     $this->assertTrue($serialized === null, 'serialization unexpectedly succeeded');
 }
开发者ID:Stony-Brook-University,项目名称:doitsbu,代码行数:5,代码来源:KVForm.php


示例8: _makeKVPost

 /**
  * @access private
  */
 function _makeKVPost($args, $server_url)
 {
     $mode = $args['openid.mode'];
     $pairs = array();
     foreach ($args as $k => $v) {
         $v = urlencode($v);
         $pairs[] = "{$k}={$v}";
     }
     $body = implode("&", $pairs);
     $resp = $this->fetcher->post($server_url, $body);
     if ($resp === null) {
         return null;
     }
     $response = Auth_OpenID_KVForm::toArray($resp->body);
     if ($resp->status == 400) {
         return null;
     } else {
         if ($resp->status != 200) {
             return null;
         }
     }
     return $response;
 }
开发者ID:JJYing,项目名称:Anyway-Website,代码行数:26,代码来源:Consumer.php


示例9: sign

 /**
  * Generate a signature for a sequence of (key, value) pairs
  *
  * @access private
  * @param array $pairs The pairs to sign, in order.  This is an
  * array of two-tuples.
  * @return string $signature The binary signature of this sequence
  * of pairs
  */
 function sign($pairs)
 {
     $kv = Auth_OpenID_KVForm::fromArray($pairs);
     return Auth_OpenID_HMACSHA1($this->secret, $kv);
 }
开发者ID:Tjorriemorrie,项目名称:app,代码行数:14,代码来源:Association.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Auth_OpenID_Message类代码示例发布时间:2022-05-23
下一篇:
PHP Auth_OpenID_CryptUtil类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap