Database Reference
In-Depth Information
Note
No parameters are used here, nor is a PL/SQL semicolon. This is part of the
definition of how APEX handles custom authentication functions. The
authentic-
ate_user
function that was created earlier conforms to the expected signature: a
function returning a
BOOLEAN
value with two parameters
p_username
varchar2(255)
and
p_password varchar2(255)
.
By default, when you create a new authentication scheme, it's automatically set to
be the active scheme. Now you must use the usernames and passwords that exist in the
USERS
table to log in to your application.
Run the application, and if it shows that you're logged in, log out. You can sign on
as any of the following users: Scott, Doug, Martin, Karen, Patrick, or Tim; all pass-
words are
apress
in lowercase.
Conditional Security
Many aspects of APEX are conditional. One pair of conditions is particularly applic-
able to the authentication status: User Is the Public User and User Is Authenticated.
These conditions can help you limit objects in APEX to be available either to public
users (those who haven't logged in) or to authenticated users (those who have logged
in).
By applying security rules to the Help Desk application, you can improve usability
by restricting the display of tabs that aren't available to the public. This avoids confu-
sion and improves the overall user experience when accessing the application. Let's
walk through the creation of this condition:
1.
Edit
Page 1
of the application.
2.
In the
Shared Components
region, edit the
Admin
tab by expanding the
Parent Tabs
node and then double-clicking
Admin
.
Figure 9-21
shows the
location of the Admin tab in the navigation tree.