The licenses
service and license
APS type will implement the application SKUs offering
various kinds of services to customers.
In this document:
Declare the following properties for the license
APS type in the scripts/licenses.php
file:
The license name must reflect the respective SKU name it represents for sale:
/**
* @type(string)
* @title("LicenseName")
* @required
* @description("Human readable license name")
*/
public $name;
Human readable license description:
/**
* @type(string)
* @title("LicenseDescription")
* @description("Human readable license description")
*/
public $description;
A set of scopes to be sold to customers:
/**
* @type(string[])
* @title("Scopes")
* @required
* @description("Authorized scopes on the App side assigned to a particular token")
*/
public $scopes = array("repo");
You have completed the configuration of the licenses
service and the license
APS type in scripts/licenses.php
.
If there are any problems, compare it with the sample app.php
file:
<?php
define('APS_DEVELOPMENT_MODE', true);
require "aps/2/runtime.php";
/**
* @type("http://aps-standard.org/samples/github/license/1.0")
* @implements("http://aps-standard.org/types/core/profile/service/1.0")
*/
class license extends \APS\ResourceBase
{
/**
* @link("http://aps-standard.org/samples/github/app/1.0")
* @required
*/
public $app;
/**
* @link("http://aps-standard.org/samples/github/tenant/1.0[]")
*/
public $tenants;
## The license name to represent a product SKU
/**
* @type(string)
* @title("LicenseName")
* @required
* @description("Human readable license name")
*/
public $name;
## Just a human readable description.
/**
* @type(string)
* @title("LicenseDescription")
* @description("Human readable license description")
*/
public $description;
## The only property that allows creating various App reference resources - App licenses.
/**
* @type(string[])
* @title("Scopes")
* @required
* @description("Authorized scopes of resources on the App side for a token generated for a customer")
*/
public $scopes = array("repo");
}
?>