Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Oracle Web Application Server
Russell Fray wrote:
> Is there a way of popping up a standard HTP authentication box, and
> then feeding this username and password to a pl/sql procedure which
> can then run a check against a table?
>
Yes, there is.
In order to do that, you can read the "custom authentication" paragraph
in the "Authentication and Security" section of the "using Pl/SQL
cartridge" chapter.
Here is what I did :
create or replace package OWA_INIT is
dbms_server_timezone constant varchar2(3) := 'PST';
dbms_server_gmtdiff constant number := NULL;
function authorize return boolean;
end;
create or replace package body owa_init is function authorize return boolean is
user_id varchar2(12); user_pwd varchar2(12); ok number; begin owa_sec.set_protection_realm('Enter your password'); user_id := owa_sec.get_user_id; user_pwd := owa_sec.get_password; HERE, YOU CAN PUT THE CODE OF YOUR AUTHENTICATION TEST WITH A RETURN VALUE : TRUE IF THE TEST SUCCEEDED, FALSE IF NOT. HERE IS THE EXAMPLE OF MY TEST : SELECT count(name) INTO ok FROM agecom.agent WHERE (blagent = UPPER(user_id) AND password = UPPER(user_pwd)); if (ok = 1) then return TRUE; else return FALSE; end if;
begin
owa_sec.set_authorization(OWA_SEC.GLOBAL); end;
/
show errors;
Hope this helps,
Zahi
--
Zahi Al-Jamous e-mail: aljamous_at_crv.pechiney.fr
Groupe GIL
Pechiney-CRV
BP 27 tel (work): +33.(0)4.76.57.82.45 F-38340 Voreppe tel (cell): +33.(0)6.14.55.16.88Received on Wed Jul 29 1998 - 06:31:11 CDT
![]() |
![]() |