Interface ClientProtocolMapperContext
- All Superinterfaces:
ClientModelContext,ClientPolicyContext,ClientPolicyCRUDContext
- All Known Implementing Classes:
ClientProtocolMapperRegisterContext,ClientProtocolMapperRemoveContext,ClientProtocolMapperUpdateContext
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 Summary
Modifier and TypeMethodDescriptiondefault ClientModeldefault UserModeldefault ClientModeldefault ProtocolMapperModeldefault ProtocolMapperRepresentationdefault List<ProtocolMapperRepresentation>default ClientModeldefault JsonWebTokengetToken()Methods inherited from interface org.keycloak.services.clientpolicy.ClientPolicyContext
getEvent
-
Method Details
-
getTargetClient
- Returns:
- the client that hosts the mapper, or
nullwhen the mapper is hosted by a client scope.
-
getClient
- Specified by:
getClientin interfaceClientModelContext
-
getProtocolMapperContainer
ProtocolMapperContainerModel getProtocolMapperContainer()- Returns:
- the client or client scope that hosts the mapper.
-
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
- 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
- Returns:
- the existing mapper model on UPDATE/UNREGISTER; null on REGISTER.
-
getAuthenticatedUser
- Specified by:
getAuthenticatedUserin interfaceClientPolicyCRUDContext- Returns:
- the authenticated user performing this operation.
-
getAuthenticatedClient
- Specified by:
getAuthenticatedClientin interfaceClientPolicyCRUDContext- Returns:
- the authenticated client.
-
getToken
- Specified by:
getTokenin interfaceClientPolicyCRUDContext- Returns:
- the access token accompanying the request.
-