Oracle Apex - (Authentication|Identity)

Card Puncher Data Processing

About

This page makes part of the security theme and talks authentication implementation in Apex.

Process

Once a user has been identified, the Application Express engine keeps track of each user by setting:

See Session state scope to understand why.

Login

Login processing has the following steps:

  • Run authentication scheme's pre-authentication procedure.
  • Run authentication scheme's authentication function to check the user credentials (p_username, p_password), returning true on success.
  • If result=true:
    • run post-authentication procedure.
    • save username in session table.
    • set redirect url to deep link.
  • If result=false:
    • set redirect url to current page, with an error message in the notification_msg parameter.
  • Log authentication result.
  • Redirect.

Procedure

sentry

See IS_SESSION_VALID function

API

Custom Authentication

APEX_CUSTOM_AUTH

You can use the APEX_CUSTOM_AUTH package to perform various operations related to authentication and session management.

  • APEX_CUSTOM_AUTH.GET_SESSION_ID
  • APEX_CUSTOM_AUTH.GET_SESSION_ID_FROM_COOKIE;

APEX_UTIL

The status set using this procedure is visible in the apex_user_access_log view and in the reports on this view available to workspace and site administrators.

CREATE OR REPLACE FUNCTION MY_AUTH(
    p_username IN VARCHAR2, 
    p_password IN VARCHAR2)
RETURN BOOLEAN
IS
BEGIN
    APEX_UTIL.SET_CUSTOM_AUTH_STATUS(p_status=>'User:'||p_username||' is back.');
    IF UPPER(p_username) = 'GOOD' THEN
        APEX_UTIL.SET_AUTHENTICATION_RESULT(24567);
        RETURN TRUE;
    ELSE
        APEX_UTIL.SET_AUTHENTICATION_RESULT(-666);
        RETURN FALSE;
    END IF;
END;

Documentation / Reference





Discover More
Oracle Apex Page Type
Oracle Apex - (Application) page

A page is the basic building block of an database application. Application pages share a common: session state and authentication. Individual pages are organized using containers called regions....
Oracle Apex Authorization Application
Oracle Apex - Authorization

While conditions control the rendering and processing of specific controls or components on a page, authorization schemes control user access. Authorization schemes use the identities established by...
Card Puncher Data Processing
Oracle Apex - Custom Authentication

Authentication Function Name: my_authentication PL/SQL Code: REQUESTApex URLPage processing section REQUESTApex URL“”page rendering session id To have proper redirection, the login function...
Card Puncher Data Processing
Oracle Apex - Public Navigation (Page and user)

The public navigation mechanism in Apex. A public navigation means that: the user is a public user (not authenticated), the target page is a public page in the current application This prerequisites...
Card Puncher Data Processing
Oracle Apex - Session (or application context)

A Session is created after : the authentication of a user the first visit of a public user with the zero session feature Each session is assigned a unique identifier. The Application Express...
Oracle Apex Session State Scope
Oracle Apex - Session state

Session state is a workspace that contains all variables with their values for one user. Session state can be maintained: Per session (to maintain session state per session). The session ID locate...
Oracle Apex Application Security Public User
Oracle Apex - User

A user in Apex. Once a user has been identified, the Application Express engine keeps track of each user by setting the value of the variable APP_USER. APP_USER...



Share this page:
Follow us:
Task Runner