提交 a234987e 编写于 作者: W wusongqing

update docs against 6444

Signed-off-by: Nwusongqing <wusongqing@huawei.com>
上级 cf8034d0
# Ability Access Control # Ability Access Control
Provides program permission management capabilities, including authentication, authorization, and revocation. The **AbilityAccessCtrl** module provides APIs for application permission management, including authentication, authorization, and revocation.
> **NOTE** > **NOTE**
> >
...@@ -69,6 +69,36 @@ promise.then(data => { ...@@ -69,6 +69,36 @@ promise.then(data => {
}); });
``` ```
### verifyAccessTokenSync<sup>9+</sup>
verifyAccessTokenSync(tokenID: number, permissionName: string): GrantStatus
Checks whether an application has been granted the specified permission. This API synchronously returns the result.
**System capability**: SystemCapability.Security.AccessToken
**Parameters**
| Name | Type | Mandatory| Description |
| -------- | ------------------- | ---- | ------------------------------------------ |
| tokenID | number | Yes | ID of the application. |
| permissionName | string | Yes | Name of the permission to verify.|
**Return value**
| Type | Description |
| :------------ | :---------------------------------- |
| [GrantStatus](#grantstatus) | Permission grant state.|
**Example**
```js
var AtManager = abilityAccessCtrl.createAtManager();
let tokenID = 0;
let data = verifyAccessTokenSync(tokenID, "ohos.permission.GRANT_SENSITIVE_PERMISSIONS");
console.log(`data->${JSON.stringify(data)}`);
```
### grantUserGrantedPermission ### grantUserGrantedPermission
grantUserGrantedPermission(tokenID: number, permissionName: string, permissionFlag: number): Promise&lt;number&gt; grantUserGrantedPermission(tokenID: number, permissionName: string, permissionFlag: number): Promise&lt;number&gt;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册