Interface ClientProtocolMapperContext

All Superinterfaces:
ClientModelContext, ClientPolicyContext, ClientPolicyCRUDContext
All Known Implementing Classes:
ClientProtocolMapperRegisterContext, ClientProtocolMapperRemoveContext, ClientProtocolMapperUpdateContext

public interface ClientProtocolMapperContext extends ClientModelContext, ClientPolicyCRUDContext
Context fired by ProtocolMappersResource on protocol-mapper CRUD operations through the admin REST API.

Dispatched as ClientPolicyEvent.REGISTER_PROTOCOL_MAPPER, ClientPolicyEvent.UPDATE_PROTOCOL_MAPPER, and ClientPolicyEvent.UNREGISTER_PROTOCOL_MAPPER.

  • Method Details

    • getTargetClient

      default ClientModel getTargetClient()
      Returns:
      the client that hosts the mapper, or null when the mapper is hosted by a client scope.
    • getClient

      default ClientModel getClient()
      Specified by:
      getClient in interface ClientModelContext
    • getProtocolMapperContainer

      ProtocolMapperContainerModel getProtocolMapperContainer()
      Returns:
      the client or client scope that hosts the mapper.
    • getProposedProtocolMapper

      default ProtocolMapperRepresentation getProposedProtocolMapper()
      Returns:
      the inbound mapper representation on single-item REGISTER/UPDATE flows; null on UNREGISTER and on batch REGISTER flows. Use getProposedProtocolMappers() to inspect batch payloads.
    • getProposedProtocolMappers

      default List<ProtocolMapperRepresentation> getProposedProtocolMappers()
      Returns:
      a structurally immutable list of inbound mapper representations when the context carries proposed mapper payloads; the representations themselves remain mutable for policy executors; null on UNREGISTER.
    • getExistingProtocolMapper

      default ProtocolMapperModel getExistingProtocolMapper()
      Returns:
      the existing mapper model on UPDATE/UNREGISTER; null on REGISTER.
    • getAuthenticatedUser

      default UserModel getAuthenticatedUser()
      Specified by:
      getAuthenticatedUser in interface ClientPolicyCRUDContext
      Returns:
      the authenticated user performing this operation.
    • getAuthenticatedClient

      default ClientModel getAuthenticatedClient()
      Specified by:
      getAuthenticatedClient in interface ClientPolicyCRUDContext
      Returns:
      the authenticated client.
    • getToken

      default JsonWebToken getToken()
      Specified by:
      getToken in interface ClientPolicyCRUDContext
      Returns:
      the access token accompanying the request.