can you explain how do we practically implement security on a resourece
Below are the five important steps to implement security on a resource.
Define the URL pattern on which security will be applied.
Define the roles which are allowed to access the resource.
Define all the roles in the web application.
Define the authentication method.
Relate the users with roles.
We will try to understand the above steps in more detail using the figure below. In thebelow figure you can see the sequence of steps.