Oracle's WDB_GATEWAY_LOGOUT does not work in mozilla browser

344 Views Asked by At

I have a PL/SQL application which has a log out button with following code being executed when log out button is clicked:

-- Open the HTTP header
owa_util.mime_header('text/html', FALSE, NULL);

-- Send a cookie to logout
owa_cookie.send('WDB_GATEWAY_LOGOUT', 'YES', path=>'/');

-- Close the HTTP header
owa_util.http_header_close;

-- Generate the page
htp.p('You have been logged off from the WEBSITE');
htp.p('<a href="http://myApp/pls" target="_blank">click here to log in</a>');
htp.p('<BR>bye');

It works perfect when using internet explorer, however when I use mozzila when I log back in I am still logged in as previous user. Has anyone else been in this situation? How can I make this work for mozilla as well?

I got this code from oracle documentation page: https://docs.oracle.com/cd/B13789_01/server.101/b12303/secure.htm

Thanks in advance!

1

There are 1 best solutions below

1
On

I've found it best to set and unset your own session cookie. Then use owa_custom to verify the cookie.

In the dad.config file add:

 PlsqlAuthenticationMode CustomOwa

Then create a package in your schema: called owa_custom and add one function inside: owa_custom.authorize

owa_custom.authorize will be called before each web invocation. You can check your session cookie and if you want to allow the web call return true. To block, return false and the user will get a 403 forbidden.

Then if you like you can write a custom 403 forbidden page and redirect to your login page.

Just know that in 12C, mod_plsql is going away and you'll need to use the Oracle Rest Listener. The same functionality exists there. Things just have different names.