|
Package body mip_security
|
get_user_status
FUNCTION get_user_status(p_username IN VARCHAR2) RETURN VARCHAR2
login
PROCEDURE login(p_uname IN VARCHAR2
,p_password IN VARCHAR2
,p_session_id IN VARCHAR2
,p_flow_page IN VARCHAR2)
Logs the user into the system and registers with APEX.
if the user account is 'OPEN', log them in and flow to the requested page if the user account is 'EXPIRED', log them in and flow to the 'Change Password' page if the user account is 'LOCKED', log the user out and flow to the 'Locked' page
get_hash
FUNCTION get_hash(p_username IN VARCHAR2
,p_password IN VARCHAR2) RETURN VARCHAR2
Produce a 'password hash' from the given username and password
Uses the dbms_obfuscation_toolkit to produce the hash.
authenticate_user
FUNCTION authenticate_user(p_username IN VARCHAR2
,p_password IN VARCHAR2) RETURN BOOLEAN
Authenticates the given username and password
|
|
TRUE for authenticated username and password combination
|
valid_user2
PROCEDURE valid_user2(p_username IN VARCHAR2
,p_password IN VARCHAR2)
Authenticates the given p_username and p_password
Checks the passwords table for a hash value matching that produced from the given p_username and p_password.
|
|
-20000
|
when unable to authenticate
|
valid_user
FUNCTION valid_user(p_username IN VARCHAR2
,p_password IN VARCHAR2) RETURN BOOLEAN
Authenticates the given username and password
authorization
FUNCTION authorization(p_app_user IN VARCHAR2
,p_component_name IN apex_authorization.component_name%TYPE
,p_component_type IN apex_authorization.component_type%TYPE
,p_privilege IN apex_authorization.privilege%TYPE DEFAULT 'A')
RETURN BOOLEAN
Checks for authorization to access the given component
Checks the roles assigned to the given p_app_user to see whether they are authorized to access the given component.
If configuration item APEX_AUTHORIZATION_DEFAULT_MODE = PUBLIC, all components are considered to be accessible to all unless specifically listed in the apex_authorization table. Otherwise, the requested access must be listed in the apex_authorization table.
|
|
p_app_user
|
username
|
|
|
p_component_name
|
name of the component to be accessed
|
|
|
p_component_type
|
the type of component to be accessed
|
|
|
p_privilege
|
the access privilege being sought
|
|
|
TRUE if the given p_app_user is authorized
|
page_authorization
FUNCTION page_authorization(p_app_user IN VARCHAR2
,p_page_id IN NUMBER
,p_privilege IN apex_authorization.privilege%TYPE DEFAULT 'A')
RETURN BOOLEAN
Checks for authorization to access the given page
Calls the authorization function to perform the check
|
|
p_app_user
|
username
|
|
|
p_page_id
|
page number to be accessed
|
|
|
p_privilege
|
the access privilege being sought
|
|
|
TRUE if the given p_app_user is authorized
|
component_authorization
FUNCTION component_authorization(p_app_user IN VARCHAR2
,p_component_name IN apex_authorization.component_name%TYPE
,p_privilege IN apex_authorization.privilege%TYPE DEFAULT 'A')
RETURN BOOLEAN
Checks for authorization to access the given component
Calls the authorization function to perform the check
|
|
p_app_user
|
username
|
|
|
p_component_name
|
name of the component to be accessed
|
|
|
p_privilege
|
the access privilege being sought
|
|
|
TRUE if the given p_app_user is authorized
|
region_authorization
FUNCTION region_authorization(p_app_user IN VARCHAR2
,p_component_name IN apex_authorization.component_name%TYPE
,p_privilege IN apex_authorization.privilege%TYPE DEFAULT 'A')
RETURN BOOLEAN
Checks for authorization to access the given page
Calls the authorization function to perform the check
|
|
p_app_user
|
username
|
|
|
p_component_name
|
name of the region to be accessed
|
|
|
p_privilege
|
the access privilege being sought
|
|
|
TRUE if the given p_app_user is authorized
|
user_screen
FUNCTION user_screen(p_username IN VARCHAR2) RETURN BOOLEAN
admin_screen
FUNCTION admin_screen(p_username IN VARCHAR2) RETURN BOOLEAN
new_password
PROCEDURE new_password(p_username IN VARCHAR2
,p_password IN VARCHAR2)
redirect_on_expired_account
PROCEDURE redirect_on_expired_account(p_username IN VARCHAR2)