7.9 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
    p_set_persistent_auth   IN BOOLEAN  DEFAULT FALSE ); 

Parameters

Table 7-4 LOGIN 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.
p_set_persistent_auth If TRUE then persistent authentication cookie is set. Persistent authentication needs to be enabled on instance level.

Example

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

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