Class ClientScopeResource
java.lang.Object
org.keycloak.services.resources.admin.ClientScopeResource
Base resource class for managing one particular client of a realm.
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
Field Summary
Modifier and TypeFieldDescriptionprotected ClientScopeModel
protected static Pattern
protected static final org.jboss.logging.Logger
protected RealmModel
protected static final Pattern
protected KeycloakSession
-
Constructor Summary
ConstructorDescriptionClientScopeResource
(RealmModel realm, AdminPermissionEvaluator auth, ClientScopeModel clientScope, KeycloakSession session, AdminEventBuilder adminEvent) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
Delete the client scopeGet representation of the client scopeBase path for managing the role scope mappings for the client scopejakarta.ws.rs.core.Response
Update the client scopestatic void
static void
validateClientScopeProtocol
(String protocol) static void
validateDynamicClientScope
(ClientScopeRepresentation clientScope) Performs some validation based on attributes combinations and format.void
Makes sure that an update that makes a Client Scope Dynamic is rejected if the Client Scope is assigned to a client as a default scope.
-
Field Details
-
logger
protected static final org.jboss.logging.Logger logger -
realm
-
clientScope
-
session
-
dynamicScreenPattern
-
scopeNamePattern
-
-
Constructor Details
-
ClientScopeResource
public ClientScopeResource(RealmModel realm, AdminPermissionEvaluator auth, ClientScopeModel clientScope, KeycloakSession session, AdminEventBuilder adminEvent)
-
-
Method Details
-
getProtocolMappers
-
getScopeMappedResource
Base path for managing the role scope mappings for the client scope- Returns:
-
update
@PUT @Consumes("application/json") public jakarta.ws.rs.core.Response update(ClientScopeRepresentation rep) Update the client scope- Parameters:
rep
-- Returns:
-
getClientScope
Get representation of the client scope- Returns:
-
deleteClientScope
@DELETE public jakarta.ws.rs.core.Response deleteClientScope()Delete the client scope -
validateDynamicClientScope
public static void validateDynamicClientScope(ClientScopeRepresentation clientScope) throws ErrorResponseException Performs some validation based on attributes combinations and format. Validations differ based on whether the DYNAMIC_SCOPES feature is enabled or not- Parameters:
clientScope
-- Throws:
ErrorResponseException
-
validateClientScopeName
- Throws:
ErrorResponseException
-
validateClientScopeProtocol
- Throws:
ErrorResponseException
-
validateDynamicScopeUpdate
Makes sure that an update that makes a Client Scope Dynamic is rejected if the Client Scope is assigned to a client as a default scope.- Parameters:
rep
- theClientScopeRepresentation
with the changes from the frontend.
-