Package org.keycloak.authorization.admin
Class PolicyService
- java.lang.Object
-
- org.keycloak.authorization.admin.PolicyService
-
- Direct Known Subclasses:
PermissionService
,PolicyTypeService
public class PolicyService extends Object
- Author:
- Pedro Igor
-
-
Field Summary
Fields Modifier and Type Field Description protected AdminEventBuilder
adminEvent
protected AdminPermissionEvaluator
auth
protected AuthorizationProvider
authorization
protected ResourceServer
resourceServer
-
Constructor Summary
Constructors Constructor Description PolicyService(ResourceServer resourceServer, AuthorizationProvider authorization, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
Method Summary
-
-
-
Field Detail
-
resourceServer
protected final ResourceServer resourceServer
-
authorization
protected final AuthorizationProvider authorization
-
auth
protected final AdminPermissionEvaluator auth
-
adminEvent
protected final AdminEventBuilder adminEvent
-
-
Constructor Detail
-
PolicyService
public PolicyService(ResourceServer resourceServer, AuthorizationProvider authorization, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
-
Method Detail
-
doCreatePolicyTypeResource
protected PolicyTypeService doCreatePolicyTypeResource(String type)
-
create
@POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response create(String payload)
-
doCreateRepresentation
protected AbstractPolicyRepresentation doCreateRepresentation(String payload)
-
create
public Policy create(AbstractPolicyRepresentation representation)
-
findByName
@Path("/search") @GET @Produces("application/json") public javax.ws.rs.core.Response findByName(@QueryParam("name") String name, @QueryParam("fields") String fields)
-
findAll
@GET @Produces("application/json") public javax.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
protected List<Object> doSearch(Integer firstResult, Integer maxResult, String fields, Map<Policy.FilterOption,String[]> filters)
-
findPolicyProviders
@Path("providers") @GET @Produces("application/json") public javax.ws.rs.core.Response findPolicyProviders()
-
getPolicyEvaluateResource
@Path("evaluate") public PolicyEvaluationService getPolicyEvaluateResource()
-
getPolicyProviderAdminResource
protected PolicyProviderAdminService getPolicyProviderAdminResource(String policyType)
-
getPolicyProviderFactory
protected PolicyProviderFactory getPolicyProviderFactory(String policyType)
-
-