Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I access cookies from browser?

210640Jul 8 2009 — edited Jul 9 2009
Hi all,
I have apex application, which users will be accessing through SSL VPN access. The requirement is users should not have to login to the application. Application should check the login information from the cookies of SSL VPN, and authenticate if it is valid user.

I have a before header process to read the cookies in my custom login page as follow.
=======================
DECLARE
c OWA_COOKIE.cookie;
a wwv_flow_global.vc_arr2;

BEGIN

c := OWA_COOKIE.get('lastusername');
htp.p(c.num_vals);
a := htmldb_util.string_to_table(c.vals(1));
:P100_USERNAME := a(1);
:P100_PASSWORD := a(2);

--htp.p('test');
htp.p(:P100_USERNAME);

---- to test if user name is null -----
if :P100_USERNAME is null then
raise no_data_found;
end if;



----------------------------------------
IF :P100_PASSWORD IS NOT NULL THEN
wwv_flow_custom_auth_std.login(
P_UNAME => :P100_USERNAME,
P_PASSWORD => :P100_PASSWORD,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':1' -- go to Page Number 1
);
ELSE
htp.p('No USER READ !!!!');
END IF;

htp.p ('<p>'||'Application User name is '||:P100_USERNAME||'<br>'||'</p>') ;
EXCEPTION
WHEN OTHERS THEN
htp.p ( 'Error Reported '||SQLERRM);
END ;
=======================

I am getting "No data found" error. I can see the cookies in the browser, but I am not able to read it. Any advise?

Thanks
SHY
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 6 2009
Added on Jul 8 2009
7 comments
822 views