log in with cookies [message #531895] |
Fri, 18 November 2011 05:59 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](//www.gravatar.com/avatar/5cf7be5c4e745affc032c49ce89cef88?s=64&d=mm&r=g) |
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 #533381 is a reply to message #531914] |
Tue, 29 November 2011 13:25 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
andrew again
Messages: 2577 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;
|
|
|