10.8 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
| 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.
BEGIN
apex_authentication.login (
p_username => 'JOE USER',
p_password => 'mysecret' );
END;See Also:
Parent topic: APEX_AUTHENTICATION