Hey,
I need a possibility to validate the user credentials from APEX Login with the database accounts. Something similar to APEX_LDAP.AUTHENTICATE. I can't use the Database Accounts built-in authentication scheme, because I use a custom authentication scheme. The reason for the custom scheme is among other things that I'd like to offer a fallback authentication for my primary LDAP authentication. If that failed, I'd like to check the credentials against the database (so the user has two possibilities to authenticate and both will work).
Here is a code snippet from my custom user_auth function:
function user_auth(
p_username in varchar2,
p_password in varchar2)
return boolean
is
c_username dbms_id_128 not null:=p_username;
c_password dbms_id_128 not null:=p_password;
lv_is_authenticated boolean:=false;
begin
-- 1) try ldap
lv_is_authenticated:=apex_ldap.authenticate(p_username => c_username,
p_password => c_password,
p_search_base => '...',
p_host => '...');
-- 2) if failed try dbaccounts
if not lv_is_authenticated then
lv_is_authenticated:=NEED_HELP_FROM_ASK_TOM.DB_AUTHENTICATE(...);
end if;
return lv_is_authenticated;
end user_auth;Thanks for your help...