Hey all - apologies if this has already been asked, but there isn't a good way to search the new forums. In short, I'm trying to set a cookie in a custom authentication scheme, but the cookie isn't getting set.
My custom authentication scheme has one setting:
Authentication Function Name = test_login
And test_login is:
create or replace function test_login(p_username in varchar2, p_password in varchar2) return boolean is
begin
if lower(p_username) = 'test' then
htp.init;
owa_util.mime_header('text/html', FALSE);
owa_cookie.send(
name => 'APEX_JWT',
value => 'test',
expires => sysdate+1,
path => '/',
domain => NULL,
secure => NULL,
httponly => 'Y');
return true;
else
htp.init;
owa_util.mime_header('text/html', FALSE);
owa_cookie.send(
name => 'APEX_JWT',
value => null,
expires => sysdate-1,
path => '/',
domain => NULL,
secure => NULL,
httponly => 'Y');
return false;
end if;
end;
/
So if I login with username = 'test,' the cookie should be set, otherwise it should be cleared. The cookie is never set.
Any idea what I'm doing wrong? I'm basing this off of https://blogs.oracle.com/oraclemagazine/post/creating-custom-authentication
Thanks
Rob