Class PolicyResource

java.lang.Object
org.keycloak.authorization.client.resource.PolicyResource

public class PolicyResource extends Object
An entry point for managing user-managed permissions for a particular resource
Author:
Pedro Igor
  • Constructor Details

  • Method Details

    • create

      Creates a new user-managed permission as represented by the given permission.
      Parameters:
      permission - the permission to create
      Returns:
      if successful, the permission created
    • update

      public void update(UmaPermissionRepresentation permission)
      Updates an existing user-managed permission
      Parameters:
      permission - the permission to update
    • delete

      public void delete(String id)
      Deletes an existing user-managed permission
      Parameters:
      id - the permission id
    • find

      public List<UmaPermissionRepresentation> find(String name, String scope, Integer firstResult, Integer maxResult)
      Queries the server for permission matching the given parameters.
      Parameters:
      id - the permission id
      name - the name of the permission
      scope - the scope associated with the permission
      firstResult - the position of the first resource to retrieve
      maxResult - the maximum number of resources to retrieve
      Returns:
      the permissions matching the given parameters
    • findById

      public UmaPermissionRepresentation findById(String id)
      Queries the server for a permission with the given id.
      Parameters:
      id - the permission id
      Returns:
      the permission with the given id