org.keycloak.services.resources.account.resources

## Class ResourceService

- java.lang.Object
- - org.keycloak.services.resources.account.resources.AbstractResourceService
  - - org.keycloak.services.resources.account.resources.ResourceService

-     public class ResourceService
      extends AbstractResourceService

  Author:
    Pedro Igor

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.keycloak.services.resources.account.resources.AbstractResourceService

      `AbstractResourceService.Client, AbstractResourceService.Permission, AbstractResourceService.Resource, AbstractResourceService.ResourcePermission, AbstractResourceService.Scope`

  - ### Field Summary

    - ### Fields inherited from class org.keycloak.services.resources.account.resources.AbstractResourceService

      `auth, provider, request, resourceStore, scopeStore, ticketStore, uriInfo, user`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Collection<AbstractResourceService.Permission>` | `getPermissionRequests()` Returns a list of `Permission` requests waiting for the `user(java.lang.String)` approval.
    `AbstractResourceService.Resource` | `getResource()` Returns a `Resource` where the `user(java.lang.String)` is the resource owner.
    `javax.ws.rs.core.Response` | `revoke(List<AbstractResourceService.Permission> permissions)` Updates the permission set for a resource based on the given `permissions`.
    `Collection<AbstractResourceService.Permission>` | `toPermissions()` Returns a list of `Permission` containing the users to which the `user(java.lang.String)` granted access to a resource.
    `javax.ws.rs.core.Response` | `user(String value)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### getResource

          @GET
           @Produces(value="application/json")
          public AbstractResourceService.Resource getResource()

      Returns a `Resource` where the `user(java.lang.String)` is the resource owner.
      Returns:
        the resource

    - #### toPermissions

          @GET
           @Path(value="permissions")
           @Produces(value="application/json")
          public Collection<AbstractResourceService.Permission> toPermissions()

      Returns a list of `Permission` containing the users to which the `user(java.lang.String)` granted access to a resource.
      Returns:
        the users with access to a resource

    - #### user

          @GET
           @Path(value="user")
           @Produces(value="application/json")
          public javax.ws.rs.core.Response user(@QueryParam(value="value")
                                                                                                               String value)

    - #### revoke

          @PUT
           @Path(value="permissions")
           @Consumes(value="application/json")
           @Produces(value="application/json")
          public javax.ws.rs.core.Response revoke(List<AbstractResourceService.Permission> permissions)

      Updates the permission set for a resource based on the given `permissions`.
      Parameters:
        `permissions` - the permissions that should be updated
      Returns:
        if successful, a `Response.Status#NO_CONTENT` response

    - #### getPermissionRequests

          @GET
           @Path(value="permissions/requests")
           @Produces(value="application/json")
          public Collection<AbstractResourceService.Permission> getPermissionRequests()

      Returns a list of `Permission` requests waiting for the `user(java.lang.String)` approval.
      Returns:
        the permission requests waiting for the user approval

Copyright © 2020 JBoss by Red Hat. All rights reserved.