duancao2082 2013-02-19 01:51
浏览 27
已采纳

私有包装器定制为与公共应用程序一起使用 - XERO API?

I'm trying to customize the PHP Private App wrapper on Github to work with Public apps.

I see that the class by default calls this class:

$this->signature_method = new OAuthSignatureMethod_Xero($this->public_cert, $this->private_key);

which is then extended by this class - OAuthSignatureMethod_RSA_SHA1.

I know that public apps use HMAC_SHA1 so OAuthSignatureMethod_Xero class actually needs to extend OAuthSignatureMethod_HMAC_SHA1.

What i'm unsure of is what functions go inside this:

class OAuthSignatureMethod_Xero extends OAuthSignatureMethod_HMAC_SHA1 {
   - ?
   - ?
}

Everything else in the class looks like it should work fine with private,public or partner apps.

Has anyone done this? or know how to?

I'm quite new to Oauth and APi's so I'm struggling to customize it myself.

  • 写回答

1条回答 默认 最新

  • douao7937 2013-05-02 03:42
    关注

    I am using the Xero-API-PHP-CLASS, https://github.com/mediabeastnz/Xero-API-PHP-Class

    its pretty easy to use. I tested with a public type an works fine. Cheers, Christian

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化