Class ScopeMappedClientResource
- java.lang.Object
-
- org.keycloak.services.resources.admin.ScopeMappedClientResource
-
public class ScopeMappedClientResource extends Object
- Version:
- $Revision: 1 $
- Author:
- Bill Burke
-
-
Field Summary
Fields Modifier and Type Field Description protected AdminEventBuilderadminEventprotected AdminPermissionEvaluatorauthprotected AdminPermissionEvaluator.RequirePermissionCheckmanagePermissionprotected org.keycloak.models.RealmModelrealmprotected org.keycloak.models.ScopeContainerModelscopeContainerprotected org.keycloak.models.ClientModelscopedClientprotected org.keycloak.models.KeycloakSessionsessionprotected AdminPermissionEvaluator.RequirePermissionCheckviewPermission
-
Constructor Summary
Constructors Constructor Description ScopeMappedClientResource(org.keycloak.models.RealmModel realm, AdminPermissionEvaluator auth, org.keycloak.models.ScopeContainerModel scopeContainer, org.keycloak.models.KeycloakSession session, org.keycloak.models.ClientModel scopedClient, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddClientScopeMapping(List<org.keycloak.representations.idm.RoleRepresentation> roles)Add client-level roles to the client's scopevoiddeleteClientScopeMapping(List<org.keycloak.representations.idm.RoleRepresentation> roles)Remove client-level roles from the client's scope.Stream<org.keycloak.representations.idm.RoleRepresentation>getAvailableClientScopeMappings()The available client-level roles Returns the roles for the client that can be associated with the client's scopeStream<org.keycloak.representations.idm.RoleRepresentation>getClientScopeMappings()Get the roles associated with a client's scope Returns roles for the client.Stream<org.keycloak.representations.idm.RoleRepresentation>getCompositeClientScopeMappings(boolean briefRepresentation)Get effective client roles Returns the roles for the client that are associated with the client's scope.
-
-
-
Field Detail
-
realm
protected org.keycloak.models.RealmModel realm
-
auth
protected AdminPermissionEvaluator auth
-
managePermission
protected AdminPermissionEvaluator.RequirePermissionCheck managePermission
-
viewPermission
protected AdminPermissionEvaluator.RequirePermissionCheck viewPermission
-
scopeContainer
protected org.keycloak.models.ScopeContainerModel scopeContainer
-
session
protected org.keycloak.models.KeycloakSession session
-
scopedClient
protected org.keycloak.models.ClientModel scopedClient
-
adminEvent
protected AdminEventBuilder adminEvent
-
-
Constructor Detail
-
ScopeMappedClientResource
public ScopeMappedClientResource(org.keycloak.models.RealmModel realm, AdminPermissionEvaluator auth, org.keycloak.models.ScopeContainerModel scopeContainer, org.keycloak.models.KeycloakSession session, org.keycloak.models.ClientModel scopedClient, AdminEventBuilder adminEvent, AdminPermissionEvaluator.RequirePermissionCheck managePermission, AdminPermissionEvaluator.RequirePermissionCheck viewPermission)
-
-
Method Detail
-
getClientScopeMappings
@GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getClientScopeMappings()Get the roles associated with a client's scope Returns roles for the client.- Returns:
-
getAvailableClientScopeMappings
@Path("available") @GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getAvailableClientScopeMappings()The available client-level roles Returns the roles for the client that can be associated with the client's scope- Returns:
-
getCompositeClientScopeMappings
@Path("composite") @GET @Produces("application/json") public Stream<org.keycloak.representations.idm.RoleRepresentation> getCompositeClientScopeMappings(@QueryParam("briefRepresentation") @DefaultValue("true") boolean briefRepresentation)Get effective client roles Returns the roles for the client that are associated with the client's scope.- Parameters:
briefRepresentation- if false, return roles with their attributes- Returns:
-
addClientScopeMapping
@POST @Consumes("application/json") public void addClientScopeMapping(List<org.keycloak.representations.idm.RoleRepresentation> roles)Add client-level roles to the client's scope- Parameters:
roles-
-
deleteClientScopeMapping
@DELETE @Consumes("application/json") public void deleteClientScopeMapping(List<org.keycloak.representations.idm.RoleRepresentation> roles)Remove client-level roles from the client's scope.- Parameters:
roles-
-
-