Class ClientScopeResource
- java.lang.Object
-
- org.keycloak.services.resources.admin.ClientScopeResource
-
public class ClientScopeResource extends Object
Base resource class for managing one particular client of a realm.- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected org.keycloak.models.ClientScopeModel
clientScope
protected static Pattern
dynamicScreenPattern
protected static org.jboss.logging.Logger
logger
protected org.keycloak.models.RealmModel
realm
protected org.keycloak.models.KeycloakSession
session
-
Constructor Summary
Constructors Constructor Description ClientScopeResource(org.keycloak.models.RealmModel realm, AdminPermissionEvaluator auth, org.keycloak.models.ClientScopeModel clientScope, org.keycloak.models.KeycloakSession session, AdminEventBuilder adminEvent)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
deleteClientScope()
Delete the client scopeorg.keycloak.representations.idm.ClientScopeRepresentation
getClientScope()
Get representation of the client scopeProtocolMappersResource
getProtocolMappers()
ScopeMappedResource
getScopeMappedResource()
Base path for managing the role scope mappings for the client scopejavax.ws.rs.core.Response
update(org.keycloak.representations.idm.ClientScopeRepresentation rep)
Update the client scopestatic void
validateDynamicClientScope(org.keycloak.representations.idm.ClientScopeRepresentation clientScope)
Performs some validation based on attributes combinations and format.void
validateDynamicScopeUpdate(org.keycloak.representations.idm.ClientScopeRepresentation rep)
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 Detail
-
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
-
dynamicScreenPattern
protected static Pattern dynamicScreenPattern
-
-
Constructor Detail
-
ClientScopeResource
public ClientScopeResource(org.keycloak.models.RealmModel realm, AdminPermissionEvaluator auth, org.keycloak.models.ClientScopeModel clientScope, org.keycloak.models.KeycloakSession session, AdminEventBuilder adminEvent)
-
-
Method Detail
-
getProtocolMappers
@Path("protocol-mappers") public ProtocolMappersResource getProtocolMappers()
-
getScopeMappedResource
@Path("scope-mappings") public ScopeMappedResource getScopeMappedResource()
Base path for managing the role scope mappings for the client scope- Returns:
-
update
@PUT @Consumes("application/json") public javax.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 javax.ws.rs.core.Response deleteClientScope()
Delete the client scope
-
validateDynamicClientScope
public static void validateDynamicClientScope(org.keycloak.representations.idm.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
-
validateDynamicScopeUpdate
public void validateDynamicScopeUpdate(org.keycloak.representations.idm.ClientScopeRepresentation rep)
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.
-
-