we verify the users of our application (in Oracle Forms 11g) using internal oracle database authentication. The user enters the user id, password and connection description in the default logon screen provided by Oracle Forms 11g (screenshot attached). When the user presses the CONNECT button in which trigger should I place the function to verify password constraints such as min password length etc in Oracle Forms?
your inputs will be much appreciated
thx
None, I presume.
This looks like the built-in logon form. It is supposed to accept credentials and - if they are valid - let you in. If it is, though, your own form which is VERY similar to the former, then you'd use either WHEN-VALIDATE-ITEM
(on the password item) or the WHEN-BUTTON-PRESSED
trigger (on the CONNECT button).
Password policy should be enforced elsewhere, for example in a form you use to create users and passwords, or - even better - within the profile . Have a look at the CREATE PROFILE command that also explains password parameters, one of which is the PASSWORD_VERIFY_FUNCTION
you can use to enforce different conditions (such as minimum length, as you've said).
You may get username
, password
or connection_string
parameters' values for internal oracle database authentication screen by substituting them as argument of get_application_property
method.
ON-LOGON
and ON_ERROR
triggers at form level may be used for you to manage your task :
where ON-LOGON
's code text is :
declare
v_cnn varchar2(35):='myDB';
begin
:global.v_lng := 6 ;
:global.v_pwd := get_application_property(password);
if ( length(:global.v_pwd) > :global.v_lng ) then
logon('myschema',:global.v_pwd||'@'||v_cnn);
end if;
end;
ON-ERROR
's code text is :
begin
if DBMS_Error_Code = -1017 then
:global.v_pwd := get_application_property(password);
if ( length(:global.v_pwd) < :global.v_lng ) then
message('The length of the Password should be at least '||:global.v_lng||' characters !'); message('');
else
message(DBMS_Error_Text); message('');
end if;
end if;
end;
as an authentication example with certain minimum length for a schema's password.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.