org.keycloak.services.resources.admin

## Class OAuthClientResource

- java.lang.Object
- - org.keycloak.services.resources.admin.OAuthClientResource

-     public class OAuthClientResource
      extends Object

  Base resource class for managing oauth clients
  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected KeycloakApplication` | `application`
    `protected static org.jboss.logging.Logger` | `logger`
    `protected OAuthClientModel` | `oauthClient`
    `protected RealmModel` | `realm`
    `protected KeycloakSession` | `session`
    `protected javax.ws.rs.core.UriInfo` | `uriInfo`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `OAuthClientResource(RealmModel realm, RealmAuth auth, OAuthClientModel oauthClient, KeycloakSession session)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `deleteOAuthClient()` Remove the OAuth Client
    `protected KeycloakApplication` | `getApplication()`
    `ClientAttributeCertificateResource` | `getCertficateResource(String attributePrefix)`
    `ClaimResource` | `getClaimResource()` Base path for managing allowed oauth client claims
    `CredentialRepresentation` | `getClientSecret()` Get the secret of the oauth client
    `String` | `getInstallation()` Get an example keycloak.json file to use to configure the oauth client
    `OAuthClientRepresentation` | `getOAuthClient()` Get a representation of the oauth client
    `ScopeMappedResource` | `getScopeMappedResource()` Base path for managing the oauth client's scope
    `CredentialRepresentation` | `regenerateSecret()` Generate a new client secret for the oauth client
    `javax.ws.rs.core.Response` | `update(OAuthClientRepresentation rep)` Update the oauth client

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

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

- - ### Field Detail

    - #### logger

          protected static final org.jboss.logging.Logger logger

    - #### realm

          protected RealmModel realm

    - #### oauthClient

          protected OAuthClientModel oauthClient

    - #### session

          protected KeycloakSession session

    - #### uriInfo

          @Context
          protected javax.ws.rs.core.UriInfo uriInfo

    - #### application

          @Context
          protected KeycloakApplication application

  - ### Constructor Detail

    - #### OAuthClientResource

          public OAuthClientResource(RealmModel realm,
                             RealmAuth auth,
                             OAuthClientModel oauthClient,
                             KeycloakSession session)

  - ### Method Detail

    - #### getApplication

          protected KeycloakApplication getApplication()

    - #### getClaimResource

          @Path(value="claims")
          public ClaimResource getClaimResource()

      Base path for managing allowed oauth client claims
      Returns:

    - #### getCertficateResource

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

      Parameters:
        `attributePrefix` -
      Returns:

    - #### update

          @PUT
          @Consumes(value="application/json")
          public javax.ws.rs.core.Response update(OAuthClientRepresentation rep)

      Update the oauth client
      Parameters:
        `rep` -
      Returns:

    - #### getOAuthClient

          @GET
          @Produces(value="application/json")
          public OAuthClientRepresentation getOAuthClient()

      Get a representation of the oauth client
      Returns:

    - #### getInstallation

          @GET
          @Path(value="installation")
          @Produces(value="application/json")
          public String getInstallation()
                                 throws IOException

      Get an example keycloak.json file to use to configure the oauth client
      Returns:
      Throws:
        `IOException`

    - #### deleteOAuthClient

          @DELETE
          public void deleteOAuthClient()

      Remove the OAuth Client

    - #### regenerateSecret

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

      Generate a new client secret for the oauth client
      Returns:

    - #### getClientSecret

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

      Get the secret of the oauth client
      Returns:

    - #### getScopeMappedResource

          @Path(value="scope-mappings")
          public ScopeMappedResource getScopeMappedResource()

      Base path for managing the oauth client's scope
      Returns:

Copyright © 2015. All Rights Reserved.