Home > @cerbos/core > ClientWithPrincipal
A client instance with a pre-specified principal.
Signature:
export declare class ClientWithPrincipal<ClientType extends Client = Client>
The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ClientWithPrincipal
class.
Property |
Modifiers |
Type |
Description |
---|---|---|---|
|
Pick<AuxData, "jwt"> |
Auxiliary data related to the principal for whom this instance was created. | |
|
ClientType |
The client from which this instance was created. | |
|
The principal for whom this instance was created. |
Method |
Modifiers |
Description |
---|---|---|
Check the principal's permissions on a resource. See Client.checkResource() for details. | ||
Check the principal's permissions on a set of resources. See Client.checkResources() for details. | ||
Check if the principal is allowed to perform an action on a resource. See Client.isAllowed() for details. | ||
Produce a query plan that can be used to obtain a list of resources on which the principal is allowed to perform a particular action. See Client.planResources() for details. |