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
FieldsModifier and TypeFieldDescriptionprotected org.keycloak.models.ClientScopeModelprotected static final org.jboss.logging.Loggerprotected org.keycloak.models.RealmModelprotected static final Patternprotected org.keycloak.models.KeycloakSession -
Constructor Summary
ConstructorsConstructorDescriptionClientScopeResource(org.keycloak.models.RealmModel realm, AdminPermissionEvaluator auth, org.keycloak.models.ClientScopeModel clientScope, org.keycloak.models.KeycloakSession session, AdminEventBuilder adminEvent) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.ResponseDelete the client scopeorg.keycloak.representations.idm.ClientScopeRepresentationGet representation of the client scopeBase path for managing the role scope mappings for the client scopejakarta.ws.rs.core.Responseupdate(org.keycloak.representations.idm.ClientScopeRepresentation rep) Update the client scopestatic voidvalidateClientScope(org.keycloak.models.KeycloakSession session, org.keycloak.representations.idm.ClientScopeRepresentation clientScope) Validates client scope during creation or updatestatic voidstatic voidvalidateClientScopeProtocol(org.keycloak.models.KeycloakSession session, String protocol) static voidvalidateParameterizedClientScope(org.keycloak.models.KeycloakSession session, org.keycloak.representations.idm.ClientScopeRepresentation clientScope) Performs some validation based on attributes combinations and format.voidvalidateParameterizedScopeUpdate(org.keycloak.representations.idm.ClientScopeRepresentation rep) Makes sure that an update that makes a Client Scope Parameterized is rejected if the Client Scope is assigned as a default scope — either to a client or as a realm-level default.
-
Field Details
-
logger
protected static final org.jboss.logging.Logger logger -
realm
protected org.keycloak.models.RealmModel realm -
clientScope
protected org.keycloak.models.ClientScopeModel clientScope -
session
protected org.keycloak.models.KeycloakSession session -
scopeNamePattern
-
-
Constructor Details
-
ClientScopeResource
public ClientScopeResource(org.keycloak.models.RealmModel realm, AdminPermissionEvaluator auth, org.keycloak.models.ClientScopeModel clientScope, org.keycloak.models.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(org.keycloak.representations.idm.ClientScopeRepresentation rep) Update the client scope- Parameters:
rep-- Returns:
-
getClientScope
@GET @Produces("application/json") public org.keycloak.representations.idm.ClientScopeRepresentation getClientScope()Get representation of the client scope- Returns:
-
deleteClientScope
@DELETE public jakarta.ws.rs.core.Response deleteClientScope()Delete the client scope -
validateParameterizedClientScope
public static void validateParameterizedClientScope(org.keycloak.models.KeycloakSession session, org.keycloak.representations.idm.ClientScopeRepresentation clientScope) throws ErrorResponseException Performs some validation based on attributes combinations and format. Validations differ based on whether the PARAMETERIZED_SCOPES feature is enabled or not- Parameters:
clientScope-- Throws:
ErrorResponseException
-
validateClientScopeName
- Throws:
ErrorResponseException
-
validateClientScopeProtocol
public static void validateClientScopeProtocol(org.keycloak.models.KeycloakSession session, String protocol) throws ErrorResponseException - Throws:
ErrorResponseException
-
validateClientScope
public static void validateClientScope(org.keycloak.models.KeycloakSession session, org.keycloak.representations.idm.ClientScopeRepresentation clientScope) throws ErrorResponseException Validates client scope during creation or update- Parameters:
session- the Keycloak sessionclientScope- clientScope to validate- Throws:
ErrorResponseException- if error happens during client-scope validation
-
validateParameterizedScopeUpdate
public void validateParameterizedScopeUpdate(org.keycloak.representations.idm.ClientScopeRepresentation rep) Makes sure that an update that makes a Client Scope Parameterized is rejected if the Client Scope is assigned as a default scope — either to a client or as a realm-level default.- Parameters:
rep- theClientScopeRepresentationwith the changes from the frontend.
-