rafatz / hanatap
用PHP编写的HANATrial云平台认证代理。
dev-master
2015-08-11 21:39 UTC
Requires
- php: >=5.2
This package is not auto-updated.
Last update: 2024-09-28 18:05:19 UTC
README
一个PHP编写的代理,用于对hanatrial.ondemand.com中的HANATrial实例进行认证。
受到优秀的https://github.com/gregorwolf/hanatrial-auth-proxy的启发
主要特性
- 简单 - 非常容易学习和使用
- 完整 - 包含认证代理、HCP客户端和简单的HTTP请求库
- 免费 - 使用MIT许可,您可以基本上做任何您想做的事情
入门指南
// Include Composer's Autoload require_once 'vendor/autoload.php'; // Or you can manually add the files //require_once '../library/Request.php'; //require_once '../library/Proxy.php'; //require_once '../library/Client.php'; // Set the namespace use HANATAP\Client; // Initialize the object $proxy = new Client(array( 'username' => '', //Your HCP user. Ex, p000000000 'accountname' => '', // Your HCP account name. Ex. p000000000trial 'password' => '', // Your HCP password 'host' => '', // The HCP host where your application is installed. Ex. s9hanaxs.hanatrial.ondemand.com 'namespace' => '', // Namespace of the application. Ex. app.package 'proxy' => '', // OPTIONAL: Proxy of your network. Ex. proxyhost:port // Extra options 'params' => '$metadata' )); // Set the header to display the content correctly header('Content-Type: '.$proxy->getContentType()); // Show the content echo $proxy->getContents();
配置参数
- username - 您的HCP用户名。例如,p000000000
- accountname - 您的HCP账户名。例如,p000000000trial
- password - 您的HCP密码
- host - 安装您应用程序的HCP主机。例如,s9hanaxs.hanatrial.ondemand.com
- namespace - 应用程序的命名空间。例如,app.package
- file - 您想访问的文件,该文件位于命名空间内部。例如,file.xodata
- params - 可选:可选的URL参数。例如,$metadata
- format - 可选:对象返回数据的格式。例如,json
- proxy - 可选:您的网络代理。例如,proxyhost:port
- path - 可选:应用程序的完整路径。您可以使用它代替命名空间、文件、参数和格式。例如,////file.xsodata/$metadata
许可
HANATAP遵循MIT许可
链接
- HANA云平台 - 开发者许可:[http://hanatrial.ondemand.com]