Databases Reference
In-Depth Information
■
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
authenticate_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)
.
Note
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 passwords are
apress
in lowercase.
Conditional Security
Many aspects of APEX are conditional. One pair of conditions is particularly applicable 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 confusion 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.
Figure 9-21.
Viewing the tab sets in the Shared components region of the page editor
3.
In the
Conditional Tab Display
region, set
Tab Display Condition
to
User is
Authenticated (not public)
, and click
Apply Changes
. Figure
9-22
shows the expected
value of the condition.