Skip to content

Determine external user permissions

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 you need 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

NameTypeIs it requiredDefault valueDescriptionSample value
resourcesstring[]yes-Resource path list, Tree resources need to go to specific tree nodes["strResourceCode","arrResourceCode","treeResourceCode/StructCode1/resourceStructChildrenCode1"]
actionstringyes-Data resource permission operation, read, get, write and other actionsget
externalIdstringyes-External user ID63721xxxxxxxxxxxxdde14a3
namespaceCodestringyes-Permission space CodeexamplePermissionNamespace
judgeConditionEnabledbooleanno-Whether to enable conditional judgment, default is truetrue
authEnvParams<a AuthEnvParamsno-Conditional environment attribute, if conditional judgment is enabled, use{"ip":"127.0.0.1"}

Request response

Type: CheckExternalUserPermissionRespDto

NameTypeDescription
statusCodenumberBusiness status code, which can be used to determine whether the operation is successful. 200 means success.
messagestringdescription information
apiCodenumberSegment error code, which can be used to get the specific error type (successful request does not return). For a detailed list of error codes, please see: API Code List
data<a CheckExternalUserPermissionDataDtoResponse data

Sample result:

json
{
  "statusCode": 200,
  "message": "Operation successful",
  "apiCode": 20001,
  "data": {
    "checkResultList": {
      "namespaceCode": "examplePermissionNamespace",
      "action": "get",
      "resource": "treeResource1",
      "enabled": true
    }
  }
}

Data Structure

AuthEnvParams

NameTypeIs it required?DescriptionExample value
ipstringNoip127.0.0.1
citystringNocityBeijing
provincestringNoprovinceHubei
countrystringNocountryChina
deviceTypestringNoDevice type: PC/MobilePC
systemTypestringNoOperation type: Windows, Android, iOS, MacOSWindows
browserTypestringNoBrowser type: IE/Chrome/FirefoxIE
requestDatestringNoRequest time2022-07-03T03:20:30.000Z

CheckExternalUserPermissionDataDto

NameTypeIs it requiredDescriptionSample value
checkResultListarrayYesCheck result list Nested type: <a CheckExternalUserPermissionsRespDto。

CheckExternalUserPermissionsRespDto

NameTypeIs it required?DescriptionExample value
namespaceCodestringYesPermission space CodeexamplePermissionNamespace
actionstringYesData resource permission operationget
resourcestringYesResource pathtreeResource1
enabledbooleanYesWhether the user has a certain operation of the data resource under a certain permission spacetrue

Agent infrastructure for identity, memory, and web action.