Access the SDK configuration using this property. Once the SDK is initialized, the configuration is read-only.
Access the Permit Elements API using this property.
Checks multiple requests within the specified context.
The check requests.
Optional
context: ContextThe context object representing the context in which the action is performed.
Optional
config: CheckConfigarray containing true
if the user is authorized, false
otherwise for each check request.
PermitConnectionError if an error occurs while sending the authorization request to the PDP.
PermitPDPStatusError if received a response with unexpected status code from the PDP.
Checks if a user
is authorized to perform an action
on a resource
within the specified context.
The user object representing the user.
The action to be performed on the resource.
The resource object representing the resource.
Optional
context: ContextThe context object representing the context in which the action is performed.
Optional
config: CheckConfigtrue
if the user is authorized, false
otherwise.
PermitConnectionError if an error occurs while sending the authorization request to the PDP.
PermitPDPStatusError if received a response with unexpected status code from the PDP.
Get all permissions for the specified user.
The user object representing the user.
Optional
tenants: string[]The list of tenants to filter the permissions on ( given by roles ).
Optional
resources: string[]The list of resources to filter the permissions on ( given by resource roles ).
Optional
resource_types: string[]The list of resource types to filter the permissions on ( given by resource roles ).
Optional
config: CheckConfigobject with key as the resource identifier and value as the resource details and permissions.
PermitConnectionError if an error occurs while sending the authorization request to the PDP.
PermitPDPStatusError if received a response with unexpected status code from the PDP.
Generated using TypeDoc
Access the Permit REST API using this property.