public class ScopeMappedResource extends Object
Modifier and Type | Field and Description |
---|---|
protected ClientModel |
client |
protected RealmModel |
realm |
protected KeycloakSession |
session |
Constructor and Description |
---|
ScopeMappedResource(RealmModel realm,
RealmAuth auth,
ClientModel client,
KeycloakSession session) |
Modifier and Type | Method and Description |
---|---|
void |
addRealmScopeMappings(List<RoleRepresentation> roles)
Add a set of realm-level roles to the client's scope
|
void |
deleteRealmScopeMappings(List<RoleRepresentation> roles)
Remove a set of realm-level roles from the client's scope
|
ScopeMappedApplicationResource |
getApplicationByIdScopeMappings(String appId) |
ScopeMappedApplicationResource |
getApplicationScopeMappings(String appName) |
static List<RoleRepresentation> |
getAvailable(ClientModel client,
Set<RoleModel> roles) |
List<RoleRepresentation> |
getAvailableRealmScopeMappings()
Get list of realm-level roles that are available to attach to this client's scope.
|
static List<RoleRepresentation> |
getComposite(ClientModel client,
Set<RoleModel> roles) |
List<RoleRepresentation> |
getCompositeRealmScopeMappings()
Get all effective realm-level roles that are associated with this client's scope.
|
List<RoleRepresentation> |
getRealmScopeMappings()
Get list of realm-level roles associated with this client's scope.
|
MappingsRepresentation |
getScopeMappings()
Get all scope mappings for this client
|
protected RealmModel realm
protected ClientModel client
protected KeycloakSession session
public ScopeMappedResource(RealmModel realm, RealmAuth auth, ClientModel client, KeycloakSession session)
@GET @Produces(value="application/json") public MappingsRepresentation getScopeMappings()
@Path(value="realm") @GET @Produces(value="application/json") public List<RoleRepresentation> getRealmScopeMappings()
@Path(value="realm/available") @GET @Produces(value="application/json") public List<RoleRepresentation> getAvailableRealmScopeMappings()
public static List<RoleRepresentation> getAvailable(ClientModel client, Set<RoleModel> roles)
@Path(value="realm/composite") @GET @Produces(value="application/json") public List<RoleRepresentation> getCompositeRealmScopeMappings()
public static List<RoleRepresentation> getComposite(ClientModel client, Set<RoleModel> roles)
@Path(value="realm") @POST @Consumes(value="application/json") public void addRealmScopeMappings(List<RoleRepresentation> roles)
roles
- @Path(value="realm") @DELETE @Consumes(value="application/json") public void deleteRealmScopeMappings(List<RoleRepresentation> roles)
roles
- @Path(value="applications/{app}") public ScopeMappedApplicationResource getApplicationScopeMappings(@PathParam(value="app") String appName)
@Path(value="applications-by-id/{appId}") public ScopeMappedApplicationResource getApplicationByIdScopeMappings(@PathParam(value="appId") String appId)
Copyright © 2015. All rights reserved.