Class ClientProtocolMapperRegisterContext
java.lang.Object
org.keycloak.services.clientpolicy.context.admin.ClientProtocolMapperRegisterContext
- All Implemented Interfaces:
ClientPolicyContext,ClientProtocolMapperContext,ClientModelContext,ClientPolicyCRUDContext
Fired when protocol mappers are being created on a client through the admin REST API.
Emitted from
ProtocolMappersResource.createMapper(org.keycloak.representations.idm.ProtocolMapperRepresentation)
and ProtocolMappersResource.createMapper(java.util.List) before the
mapper is persisted. An executor may inspect getProposedProtocolMappers() and throw
ClientPolicyException to reject the request.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionClientProtocolMapperRegisterContext(ProtocolMapperContainerModel protocolMapperContainer, List<ProtocolMapperRepresentation> proposed, AdminAuth adminAuth) ClientProtocolMapperRegisterContext(ProtocolMapperContainerModel protocolMapperContainer, ProtocolMapperRepresentation proposed, AdminAuth adminAuth) -
Method Summary
Modifier and TypeMethodDescriptiongetEvent()returnsClientPolicyEventof client policy related events.getToken()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.keycloak.services.clientpolicy.context.admin.ClientProtocolMapperContext
getClient, getExistingProtocolMapper, getTargetClient
-
Field Details
-
adminAuth
-
-
Constructor Details
-
ClientProtocolMapperRegisterContext
public ClientProtocolMapperRegisterContext(ProtocolMapperContainerModel protocolMapperContainer, ProtocolMapperRepresentation proposed, AdminAuth adminAuth) -
ClientProtocolMapperRegisterContext
public ClientProtocolMapperRegisterContext(ProtocolMapperContainerModel protocolMapperContainer, List<ProtocolMapperRepresentation> proposed, AdminAuth adminAuth)
-
-
Method Details
-
getEvent
Description copied from interface:ClientPolicyContextreturnsClientPolicyEventof client policy related events. -
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
ClientProtocolMapperContext.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.
-
getAuthenticatedClient
- Specified by:
getAuthenticatedClientin interfaceClientPolicyCRUDContext- Specified by:
getAuthenticatedClientin interfaceClientProtocolMapperContext- Returns:
- the authenticated client.
-
getAuthenticatedUser
- Specified by:
getAuthenticatedUserin interfaceClientPolicyCRUDContext- Specified by:
getAuthenticatedUserin interfaceClientProtocolMapperContext- Returns:
- the authenticated user performing this operation.
-
getToken
- Specified by:
getTokenin interfaceClientPolicyCRUDContext- Specified by:
getTokenin interfaceClientProtocolMapperContext- Returns:
- the access token accompanying the request.
-