Package org.keycloak.authorization.admin
Class PolicyService
java.lang.Object
org.keycloak.authorization.admin.PolicyService
- Direct Known Subclasses:
PermissionService
,PolicyTypeService
- Author:
- Pedro Igor
-
Field Summary
Modifier and TypeFieldDescriptionprotected final AdminEventBuilder
protected final AdminPermissionEvaluator
protected final AuthorizationProvider
protected final ResourceServer
-
Constructor Summary
ConstructorDescriptionPolicyService
(ResourceServer resourceServer, AuthorizationProvider authorization, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent) -
Method Summary
Modifier and TypeMethodDescriptionjakarta.ws.rs.core.Response
create
(AbstractPolicyRepresentation representation) protected Object
doCreatePolicyResource
(Policy policy) protected PolicyTypeService
protected AbstractPolicyRepresentation
doCreateRepresentation
(String payload) doSearch
(Integer firstResult, Integer maxResult, String fields, Map<Policy.FilterOption, String[]> filters) jakarta.ws.rs.core.Response
findAll
(String id, String name, String type, String resource, String scope, Boolean permission, String owner, String fields, Integer firstResult, Integer maxResult) jakarta.ws.rs.core.Response
findByName
(String name, String fields) jakarta.ws.rs.core.Response
protected PolicyProviderAdminService
getPolicyProviderAdminResource
(String policyType) protected PolicyProviderFactory
getPolicyProviderFactory
(String policyType) getResource
(String type) protected AbstractPolicyRepresentation
toRepresentation
(Policy model, String fields, AuthorizationProvider authorization)
-
Field Details
-
resourceServer
-
authorization
-
auth
-
adminEvent
-
-
Constructor Details
-
PolicyService
public PolicyService(ResourceServer resourceServer, AuthorizationProvider authorization, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
-
Method Details
-
getResource
-
doCreatePolicyTypeResource
-
doCreatePolicyResource
-
create
@POST @Consumes("application/json") @Produces("application/json") public jakarta.ws.rs.core.Response create(String payload) -
doCreateRepresentation
-
create
-
findByName
-
findAll
@GET @Produces("application/json") public jakarta.ws.rs.core.Response findAll(@QueryParam("policyId") String id, @QueryParam("name") String name, @QueryParam("type") String type, @QueryParam("resource") String resource, @QueryParam("scope") String scope, @QueryParam("permission") Boolean permission, @QueryParam("owner") String owner, @QueryParam("fields") String fields, @QueryParam("first") Integer firstResult, @QueryParam("max") Integer maxResult) -
toRepresentation
protected AbstractPolicyRepresentation toRepresentation(Policy model, String fields, AuthorizationProvider authorization) -
doSearch
-
findPolicyProviders
@Path("providers") @GET @Produces("application/json") public jakarta.ws.rs.core.Response findPolicyProviders() -
getPolicyEvaluateResource
-
getPolicyProviderAdminResource
-
getPolicyProviderFactory
-