定制 gravity-design-nl/surfsara-handles 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

gravity-design-nl/surfsara-handles

Composer 安装命令:

composer require gravity-design-nl/surfsara-handles

包简介

PHP library to create, edit and delete handles at SURFsara

关键字:

README 文档

README

Introduction

PHP library to create, edit and delete handles through the handle HTTP JSON REST API running at SURFsara. More information about the API can be found at http://www.handle.net/tech_manual/HN_Tech_Manual_8.pdf (chapter 14).

Installation

Install the SURFsara Handles library using Composer.

$ composer require GravityDesignNL/SURFsara-handles

Usage

In order to use this class to connect to SURFsara you need to have a private-key file and a certificate file. Check with SURFsara to get the document to guide you through that process.

Once you generated the security files you can start using the SURFsara Handles class to create or delete handles.

$client = new SURFsaraHandles();

Options

The SURFsara Handles class needs some settings (required and optional) to make it work properly.

Key (required) (string)

The absolute path to the private-key file.

$client->setKey('<path>'));

Certificate (required) (string)

The absolute path to the certificate file.

$client->setCert('<path>'));

Organisation code (required) (string)

The code SURFsara has given to your organisation.

$client->setSurfsaraPrefixOrg('<code>'));

Organisation code (required) (string)

The code for the SURFsara environment you will communicate with.

$client->setSurfsaraPrefixOrg('<env>'));

API Url (required) (string)

The url for the SURFsara API you will communicate with.

$client->setSurfsaraPrefixEnv('<api>'));

Permissions (required (string))

The permissions needed to create or delete a handle.

$client->setPermissions('<permissions>'));

Overwrite (optional (string))

Set if you want overwrite an existing handle. Can be either 'true' or 'false'. Defaults to 'true'.

$client->setOverwrite('true'));

Verify (optional (boolean))

Set if ... Can be either TRUE or FALSE. Defaults to FALSE.

$client->setVerify(FALSE));

Headers (optional (array))

Set headers if you need them. Headers are added in an array.

$client->setHeaders(['Authorization' => 'Handle clientCert="true"']);

Handle Name

Set the handle name. For example a uuid.

$client->setHandleName('<name>');

Handle Url

Set the base handle url the PID redirects to. For example http://www.example.org/.

$client->setHandleUrl('<url>');

Handles

When you added all the settings then you can create or update a (new) handle:

$client->setHandle();

Or you can delete it:

$client->deleteHandle();

Happy handling!!!

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固