Home » Developer & Programmer » Application Express & MOD_PLSQL » log in with cookies
log in with cookies [message #531895] Fri, 18 November 2011 05:59 Go to next message
erics44
Messages: 18
Registered: November 2011
Location: Manchester, England
Junior Member
Hi
I want to use cookies to log into an apex application

does anyone know of any step by step guides (for idiots) on how to do this?

Thanks in advance
Re: log in with cookies [message #531914 is a reply to message #531895] Fri, 18 November 2011 07:39 Go to previous messageGo to next message
erics44
Messages: 18
Registered: November 2011
Location: Manchester, England
Junior Member
i solved this by organising the cook in a classic asp app and passing it through the url into apex Smile
Re: log in with cookies [message #533381 is a reply to message #531914] Tue, 29 November 2011 13:25 Go to previous message
andrew again
Messages: 2574
Registered: March 2000
Senior Member
Personally I'd avoid re-inventing Apex's solid authentication schemes, but setting/getting cookies is along these lines.

-- SET
owa_util.mime_header('text/html', FALSE);
owa_cookie.send(name=>'MY_COOKIE', value=>:P10_ITEM, path=>'/');
-- see https://forums.oracle.com/forums/forum.jspa?forumID=137 for this.
apex_application.g_unrecoverable_error := true;
owa_util.redirect_url('f?p=' || :APP_ID || ':' || :APP_PAGE_ID || ':' || :APP_SESSION);


-- GET
declare
   c owa_cookie.cookie;
begin
   c := owa_cookie.get('MY_COOKIE');
   :P10_ITEM := c.vals(1);

   -- debug
   -- htp.p('P10_ITEM='||:P10_ITEM);

   exception when no_data_found then null;

end;
Previous Topic: How to keep ID throughout wizard
Next Topic: Form Error
Goto Forum:
  


Current Time: Thu Jul 31 05:27:06 CDT 2014

Total time taken to generate the page: 0.05146 seconds