Package org.keycloak.authorization.admin
Class PolicyResourceService
- java.lang.Object
-
- org.keycloak.authorization.admin.PolicyResourceService
-
- Direct Known Subclasses:
PolicyTypeResourceService
public class PolicyResourceService extends Object
- Author:
- Pedro Igor
-
-
Field Summary
Fields Modifier and Type Field Description protected AdminPermissionEvaluator
auth
protected AuthorizationProvider
authorization
protected ResourceServer
resourceServer
-
Constructor Summary
Constructors Constructor Description PolicyResourceService(Policy policy, ResourceServer resourceServer, AuthorizationProvider authorization, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
delete()
protected AbstractPolicyRepresentation
doCreateRepresentation(String payload)
javax.ws.rs.core.Response
findById(String fields)
javax.ws.rs.core.Response
getAssociatedPolicies()
javax.ws.rs.core.Response
getDependentPolicies()
protected Policy
getPolicy()
javax.ws.rs.core.Response
getResources()
javax.ws.rs.core.Response
getScopes()
protected AbstractPolicyRepresentation
toRepresentation(Policy policy, String fields, AuthorizationProvider authorization)
javax.ws.rs.core.Response
update(String payload)
-
-
-
Field Detail
-
resourceServer
protected final ResourceServer resourceServer
-
authorization
protected final AuthorizationProvider authorization
-
auth
protected final AdminPermissionEvaluator auth
-
-
Constructor Detail
-
PolicyResourceService
public PolicyResourceService(Policy policy, ResourceServer resourceServer, AuthorizationProvider authorization, AdminPermissionEvaluator auth, AdminEventBuilder adminEvent)
-
-
Method Detail
-
update
@PUT @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response update(String payload)
-
delete
@DELETE public javax.ws.rs.core.Response delete()
-
findById
@GET @Produces("application/json") public javax.ws.rs.core.Response findById(@QueryParam("fields") String fields)
-
toRepresentation
protected AbstractPolicyRepresentation toRepresentation(Policy policy, String fields, AuthorizationProvider authorization)
-
getDependentPolicies
@Path("/dependentPolicies") @GET @Produces("application/json") public javax.ws.rs.core.Response getDependentPolicies()
-
getScopes
@Path("/scopes") @GET @Produces("application/json") public javax.ws.rs.core.Response getScopes()
-
getResources
@Path("/resources") @GET @Produces("application/json") public javax.ws.rs.core.Response getResources()
-
getAssociatedPolicies
@Path("/associatedPolicies") @GET @Produces("application/json") public javax.ws.rs.core.Response getAssociatedPolicies()
-
doCreateRepresentation
protected AbstractPolicyRepresentation doCreateRepresentation(String payload)
-
getPolicy
protected Policy getPolicy()
-
-