3.7 LOGIN Procedure

This procedure authenticates the user in the current session.

Login processing has the following steps:

  1. Run authentication scheme's pre-authentication procedure.

  2. Run authentication scheme's authentication function to check the user credentials (p_username, p_password), returning TRUE on success.

  3. If result=true: run post-authentication procedure.

  4. If result=true: save username in session table.

  5. If result=true: set redirect url to deep link.

  6. If result=false: set redirect url to current page, with an error message in the notification_msg parameter.

  7. Log authentication result.

  8. Redirect.

Syntax

APEX_AUTHENTICATION.LOGIN ( 
    p_username IN VARCHAR2, 
    p_password IN VARCHAR2, 
    p_uppercase_username IN BOOLEAN DEFAULT TRUE ); 

Parameters

Table 3-4 APEX_AUTHENTICATION.LOGIN Procedure Parameters

Parameters Description

p_username

The user's name.

p_password

The user's password.

p_uppercase_username

If TRUE then p_username is converted to uppercase.

Example

This example passes user credentials, username and password, to the authentication scheme.

apex_authentication.login('JOE USER', 'mysecret');