org.keycloak.admin.client.resource

## Interface ClientResource

-     public interface ClientResource

  Author:
    rodrigo.sasaki@icarros.com.br

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addDefaultClientScope(String clientScopeId)`
    `void` | `addOptionalClientScope(String clientScopeId)`
    `AuthorizationResource` | `authorization()`
    `CredentialRepresentation` | `generateNewSecret()`
    `Map<String,Integer>` | `getApplicationSessionCount()`
    `ClientAttributeCertificateResource` | `getCertficateResource(String attributePrefix)` Get representation of certificate resource
    `List<ClientScopeRepresentation>` | `getDefaultClientScopes()` Get default client scopes.
    `String` | `getInstallationProvider(String providerId)`
    `Map<String,Long>` | `getOfflineSessionCount()`
    `List<UserSessionRepresentation>` | `getOfflineUserSessions(Integer firstResult, Integer maxResults)`
    `List<ClientScopeRepresentation>` | `getOptionalClientScopes()` Get optional client scopes.
    `ManagementPermissionReference` | `getPermissions()` Returns indicator if the fine grain permissions are enabled or not.
    `ProtocolMappersResource` | `getProtocolMappers()`
    `RoleMappingResource` | `getScopeMappings()`
    `CredentialRepresentation` | `getSecret()`
    `UserRepresentation` | `getServiceAccountUser()`
    `List<UserSessionRepresentation>` | `getUserSessions(Integer firstResult, Integer maxResults)`
    `void` | `pushRevocation()`
    `ClientRepresentation` | `regenerateRegistrationAccessToken()` Generate a new registration access token for the client
    `void` | `registerNode(Map<String,String> formParams)`
    `void` | `remove()`
    `void` | `removeDefaultClientScope(String clientScopeId)`
    `void` | `removeOptionalClientScope(String clientScopeId)`
    `RolesResource` | `roles()`
    `ManagementPermissionReference` | `setPermissions(ManagementPermissionRepresentation status)` Enables or disables the fine grain permissions feature.
    `GlobalRequestResult` | `testNodesAvailable()`
    `ClientRepresentation` | `toRepresentation()`
    `void` | `unregisterNode(String node)`
    `void` | `update(ClientRepresentation clientRepresentation)`

- - ### Method Detail

    - #### setPermissions

          @PUT
           @Path(value="/management/permissions")
           @Consumes(value="application/json")
           @Produces(value="application/json")
          ManagementPermissionReference setPermissions(ManagementPermissionRepresentation status)

      Enables or disables the fine grain permissions feature. Returns the updated status of the server in the `ManagementPermissionReference`.
      Parameters:
        `status` - status request to apply
      Returns:
        permission reference indicating the updated status

    - #### getPermissions

          @GET
           @Path(value="/management/permissions")
           @Produces(value="application/json")
          ManagementPermissionReference getPermissions()

      Returns indicator if the fine grain permissions are enabled or not.
      Returns:
        current representation of the permissions feature

    - #### getProtocolMappers

          @Path(value="protocol-mappers")
          ProtocolMappersResource getProtocolMappers()

    - #### toRepresentation

          @GET
           @Produces(value="application/json")
          ClientRepresentation toRepresentation()

    - #### update

          @PUT
           @Consumes(value="application/json")
          void update(ClientRepresentation clientRepresentation)

    - #### remove

          @DELETE
          void remove()

    - #### generateNewSecret

          @POST
           @Path(value="client-secret")
           @Produces(value="application/json")
          CredentialRepresentation generateNewSecret()

    - #### getSecret

          @GET
           @Path(value="client-secret")
           @Produces(value="application/json")
          CredentialRepresentation getSecret()

    - #### regenerateRegistrationAccessToken

          @Path(value="registration-access-token")
           @POST
           @Produces(value="application/json")
           @Consumes(value="application/json")
          ClientRepresentation regenerateRegistrationAccessToken()

      Generate a new registration access token for the client
      Returns:

    - #### getCertficateResource

          @Path(value="certificates/{attr}")
          ClientAttributeCertificateResource getCertficateResource(@PathParam(value="attr")
                                                                                                      String attributePrefix)

      Get representation of certificate resource
      Parameters:
        `attributePrefix` -
      Returns:

    - #### getInstallationProvider

          @GET
           @Path(value="installation/providers/{providerId}")
          String getInstallationProvider(@PathParam(value="providerId")
                                                                                                  String providerId)

    - #### getApplicationSessionCount

          @Path(value="session-count")
           @GET
           @Produces(value="application/json")
          Map<String,Integer> getApplicationSessionCount()

    - #### getUserSessions

          @Path(value="user-sessions")
           @GET
           @Produces(value="application/json")
          List<UserSessionRepresentation> getUserSessions(@QueryParam(value="first")
                                                                                                                                  Integer firstResult,
                                                                                                                                  @QueryParam(value="max")
                                                                                                                                  Integer maxResults)

    - #### getOfflineSessionCount

          @Path(value="offline-session-count")
           @GET
           @Produces(value="application/json")
          Map<String,Long> getOfflineSessionCount()

    - #### getOfflineUserSessions

          @Path(value="offline-sessions")
           @GET
           @Produces(value="application/json")
          List<UserSessionRepresentation> getOfflineUserSessions(@QueryParam(value="first")
                                                                                                                                            Integer firstResult,
                                                                                                                                            @QueryParam(value="max")
                                                                                                                                            Integer maxResults)

    - #### pushRevocation

          @POST
           @Path(value="push-revocation")
           @Produces(value="application/json")
          void pushRevocation()

    - #### getScopeMappings

          @Path(value="/scope-mappings")
          RoleMappingResource getScopeMappings()

    - #### roles

          @Path(value="/roles")
          RolesResource roles()

    - #### getDefaultClientScopes

          @GET
           @Produces(value="application/json")
           @Path(value="default-client-scopes")
          List<ClientScopeRepresentation> getDefaultClientScopes()

      Get default client scopes. Only name and ids are returned.
      Returns:
        default client scopes

    - #### addDefaultClientScope

          @PUT
           @Path(value="default-client-scopes/{clientScopeId}")
          void addDefaultClientScope(@PathParam(value="clientScopeId")
                                                                                                String clientScopeId)

    - #### removeDefaultClientScope

          @DELETE
           @Path(value="default-client-scopes/{clientScopeId}")
          void removeDefaultClientScope(@PathParam(value="clientScopeId")
                                                                                                      String clientScopeId)

    - #### getOptionalClientScopes

          @GET
           @Produces(value="application/json")
           @Path(value="optional-client-scopes")
          List<ClientScopeRepresentation> getOptionalClientScopes()

      Get optional client scopes. Only name and ids are returned.
      Returns:
        optional client scopes

    - #### addOptionalClientScope

          @PUT
           @Path(value="optional-client-scopes/{clientScopeId}")
          void addOptionalClientScope(@PathParam(value="clientScopeId")
                                                                                                  String clientScopeId)

    - #### removeOptionalClientScope

          @DELETE
           @Path(value="optional-client-scopes/{clientScopeId}")
          void removeOptionalClientScope(@PathParam(value="clientScopeId")
                                                                                                        String clientScopeId)

    - #### getServiceAccountUser

          @Path(value="/service-account-user")
           @GET
           @Produces(value="application/json")
          UserRepresentation getServiceAccountUser()

    - #### registerNode

          @Path(value="nodes")
           @POST
           @Consumes(value="application/json")
          void registerNode(Map<String,String> formParams)

    - #### unregisterNode

          @Path(value="nodes/{node}")
           @DELETE
          void unregisterNode(@PathParam(value="node")
                                                                   String node)

    - #### testNodesAvailable

          @Path(value="test-nodes-available")
           @GET
           @Produces(value="application/json")
          GlobalRequestResult testNodesAvailable()

    - #### authorization

          @Path(value="/authz/resource-server")
          AuthorizationResource authorization()

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