This discussion is archived
0 Replies Latest reply: Jan 22, 2013 9:20 AM by 755501 RSS

Authentication from DB table

755501 Newbie
Currently Being Moderated
I am calling APEX from another application via IFRAME and want to bypass the APEX login page (Page 101). I am passing the username and will validate the password from 1 of my existing DB tables. On the APEX login Page I created a Page Process (On-Load before header) with login logic (see code below). Do I need to create a custom Authentication scheme? Can I reference the P101_USERNAME value from the Authentication Scheme?



declare
l_username varchar2(255);
CURSOR get_LoginID is
SELECT A.LoginID
FROM teachers A, logins B
WHERE B.psid = v('PSID') and
B.userid = A.id;
begin
FOR x in get_LoginID LOOP
l_username := x.loginID;
END LOOP;
if l_username is not null then
-- Login to APEX
:P101_USERNAME := l_username;
wwv_flow_custom_auth_std.login(P_UNAME => :P101_USERNAME,
P_PASSWORD => '',
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':1');
end if;
:P101_PSAID := NULL;
exception
when others then
null;
end;

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points