承接 jublonet/oauth-validator-php 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jublonet/oauth-validator-php

最新稳定版本:1.0.1

Composer 安装命令:

composer require jublonet/oauth-validator-php

包简介

A library for validating OAuth signatures in PHP.

README 文档

README

A library for validating OAuth signatures in PHP.

Copyright (C) 2014 Jublo Solutions support@jublo.net

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Requirements

  • PHP 5.3.0 or higher

Validating an OAuth signature

To validate an OAuth signature, provide the consumer key and secret, as well as the token.

require_once 'oauth-validator.php';

\Jublo\Oauth_Validator::setConsumerKey('******', '******');
$ov = \Jublo\Oauth_Validator::getInstance();
$ov->setToken("******", "******");

$params = array(
    'status' => 'Hashtags are cool, when they work. http://www.example.com/gear#id=3&type=store'
);

$authorization = 'OAuth oauth_consumer_key="******", oauth_nonce="6f8b2bc8", oauth_signature="DRicJWVJQFOxdnRgh7hsyvqd8sQ%3D", oauth_signature_method="HMAC-SHA1", oauth_timestamp="1416406562", oauth_token="******", oauth_version="1.0"';

$reply = $ov->validate($authorization, 'POST', 'https://api.twitter.com/1.1/statuses/update.json', $params);
var_dump($reply);

统计信息

  • 总下载量: 42.76k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 3
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-3.0
  • 更新时间: 2014-11-19