| index

Package mip_security Handle authentication and authorization processes for the MIP project

Program units

login | Perform user authentication and login An authenticated login for an expired password will result in flow to the 'Change Password' page.
get_hash | Generate a hash from the given username and password
valid_user2 | %obs private function
valid_user | %obs replaced by authenticate_user
authenticate_user | Authenticates the given username and password
user_screen |
admin_screen |
new_password |
other_user_password |
get_user_status |
set_user_status | Updates the user status
page_authorization | Authorize access to the given page
component_authorization | Authorize access to the given component
region_authorization | Authorize access to the given region

login

    PROCEDURE login(p_uname      IN VARCHAR2
                   ,p_password   IN VARCHAR2
                   ,p_session_id IN VARCHAR2
                   ,p_flow_page  IN VARCHAR2)

Perform user authentication and login An authenticated login for an expired password will result in flow to the 'Change Password' page.

Parameters

| p_uname | username
| p_password | password
| p_session_id | APEX session number
| p_flow_page | the app:page to which flow should pass on successful authentication

get_hash

    FUNCTION get_hash(p_username IN VARCHAR2
                     ,p_password IN VARCHAR2) RETURN VARCHAR2

Generate a hash from the given username and password
The system does not record users passwords 'in the plain', instead we recordThe resultant hash is recorded as the username 'password hash'

valid_user2

    PROCEDURE valid_user2(p_username IN VARCHAR2
                         ,p_password IN VARCHAR2)

Obsolete

| private function

valid_user

    FUNCTION valid_user(p_username IN VARCHAR2
                       ,p_password IN VARCHAR2) RETURN BOOLEAN

Obsolete

| replaced by authenticate_user

authenticate_user

    FUNCTION authenticate_user(p_username IN VARCHAR2
                              ,p_password IN VARCHAR2) RETURN BOOLEAN

Authenticates the given username and password

Returns

| TRUE for authenticated username and password combination

Replaces

| valid_user, valid_user2

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)

other_user_password

    PROCEDURE other_user_password(p_prty_id  IN NUMBER
                                 ,p_username IN VARCHAR2
                                 ,p_password IN VARCHAR2)

get_user_status

    FUNCTION get_user_status(p_username IN VARCHAR2) RETURN VARCHAR2

set_user_status

    PROCEDURE set_user_status(p_username IN VARCHAR2
                             ,p_status   IN VARCHAR2)

Updates the user status

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

Authorize access to the given page

Parameters

| p_app_user | The name of the application user
| p_page_id | The page to be accessed
| p_privilege | The access privilege requested

Returns

| Boolean value, true for access allowed

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

Authorize access to the given component

Parameters

| p_app_user | The name of the application user
| p_component_name | The name of the component to be accessed
| p_privilege | The access privilege requested

Returns

| Boolean value, true for access allowed

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

Authorize access to the given region

Parameters

| p_app_user | The name of the application user
| p_component_name | The name of the region to be accessed
| p_privilege | The access privilege requested

Returns

| Boolean value, true for access allowed