Class PermissionsApi
- java.lang.Object
-
- org.wso2.carbon.permissions.rest.api.PermissionsApi
-
- All Implemented Interfaces:
org.wso2.msf4j.Microservice
@Path("/permissions") @Consumes("application/json") @Produces("application/xml") @ApplicationPath("/permissions") public class PermissionsApi extends Object implements org.wso2.msf4j.Microservice
-
-
Constructor Summary
Constructors Constructor Description PermissionsApi()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponseaddPermission(Permission body)javax.ws.rs.core.ResponsedeletePermission(String permissionID)javax.ws.rs.core.ResponsegetGrantedRoles(String permissionID)javax.ws.rs.core.ResponsegetPermissionStrings(String appName)javax.ws.rs.core.ResponsehasPermission(String permissionID, String roleName)javax.ws.rs.core.ResponsemanipulateRolePermission(Permission body, String roleName, String action)javax.ws.rs.core.ResponserevokePermission(String permissionID)
-
-
-
Method Detail
-
addPermission
@POST @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response addPermission(Permission body) throws NotFoundException- Throws:
NotFoundException
-
deletePermission
@DELETE @Path("/{permissionID}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response deletePermission(@PathParam("permissionID") String permissionID) throws NotFoundException- Throws:
NotFoundException
-
getGrantedRoles
@GET @Path("/{permissionID}/roles") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getGrantedRoles(@PathParam("permissionID") String permissionID) throws NotFoundException- Throws:
NotFoundException
-
getPermissionStrings
@GET @Path("/app/{appName}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response getPermissionStrings(@PathParam("appName") String appName) throws NotFoundException- Throws:
NotFoundException
-
hasPermission
@GET @Path("auth/{permissionID}/{roleName}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response hasPermission(@PathParam("permissionID") String permissionID, @PathParam("roleName") String roleName) throws NotFoundException- Throws:
NotFoundException
-
manipulateRolePermission
@POST @Path("/roles/{roleName}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response manipulateRolePermission(Permission body, @PathParam("roleName") String roleName, @QueryParam("action") String action) throws NotFoundException- Throws:
NotFoundException
-
revokePermission
@POST @Path("revoke/{permissionID}") @Consumes("application/json") @Produces("application/json") public javax.ws.rs.core.Response revokePermission(@PathParam("permissionID") String permissionID) throws NotFoundException- Throws:
NotFoundException
-
-