7.9 LOGIN Procedure
This procedure authenticates the user in the current session.
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), returningTRUEon success.
- If result=true: run post-authentication procedure.
- If result=true: save username in session table.
- If result=true: set redirect URL to deep link.
- If result=false: set redirect URL to current page, with an error message in the notification_msgparameter.
- Log authentication result.
- 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 TRUEthenp_usernameis converted to uppercase. | 
| p_set_persistent_auth | If TRUEthen 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');See Also:
Parent topic: APEX_AUTHENTICATION