58.144 STRONG_PASSWORD_VALIDATION Function
This function returns formatted HTML in a VARCHAR2 result based on whether a proposed password meets the password strength requirements as defined by the Oracle APEX site administrator.
Syntax
APEX_UTIL.STRONG_PASSWORD_VALIDATION (
p_username IN VARCHAR2,
p_password IN VARCHAR2,
p_old_password IN VARCHAR2 DEFAULT NULL,
p_workspace_name IN VARCHAR2 )
RETURN VARCHAR2;
Parameters
Table 58-104 STRONG_PASSWORD_VALIDATION Parameters
Parameter | Description |
---|---|
p_username |
Username that identifies the account in the current workspace. |
p_password |
Password to be checked against password strength rules. |
p_old_password |
Current password for the account. Used only to enforce "new password must differ from old" rule. |
p_workspace_name |
Current workspace name, used only to enforce "password must not contain workspace name" rule. |
Example
The following example checks the new password foo
for the user SOMEBODY
meets all the password strength requirements defined by the APEX site administrator. If any of the checks fail, then the example outputs formatted HTML showing details of where the new password fails to meet requirements.
DECLARE
l_username varchar2(30);
l_password varchar2(30);
l_old_password varchar2(30);
l_workspace_name varchar2(30);
BEGIN
l_username := 'SOMEBODY';
l_password := 'foo';
l_old_password := 'foo';
l_workspace_name := 'XYX_WS';
HTP.P(APEX_UTIL.STRONG_PASSWORD_VALIDATION(
p_username => l_username,
p_password => l_password,
p_old_password => l_old_password,
p_workspace_name => l_workspace_name));
END;
Parent topic: APEX_UTIL