- Development Integration
- /
- SDK
- /
- Java
- /
Management module
- /
Manage data resources and permissions
- /
- Judge external user permissions
¶ Determine external user permissions
Update time: 2025-07-23 07:34:21
This document is automatically generated based on https://github.com/authing/authing-docs-factory based on https://api-explorer.genauth.ai V3 API, and is consistent with API parameters and return results. If the description of this document is incorrect, please refer to the V3 API.
¶ Description
When your user is an external user and needs to determine whether he has a certain permission for a resource, you can use this interface to pass the user's ID through externalId
¶ Method Name
ManagementClient.checkExternalUserPermission
¶ Request Parameters
| Name | Type | Is it required | Default Value | Description | Example Value |
|---|---|---|---|---|---|
| resources | string[] | yes | - | Resource path list, Tree resources need to go to specific tree nodes | ["strResourceCode","arrResourceCode","treeResourceCode/StructCode1/resourceStructChildrenCode1"] |
| action | string | yes | - | Data resource permission operation, read, get, write and other actions | get |
| externalId | string | yes | - | External user ID | 63721xxxxxxxxxxxxdde14a3 |
| namespaceCode | string | yes | - | Permission space Code | examplePermissionNamespace |
| judgeConditionEnabled | boolean | no | - | Whether to enable conditional judgment, default true | true |
| authEnvParams | AuthEnvParams | no | - | Conditional environment attribute, used if conditional judgment is enabled | {"ip":"127.0.0.1"} |
¶ Request Response
Type: CheckExternalUserPermissionRespDto
| Name | Type | Description |
|---|---|---|
| statusCode | number | Business status code. You can use this status code to determine whether the operation is successful. 200 means success. |
| message | string | Description |
| apiCode | number | Segment error code, through which the specific error type can be obtained (not returned for successful requests). For a detailed list of error codes, see:API Code List (opens new window) |
| data | CheckExternalUserPermissionDataDto | Response data |
Example Results:
{
"statusCode": 200,
"message": "Operation successful",
"apiCode": 20001,
"data": {
"checkResultList": {
"namespaceCode": "examplePermissionNamespace",
"action": "get",
"resource": "treeResource1",
"enabled": true
}
}
}
¶ Data Structure
¶ AuthEnvParams
| Name | Type | Is it required | Description | Example Value |
|---|---|---|---|---|
| ip | string | no | ip | 127.0.0.1 |
| city | string | no | city | Beijing |
| province | string | no | province | Hubei |
| country | string | no | country | China |
| deviceType | string | no | device type: PC/Mobile | PC |
| systemType | string | no | operation type: Windows, Android, iOS, MacOS | Windows |
| browserType | string | no | browser type: IE/Chrome/Firefox | IE |
| requestDate | string | no | request time | 2022-07-03T03:20:30.000Z |
¶ CheckExternalUserPermissionDataDto
| Name | Type | Is it required | Description | Example Value |
|---|---|---|---|---|
| checkResultList | array | Yes | Check result list Nested Type: CheckExternalUserPermissionsRespDto. |
¶ CheckExternalUserPermissionsRespDto
| Name | Type | Is it required | Description | Example Value |
|---|---|---|---|---|
| namespaceCode | string | Yes | Permission space Code | examplePermissionNamespace |
| action | string | Yes | Data resource permission operation | get |
| resource | string | Yes | Resource path | treeResource1 |
| enabled | boolean | Yes | Whether the user has a certain operation of the data resource under a certain permission space | true |
