In some cases, you might want to restrict access to certain parts of your application to certain users. For example, not everyone should have access to the Form Page where you can alter the salaries. In such a case, you can protect your page using an authorization scheme.
Before starting with the recipe you should have a table created in the database with usernames and roles. Let's say you have the following table
ID NUMBER(5) USERNAME VARCHAR2(50) PASSWORD VARCHAR2(50) ROLE VARCHAR2(10)
The table contains two rows. One is a user with admin privileges (role is
ADMIN). The other one is a user with the no extra privileges (role is