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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Checksum in APEX URL generated outside of APEX session

Marko GorickiDec 1 2017 — edited Dec 1 2017

Hi,

is there a way to generate URL for calling APEX page with checksum at the end of the link if URL is generated outside of APEX?

If I call function like this one outside of APEX, checksum is not generated:

create or replace function f_get_apex_url

  return varchar2

is

begin

  return apex_util.prepare_url(p_url => 'f?p=100:1:0::::P1_ITEM:1'

                             , p_checksum_type => 'PUBLIC_BOOKMARK');

end;

/

I've noticed that by populating global variable (g_curr_flow_security_group_id) in wwv_flow_security  function works fine:create or replace function f_get_apex_url

create or replace function f_get_apex_url

  return varchar2

is

begin

  apex_050100.WWV_FLOW_SECURITY.G_CURR_FLOW_SECURITY_GROUP_ID := 1830663391033130;

  return apex_util.prepare_url(p_url => 'f?p=100:1:0::::P1_ITEM:1'

                    , p_checksum_type => 'PUBLIC_BOOKMARK');

end;

/

But, I don't like the fact that this function depends on current APEX version.

Thanks in advance!

Br,

Marko

Comments

fac586 Dec 1 2017 — edited on Dec 1 2017

Marko Goricki wrote:

is there a way to generate URL for calling APEX page with checksum at the end of the link if URL is generated outside of APEX?

If I call function like this one outside of APEX, checksum is not generated:

  1. createorreplacefunctionf_get_apex_url
  2. returnvarchar2
  3. is
  4. begin
  5. returnapex_util.prepare_url(p_url=>'f?p=100:1:0::::P1_ITEM:1'
  6. ,p_checksum_type=>'PUBLIC_BOOKMARK');
  7. end;
  8. /

I've noticed that by populating global variable (g_curr_flow_security_group_id) in wwv_flow_security function works fine:create or replace function f_get_apex_u

  1. createorreplacefunctionf_get_apex_url
  2. returnvarchar2
  3. is
  4. begin
  5. apex_050100.WWV_FLOW_SECURITY.G_CURR_FLOW_SECURITY_GROUP_ID:=1830663391033130;
  6. returnapex_util.prepare_url(p_url=>'f?p=100:1:0::::P1_ITEM:1'
  7. ,p_checksum_type=>'PUBLIC_BOOKMARK');
  8. end;
  9. /

But, I don't like the fact that this function depends on current APEX version.

There are documented, version-independent API methods for setting the security group ID:

Marko Goricki Dec 1 2017

Hi fac586,

thanks for quick answer.

I've tried to use set_security_group_id and as far as I know it sets wwv_flow_security.g_security_group_id global variable and not g_curr_flow_security_group_id which apparently is important for generating checksum.

I forgot to note that I've tested this on APEX 5.1.3.00.05.

Br,

Marko

1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Dec 29 2017
Added on Dec 1 2017
2 comments
5,798 views