adlogix/confluence-rest-php-client
Composer 安装命令:
composer require adlogix/confluence-rest-php-client
包简介
Confluence API PHP Client
README 文档
README
An Object Oriented wrapper for Confluence, written PHP5
tl;dr;
- JWT: Json Web Token standard, atlassian version, Atlassian JWT Web decoder (use your query to get the QSH, use the query + the JWT token query param to validate it)
- QSH: Query String Hash
- Descriptor: Add-on Descriptor for Atlassian Connect, validate your descriptor against an atlassian product (syntax check only)
Requirements
- PHP >= 5.5.0
Installation
$ php composer.phar require adlogix/confluence-rest-php-client
Minimal Usage
See the index.php at the root of this repository
Real life testing
The Atlassian Product you want to authenticate to needs to contact your application using some form of webhooks, so we created the most basic application we could do to show you how it can be accomplished.
Use docker-compose:
$ docker-compose up -d
Use host names instead of ports
If you've launched the environment you already have a proxy running to redirect ngrok.dev and confluence-client.dev to the correct containers. You just have to put both domains to your host file or use a solution like dnsmasq on OSX, but be sure to redirect to your docker-machine IP.
To find your docker machine ip use:
$ docker-machine ip [machine-name]
Get your development instance
Atlassian changed the way to work on Confluence/Jira, now in order to create your plugin, you have to get a Developer Account and create your own instance. All the steps to create your environment are defined on the documentation page.
Once you have access to your own Atlassian Cloud instance and you put it in developer mode, we can continue and let the instance contact us.
Exposing our local app to the world
The Atlassian app we trying to authenticate must post some information to us, so we need to expose our app on the internet. That's the reason we have a ngrok container running. ngrok is an application which will create a tunnel between our environment and their servers, letting us to be accessed from everywhere.
You should now have a ngrok container running at ngrok.dev. When you connect you should see the tunnel url and, if you open it, all the tunnel trafic.
The url to use to install our demo application is https://[your-tunnel-id].eu.ngrok.io/descriptor.json
Note: Everytime you restart the ngrok container, the tunnel id will change, so you should reinstall your plugin each time. I know, it's bad.
Update the view/index.html.twigfile
Be sure to update the view/index.html.twig to set the links to real content urls in order to be able to do the requests. Be sure to replace the base url to point to our api
https://adlogixdevelopers.atlassian.net/'wiki/download/attachments/197331/Adsdaq-login.png?api=v2'
adlogix/confluence-rest-php-client 适用场景与选型建议
adlogix/confluence-rest-php-client 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.15k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 07 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「Authentication」 「Guzzle」 「connect」 「middleware」 「atlassian」 「jwt」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 adlogix/confluence-rest-php-client 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 adlogix/confluence-rest-php-client 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 adlogix/confluence-rest-php-client 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Automatically logs-in users if they are already authenticated by a remote source. (e.g. environment variable REMOTE_USER)
GraphQL authentication for your headless Craft CMS applications.
Customize JWT claims in Laravel Passport access tokens
Laravel middleware to restrict a site or specific routes using HTTP basic authentication
Email Toolkit Plugin for CakePHP
Official PHP SDK for Okta Connect — the omnichannel messaging platform (WhatsApp, email, social publishing, campaigns).
统计信息
- 总下载量: 1.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-07-07