¶ Management application
This module is primarily used to manage application-related operations.
Please use the module in the following ways:
$managementClient = new ManagementClient('userPoolId', 'secret');
$managementClient->requestToken();
$applicationsClient = $managementClient->applications();
$list = $applicationsClient->list(['page' => 2, 'limit' => 10]); // Get application list
$app = $applicationsClient->findById('5f97fb40d352ecf69ffe6d98'); // Find Application by ID
¶ Create application
ApplicationsManagementClient->create(array $params)
Create an app in the userpool
¶ parameter
params
<array> Parameter arrayparams['name']
<string> Application Name.params['identifier']
<string> Apply unique identifier.params['redirectUris']
<string> Jump url.params['logo']
<string> Application logo, optional .
¶ Example
$res = $appManageClient->create([
'name' => 'testname',
'identifier' => ' only one ',
'redirectUris' => 'http://authing.cn',
'logo' => 'https: //files.authing.co/authing-console/authing-logo-new.svg'
]);
¶ Sample data
{
"code": 200,
"message": "\u521b\u5efa\u5e94\u7528\u6210\u529f\uff01",
"data": {
"qrcodeScanning": {
"redirect": false,
"interval": 1500
},
"id": "6073e90329bca4db6b9bfb44",
"userPoolId": "5f88506c81cd279930195660",
"protocol": "oidc",
"name": "testname",
"secret": "6768151669a410de1e16823f46d9039d",
"identifier": "only one ",
"jwks": {
// ----
}
}
}
¶ Delete application
ApplicationsManagementClient->delete(string $appId)
To delete a user application pool
¶ parameter
appId
<string> appId
¶ Example
$res = $appManageClient->delete('606dd67c164539e1c90f4d83');
¶ Sample data
true
¶ Get the application list
ApplicationsManagementClient->list(array $params = [ 'page' => 1,'limit' => 10 ])
Get a list of application -related information
¶ parameter
params
<array> Parameter arrayparams['page']
<number> Page number, default1
。params['limit']
<number> The number of returned per page, default10
。
¶ Example
$managementClient = new ManagementClient('userPoolId', 'secret');
// Get application manager
$applications = $managementClient->applications();
$list = $applications->list(['page' => 2, 'limit' => 10]);
¶ Sample data
{
"code": 200,
"message": "Get a list of success",
"data": {
"list": [],
"totalCount": 1
}
}
¶ Get app details
ApplicationsManagementClient->findById(string $id)
¶ parameter
id
<string> user id
¶ Example
// Get application manager
$_client = new ManagementClient('userPoolId', 'secret');
$_client->requestToken();
$applications = $_client->applications();
$app = $applications->findById('5f97fb40d352ecf69ffe6d98');
// Code 200 by determining whether the operation is successful if
¶ Sample data
{
"code": 200,
"message": "\u83b7\u53d6\u5e94\u7528\u914d\u7f6e\u6210\u529f",
"data": {
"qrcodeScanning": { "redirect": false, "interval": 1500 },
"id": "5f97fb40d352ecf69ffe6d98",
"createdAt": "2020-10-27T10:49:36.817Z",
"updatedAt": "2021-03-17T10:39:53.650Z",
"userPoolId": "5f88506c81cd279930195660",
"protocol": "oidc",
"isOfficial": false,
"isDeleted": false,
"isDefault": false,
"name": "oo",
"description": null,
"secret": "19938f6ef3c84360a9c0ab73c2cc88d7",
"identifier": "okokiohutuyfrtd",
"jwks": {
"keys": {
"0": {
// ------
}
}
},
"ssoPageCustomizationSettings": null,
"logo": "https://files.authing.co/authing-console/default-app-logo.png",
// -----
"casConfig": null,
"showAuthorizationPage": false,
"enableSubAccount": false,
"loginRequireEmailVerified": false,
"agreementEnabled": false,
"skipMfa": false,
"permissionStrategy": {
"enabled": false,
"defaultStrategy": "ALLOW_ALL",
"allowPolicyId": null,
"denyPolicyId": null
}
}
}
¶ Access to resources list
ApplicationsManagementClient->listResources(string $appId, array $options = [])
According to the filter conditions , the query resource list under the pool of users .
¶ parameter
appId
<string> user IDoptions
<array> Optionally , the filter conditions objectsoptions['type']
<string> Resource types , optional valueDATA
、API
、MENU
、UI
、BUTTON
options['page']
<string> Page, get the first few pages, the default starts from 1options['limit']
<string> Number of entries per page
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$client->requestToken();
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->listResources(APP_ID, [
'type' => 'DATA',
'page' => 1,
'type' => 10,
]);
¶ Return data
{
"list": [
{
"id": "60646ed1c7a558f935c6d49c",
"createdAt": "2021-03-31T12:45:05.175Z",
"updatedAt": "2021-03-31T12:45:05.175Z",
"userPoolId": "600a8f29cead8fc0127f9da6",
"code": "pihh4j7j4ehh",
"actions": [
{
"name": "book:write",
"description": "图书写入操作"
}
],
"type": "DATA",
"description": "chair",
"namespaceId": 22997,
"apiIdentifier": null,
"namespace": "600a8f4e37708b363024a3ca"
}
],
"totalCount": 1
}
¶ Create Resource
ApplicationsManagementClient->createResource(string $appId, array $options)
Create a resource.
¶ parameter
appId
<string> user IDoptions
<array> Resource information objectoptions['code']
<string> Resource Identifier, unable valueuserpool
、user
、application
、role
、group
、org
、*
、api
、resource-namespace
、custom-resource
options['type']
<string> Resource type, optional valueDATA
、API
、MENU
、UI
、BUTTON
options['actions']
<Array<{ name: string, description: string }>> Operating array of objects resources. Wherein the name is the name of the operation , a fill verb , Description of the operation description , description filloptions['description']
<string> Description Information Resourcesoptions['apiIdentifier']
<string> Optional , API resource URL address when the type is API fields are required
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$client->requestToken();
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->createResource(APP_ID, [
'code' => 'codeNames',
'type' => 'API',
'actions' => [
(object)[
'name' => 'codeNames:actionName',
'description' => 'actionDescription'
]
],
'description' => 'description',
'apiIdentifier' => 'http://xxx.com'
]);
¶ Return data
{
"userPoolId": "600a8f29cead8fc0127f9da6",
"code": "book",
"actions": [
{
"name": "book:write",
"description": "Book writing operation"
}
],
"type": "DATA",
"description": "book",
"namespaceId": 22997,
"createdAt": "2021-04-06T11:49:07.656Z",
"updatedAt": "2021-04-06T11:49:07.656Z",
"id": "606c4ab3d7fb66a8e1517132",
"apiIdentifier": null
}
¶ Bulk create resources
ApplicationsManagementClient->createResourceBatch(string $appId, array $resources)
Create multiple resources at a specified application.
¶ parameter
appId
<string> application IDresources
<resource []> Resource information objectresource['code']
<string> Resource Identifierresource['namespace']
<string> Permission group namespaceresource['type']
<string> Resource type, optional valueDATA
、API
、MENU
、UI
、BUTTON
resource['actions']
<Array<{ name: string, description: string }>> Operating array of objects resources. Wherein the name is the name of the operation , a fill verb , Description of the operation description , description fillresource['description']
<string> Resource description informationresource['nameSpace']
<string> Namespace code
¶ Example
$applicationsManagementClient->createResourceBatch(APP_ID,
[
[
'code' => 'default1',
'description' => '这是一段描述',
'actions' => [
(object)[
'name' => 'default1:write',
'description' => 'this is description'
]
],
'type' => ResourceType::DATA,
],
[
'code' => 'default2',
'description' => '这是一段描述',
'actions' => [
(object)[
'name' => 'default2:write',
'description' => 'this is description'
]
],
'type' => ResourceType::DATA,
]
]);
¶ Return data
[
{
"userPoolId": "5f819ffdaaf252c4df2c9266",
"code": "default1",
"actions": [
{
"name": "default1:write",
"description": "this is description"
}
],
"type": "DATA",
"description": "This is a description",
"namespaceId": 32638,
"createdAt": "2021-06-01T03:55:24.863Z",
"updatedAt": "2021-06-01T03:55:24.863Z",
"id": "60b5afac2f388546bcf80d17",
"apiIdentifier": null
},
{
"userPoolId": "5f819ffdaaf252c4df2c9266",
"code": "default2",
"actions": [
{
"name": "default2:write",
"description": "this is description"
}
],
"type": "DATA",
"description": "This is a description",
"namespaceId": 32638,
"createdAt": "2021-06-01T03:55:24.872Z",
"updatedAt": "2021-06-01T03:55:24.872Z",
"id": "60b5afac1ebd020d341beac1",
"apiIdentifier": null
}
]
¶ Update Resource
ApplicationsManagementClient->updateResource(string $appId, array $options)
Update a resource .
¶ parameter
appId
<string> application IDoptions
<array> Resource information objectoptions['code']
<string> Resource Identifieroptions['type']
<string> Resource type, optional valueDATA
、API
、MENU
、UI
、BUTTON
options['actions']
<Array<{ name: string, description: string }>> Operating array of objects resources. Where name is the name of the operation ,Fill in a verb, description is a description, fill in the description informationoptions['description']
<string> Resource description informationoptions['apiIdentifier']
<string> Optional, API resource URL address, this field must fill when Type is API
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->updateResource(APP_ID, [
'type' => 'API',
'code' => 'RESOURCE_CODE',
'actions'=> [
(object)[
'name' => 'codeNames:actionName',
'description' => 'actionDescription'
],
(object)[
'name' => 'codeNames:actionName',
'description' => 'actionDescription'
]
],
'description' => '新的描述',
'apiIdentifier' => 'http://xxx.com'
]);
¶ Return data
{
"id": "606c4ab3d7fb66a8e1517132",
"createdAt": "2021-04-06T11:49:07.656Z",
"updatedAt": "2021-04-06T11:59:26.879Z",
"userPoolId": "600a8f29cead8fc0127f9da6",
"code": "book",
"actions": [
{
"name": "book:write",
"description": "Writes books 2"
},
{
"name": "book:read",
"description": "Book reading operation 2"
}
],
"type": "DATA",
"description": "New description",
"namespaceId": 22997,
"apiIdentifier": null
}
¶ Delete resources
ApplicationsManagementClient->deleteResource(string $appId, string $code)
Delete a resource.
¶ parameter
appId
<string> application IDcode
<string> Resource identifier
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->deleteResource(APP_ID, 'code');
¶ Return data
true
¶ Get application access control policies
ApplicationsManagementClient->getAccessPolicies(string $appId, array $options = [])
¶ parameter
appId
<string> application ID;options
<array> Configuration parameters;options['page']
<string> Data starting page number , the default is 1 ;options['limit']
<string> The number per page, the default is 10;
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->getAccessPolicies(APP_ID, [
'page' => 1,
'limit' => 10
]);
¶ Sample data
{
"code": 200,
"message": "获取成功",
"data": {
"list": [
{
"assignedAt": "2021-04-10T10:24:50.107Z",
"inheritByChildren": null,
"enabled": true,
"policyId": "60716621b0aef91d6bc11c32",
"code": "ApplicationLoginDeny:lSZlqZL8NP",
"policy": {
// ------
},
"targetType": "USER",
"targetIdentifier": "606fd22265371f55fdb1bfad",
"target": {
// ----
},
"namespace": "5f97fb40d352ecf69ffe6d98"
},
{
"assignedAt": "2021-04-10T08:47:30.066Z",
"inheritByChildren": null,
"enabled": true,
"policyId": "6071662188f47914f51cd284",
"code": "ApplicationLoginAccess:6aRgXOlfO",
"policy": {
// ---
},
"targetType": "USER",
"targetIdentifier": "5fa42fbe8ae63f8e96a68b33",
"target": {
// ----
},
"namespace": "5f97fb40d352ecf69ffe6d98"
}
],
"totalCount": 2
}
}
¶ Enable application access control policy
ApplicationsManagementClient->enableAccessPolicy(string $appId, array $options)
¶ parameter
appId
<string> application IDoptions
<array> Configuration parameters;options['targetType']
<string> Main type, optional valueUSER
、ROLE
、ORG
、GROUP
, meaning the user, role, organizational node, user groups;options['targetIdentifiers']
<string> main body id;options['inheritByChildren']
<string> Whether the child node is inherited, only when thetargetType
=ORG
is optional.
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->enableAccessPolicy(APP_ID, [
'targetType' => 'ROLE',
'targetIdentifiers' => [ROLE_ID],
'inheritByChildren' => null
]);
¶ Sample data
{
"code": 200,
"message": "启用应用访问控制策略成功"
}
¶ Deactivate application access control policies
ApplicationsManagementClient->disableAccessPolicy(string $appId, array $options)
Deactivate an access control policy.
¶ parameter
appId
<string> Application IDoptions
<array> Configuration parameters;options['targetType']
<string> Main type, optional valueUSER
、ROLE
、ORG
、GROUP
, Meaning is user, role, organizational node, user grouping;options['targetIdentifiers']
<string> main body id;options['inheritByChildren']
<string> Whether the child node is inherited, only when thetargetType
=ORG
is optional.
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->disableAccessPolicy(APP_ID, [
'targetType' => 'ROLE',
'targetIdentifiers' => [ROLE_ID],
'inheritByChildren' => null
]);
¶ Sample data
{
"code": 200,
"message": "Deactivate application access control policies success"
}
¶ Delete application access control policy
ApplicationsManagementClient->deleteAccessPolicy(string $appId, array $options)
Access to delete an application control policy .
¶ parameter
appId
<string> application IDoptions
<array> Configuration parameters;options['targetType']
<string> Main type, optional valueUSER
、ROLE
、ORG
、GROUP
,Meaning is user, role, organizational node, user grouping;options['targetIdentifiers']
<string> main body id;options['inheritByChildren']
<string> Whether the child node is inherited, only when thetargetType
=ORG
is optional.
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->deleteAccessPolicy(APP_ID, [
'targetType' => 'ROLE',
'targetIdentifiers' => [ROLE_ID],
'inheritByChildren' => null
]);
¶ Sample data
{
"code": 200,
"message": "Delete application access control policies success"
}
¶ Configure「Allow the body(user , role , group , organization node)access applications」control policy
ApplicationsManagementClient->allowAccess(string $appId, array $options)
Configure「Allow the body(user , role , group , organization node)access applications」control policy
¶ parameter
appId
<string> Application IDoptions
<array> Configuration parameters;options['targetType']
<string> Main type, optional valueUSER
、ROLE
、ORG
、GROUP
, Meaning the user, role, organizational node, user grouping;options['targetIdentifiers']
<string> main body id;options['inheritByChildren']
<string> Whether the child node is inherited, onlytargetType
=ORG
, when effective , optional .
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->allowAccess(APP_ID, [
'targetType' => 'ROLE',
'targetIdentifiers' => [ROLE_ID],
'inheritByChildren' => null
]);
¶ Sample data
{
"code": 200,
"message": "Allowing the body to access the application policy configuration in effect"
}
¶ Configure the control policy of「Rejecting the subject(user, role, grouping, organization node)access application」
ApplicationsManagementClient->denyAccess(string $appId, array $options)
Configure the control policy of「Rejecting the subject(user, role, grouping, organization node)access application」
¶ parameter
appId
<string> Application IDoptions
<array> Configuration parameters;options['targetType']
<string> Main type, optional valueUSER
、ROLE
、ORG
、GROUP
, Meaning the user, role, organizational node, user groups;options['targetIdentifiers']
<string> main body id;options['inheritByChildren']
<string> Whether the child node is inherited, only when thetargetType
=ORG
is optional.
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->denyAccess(APP_ID, [
'targetType' => 'ROLE',
'targetIdentifiers' => [ROLE_ID],
'inheritByChildren' => null
]);
¶ Sample data
{
"code": 200,
"message": "Refused access to the main application policy configuration in effect"
}
¶ Changing the default application access policy (default to reject all user access applications, the default allows all users to access applications)
ApplicationsManagementClient->updateDefaultAccessPolicy(string $appId, string $defaultStrategy)
Modify the default application access policies : default deny all users access to the application , the default allows all users access applications
¶ parameter
appId
<string> Application IDdefaultStrategy
<string> Optional valueALLOW_ALL
、DENY_ALL
, meaning the default allow all users to log application , the default deny all users who log application ;
¶ Example
$client = new ManagementClient('userPoolId', 'userPoolSecret');
$applicationsManagementClient = $client->applications();
$res = $applicationsManagementClient->updateDefaultAccessPolicy(APP_ID, 'DENY_ALL');
¶ Sample data
{
"code": 200,
"message": "Updates successfully applied !",
"data": {
"qrcodeScanning": {
"redirect": false,
"interval": 1500
},
"id": "5f97fb40d352ecf69ffe6d98",
"createdAt": "2020-10-27T10:49:36.817Z",
"updatedAt": "2021-04-10T10:27:11.114Z",
"userPoolId": "5f88506c81cd279930195660",
"protocol": "oidc",
"isOfficial": false,
"isDeleted": false,
"isDefault": false,
"name": "oo",
"description": null,
"identifier": "okokiohutuyfrtd",
"jwks": {
// ----
},
// ----
"permissionStrategy": {
"enabled": true,
"defaultStrategy": "DENY_ALL",
"allowPolicyId": "6071662188f47914f51cd284",
"denyPolicyId": "60716621b0aef91d6bc11c32"
}
}
}
¶ Create a role in the application
ApplicationsManagementClient->createRole(string $appId, array $options)
Create a role , you can specify different rights groups .
¶ parameter
appId
<string> Application IDoptions
<array> Configuration informationoptions['code']
<string> Roles unique identifieroptions['description']
<string> describe
¶ Example
$appManageClient->createRole(APP_ID, [
'code' => 'CODE',
'description' => 'DESCRIPTION',
]);
¶ Role in Removing applications
ApplicationsManagementClient->deleteRole(string $appId, string $code)
Delete role
¶ parameter
appId
<string> application IDcode
<string> Role unique marker
¶ Example
$appManageClient->deleteRole(APP_ID, 'rolea');
¶ Batch delete roles in the application
ApplicationsManagementClient->deleteRoles(string $appId, array $codes)
Batch delete roles in the application
appId
<string> application IDcodes
<string[]> Role unique marker array
¶ Example
$appManageClient->deleteRole(APP_ID, ['CODE_1', 'CODE_2']);
¶ Role in modifying the application
ApplicationsManagementClient->updateRole(string $appId, array $options)
Modify roles
¶ parameter
appId
<string> Application IDoptions
<array> Configuration informationoptions['code']
<string> Role unique markeroptions['description']
<string> Descriptionoptions['newCode']
<string> A new unique identifier
¶ Example
$appManageClient->updateRole(APP_ID, [ 'newCode' => 'newcode' ]);
¶ Gets the role details in the application
ApplicationsManagementClient->findRole(string $appId, string $code)
Gets the role details in the application .
¶ parameter
appId
<string> Application IDcode
<string> Role unique marker
¶ Example
$appManageClient->findRole(APP_ID, CODE);
¶ Get list of roles in the application
ApplicationsManagementClient->getRoles(string $appId, array $options = [])
Get list of roles in the application .
¶ parameter
appId
<string> Application IDoptions
<array> Alternatively , the configuration informationoptions.page
<number> The default value is the number of pages :1
.options.limit
<number> The default value is the number of page :10
.
¶ Example
$appManageClient->getRoles(APP_ID, [
'page' => 1,
'limit' => 10,
])
¶ Users get a list of applications under the role of
ApplicationsManagementClient->getUsersByRoleCode(string $appId, string $code)
Users get a list of applications under the role.
¶ parameter
appId
<string> Application IDcode
<string> Role unique marker
¶ Example
$appManageClient->getUsersByRoleCode(APP_ID, CODE);
¶ Role in the application to add users
ApplicationsManagementClient->addUsersToRole(string $appId, string $code, array $userIds)
Adding a user role in the application .
¶ parameter
appId
<string> Application IDcode
<string> Role unique markeruserIds
<string[]> User ID list
¶ Example
$appManageClient->addUsersToRole(APP_ID, CODE, [
USER_ID_1,
USER_ID_2,
]);
¶ Role in the removal of user applications
ApplicationsManagementClient->removeUsersFromRole(string $appId, string $code, array userIds)
Role in the application to remove the user .
¶ parameter
appId
<string> Application IDcode
<string> Role unique markeruserIds
<string[]>User ID list
¶ Example
$appManageClient->removeUsersFromRole(APP_ID, CODE, [
USER_ID_1,
USER_ID_2,
]);
¶ Get a list of all application resources authorized under Roles
ApplicationsManagementClient->listAuthorizedResourcesByRole(string $appId, string $code, string $resourceType = '')
Get a list of all the resources under application roles are authorized .
¶ parameter
appId
<string> Application IDcode
<string> Role code;resourceType
<string> Alternatively , resource type, default will return all rights to resources , the existing resource types are as follows :DATA
: type of data;API
: API type data ;MENU
: Menu types of data ;BUTTON
: Button type data.
¶ Example
use Authing\Types\ResourceType;
$appManageClient->listAuthorizedResourcesByRole(
APP_ID,
CODE,
ResourceType::BUTTON
);
¶ Sample data
{
"totalCount": 12,
"list": [
{
"code": "menu_a",
"type": "MENU"
},
{
"code": "menu_b",
"type": "MENU"
},
{
"code": "books:1",
"type": "DATA",
"actions": ["books:delete", "books:update"]
}
]
}
¶ Creating a Registration Agreement
ApplicationsManagementClient->createAgreement(string $appId, array $agreement)
Creating a Registration Agreement
¶ parameter
appId
<string> Application IDagreement
<array> Registration protocol configuration;agreement['title']
: The protocol title can contain HTML A tags;agreement['required']
: Whether you must check the consent to allow registration, default is true;agreement['lang']
: Protocol Title Language, optional zh-CN, en-US, default is zh-CN, which will be displayed according to the interface language display protocol in the hosted login page;
¶ Example
$appManageClient->createAgreement(APP_ID, [
'title' =>
'I agreement this <a href="https://example.com/policy" target="_blank">policy</a>',
'required' => true,
]);
¶ Sample data
{
"userPoolId": "607543c19f711c9b91fa9400",
"appId": "607543c1ec30828efb065adb",
"title": "I agreement this <a href=\"https://example.com/policy\" target=\"_blank\">policy</a>",
"lang": "zh-CN",
"required": true,
"order": 6,
"id": 148
}
¶ Modify registration protocol
ApplicationsManagementClient->modifyAgreement(string $appId, string $agreementId, array $updates)
Modify registration protocol
¶ parameter
appId
<string> Application IDagreementId
<number> Protocol IDupdates
<array> To update the data;updates['title']
<string> The protocol title can contain HTML A tags;updates['required']
<string> Whether you must check the consent to allow registration, default is true;updates['lang']
<string> Protocol Title Language, optional zh-CN, eN-US, default is zH-CN, which will be displayed according to the interface language display protocol in the hosted login page;
¶ Example
$appManageClient->modifyAgreement(APP_ID, AGREEMENT_ID, [
'required' => false,
]);
¶ Sample data
{
"userPoolId": "607543c19f711c9b91fa9400",
"appId": "607543c1ec30828efb065adb",
"title": "I agreement this <a href=\"https://example.com/policy\" target=\"_blank\">policy</a>",
"lang": "zh-CN",
"required": true,
"order": 6,
"id": 148
}
¶ Get a list of registration protocols
ApplicationsManagementClient->listAgreement(string $appId)
Get a list of registration protocols
¶ parameter
appId
<string> Application ID
¶ Example
$appManageClient->listAgreement(APP_ID);
¶ Sample data
[
{
"userPoolId": "607543c19f711c9b91fa9400",
"appId": "607543c1ec30828efb065adb",
"title": "I agreement this <a href=\"https://example.com/policy\" target=\"_blank\">policy</a>",
"lang": "zh-CN",
"required": true,
"order": 6,
"id": 148
}
]
¶ Delete registration protocol
ApplicationsManagementClient->deleteAgreement(string $appId, string $agreementId)
Delete registration protocol
¶ parameter
appId
<string> Application IDagreementId
<number> Protocol ID
¶ Example
$appManageClient->deleteAgreement(APP_ID, AGREEMENT_ID);
¶ Sample data
true
¶ Registration protocol sort
ApplicationsManagementClient->sortAgreement(string appId, array order)
Registration protocol sort
¶ parameter
appId
<string> Application IDorder
<array> Apply all the ID lists of all protocols, arrange them in order required
¶ Example
$appManageClient->sortAgreement(APP_ID, [
AGREEMENT_ID1,
AGREEMENT_ID2,
AGREEMENT_ID3,
]);
¶ Sample data
true
¶ View logged in user
ApplicationsManagementClient->activeUsers(string $appId, int $page = 1, int $limit = 10)
View the logged in user
¶ parameter
appId
<string> Application IDpage
<number> Page serial number, default is1
.limit
<number> The number of times returned per page, the default is10
¶ Example
$appManageClient->activeUsers(APP_ID, 1, 10);
¶ Refresh application key
ApplicationsManagementClient->refreshApplicationSecret(string $appId)
Refresh application key
¶ parameter
appId
<string> Application ID
¶ Example
$appManageClient->refreshApplicationSecret(APP_ID);