...
- Navigate to the JAX-RS web application that of your device types API folder. For more information, see the permission XML file of the virtual fire-alarm.
Define the new permission using the
@permission
annotation.
Thescope
defines to whom the API is limited to and thepermission
that is associated with a given API.
Example:Code Block @Permission(scope = "virtual_firealarm_user", permissions = {"/permission/admin/device-mgt/user/operations"})
- Restart WSO2 IoT Server and you will see the new permission created in the permission tree.
Now only users who have this specific permission assigned to them will be able to control the buzzer of the fire-alarm.
...