org.keycloak.services.clientpolicy.context

## Interface ClientCRUDContext

- All Superinterfaces:
    ClientPolicyContext
  All Known Implementing Classes:
    AdminClientRegisterContext, AdminClientRegisteredContext, AdminClientUnregisterContext, AdminClientUpdateContext, AdminClientUpdatedContext, AdminClientViewContext, DynamicClientRegisterContext, DynamicClientRegisteredContext, DynamicClientUnregisterContext, DynamicClientUpdateContext, DynamicClientUpdatedContext, DynamicClientViewContext

      public interface ClientCRUDContext
      extends ClientPolicyContext

  Represents the context in the request to register/read/update/unregister client by Dynamic Client Registration or Admin REST API.

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default ClientModel` | `getAuthenticatedClient()` returns `UserModel` of the authenticated client.
    `default UserModel` | `getAuthenticatedUser()` returns `UserModel` of the authenticated user.
    `default ClientRepresentation` | `getProposedClientRepresentation()` returns `ClientRepresentation` for creating the new client or updating the existing client.
    `default ClientModel` | `getTargetClient()` returns `ClientModel` of the existing client to be updated/read/updated/deleted.
    `default JsonWebToken` | `getToken()` returns `JsonWebToken` of the token accompanied with the request to register/read/update/unregister client

    - ### Methods inherited from interface org.keycloak.services.clientpolicy.ClientPolicyContext

      `getEvent`

- - ### Method Detail

    - #### getProposedClientRepresentation

          default ClientRepresentation getProposedClientRepresentation()

      returns `ClientRepresentation` for creating the new client or updating the existing client.
      Returns:
        `ClientRepresentation`

    - #### getTargetClient

          default ClientModel getTargetClient()

      returns `ClientModel` of the existing client to be updated/read/updated/deleted. on REGISTER event, it returns null.
      Returns:
        `ClientModel`

    - #### getAuthenticatedUser

          default UserModel getAuthenticatedUser()

      returns `UserModel` of the authenticated user.
      Returns:
        `UserModel`

    - #### getAuthenticatedClient

          default ClientModel getAuthenticatedClient()

      returns `UserModel` of the authenticated client.
      Returns:
        `UserModel`

    - #### getToken

          default JsonWebToken getToken()

      returns `JsonWebToken` of the token accompanied with the request to register/read/update/unregister client
      Returns:
        `JsonWebToken`

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