org.keycloak.services.clientpolicy.context

## Class AdminClientViewContext

- java.lang.Object
- - org.keycloak.services.clientpolicy.context.AdminClientViewContext

- All Implemented Interfaces:
    ClientPolicyContext, ClientCRUDContext

      public class AdminClientViewContext
      extends Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected AdminAuth` | `adminAuth`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AdminClientViewContext(ClientModel targetClient, AdminAuth adminAuth)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `ClientModel` | `getAuthenticatedClient()` returns `UserModel` of the authenticated client.
    `UserModel` | `getAuthenticatedUser()` returns `UserModel` of the authenticated user.
    `ClientPolicyEvent` | `getEvent()` returns `ClientPolicyEvent` of client policy related events.
    `ClientModel` | `getTargetClient()` returns `ClientModel` of the existing client to be updated/read/updated/deleted.
    `JsonWebToken` | `getToken()` returns `JsonWebToken` of the token accompanied with the request to register/read/update/unregister client

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

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

    - ### Methods inherited from interface org.keycloak.services.clientpolicy.context.ClientCRUDContext

      `getProposedClientRepresentation`

- - ### Field Detail

    - #### adminAuth

          protected final AdminAuth adminAuth

  - ### Constructor Detail

    - #### AdminClientViewContext

          public AdminClientViewContext(ClientModel targetClient,
                                        AdminAuth adminAuth)

  - ### Method Detail

    - #### getEvent

          public ClientPolicyEvent getEvent()

      Description copied from interface: `ClientPolicyContext`
      returns `ClientPolicyEvent` of client policy related events.
      Returns:
        `ClientPolicyEvent`

    - #### getTargetClient

          public ClientModel getTargetClient()

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

    - #### getAuthenticatedClient

          public ClientModel getAuthenticatedClient()

      Description copied from interface: `ClientCRUDContext`
      returns `UserModel` of the authenticated client.
      Specified by:
        `getAuthenticatedClient` in interface `ClientCRUDContext`
      Returns:
        `UserModel`

    - #### getAuthenticatedUser

          public UserModel getAuthenticatedUser()

      Description copied from interface: `ClientCRUDContext`
      returns `UserModel` of the authenticated user.
      Specified by:
        `getAuthenticatedUser` in interface `ClientCRUDContext`
      Returns:
        `UserModel`

    - #### getToken

          public JsonWebToken getToken()

      Description copied from interface: `ClientCRUDContext`
      returns `JsonWebToken` of the token accompanied with the request to register/read/update/unregister client
      Specified by:
        `getToken` in interface `ClientCRUDContext`
      Returns:
        `JsonWebToken`

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