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!

Another apex_util.prepare_url question :)

SaraBFeb 10 2016 — edited Feb 17 2016

Hi

I know there have been loads of questions on getting apex_util.prepare_url to produce a checksum as I've read a whole bunch of them today! Of particular use was:

However, even working through this I've been unable to get apex_util.prepare_url to produce the correct checksum. My error now is:

The checksum computed on the request, clear cache, argument names, and argument values (DUMMY [31BAE179D0DAEAD409D0649064B90BF1] ) did not match the checksum passed into the show procedure (A3BFA0575ED970ACEA5AD27A91113D8A). Note: End users get a different error message.

I'm working in APEX 4.2.5 and I'm writing an integration which uses oAuth authentication. This means the user goes to a page in our application with a valid session, the oAuth process kicks in and redirects to a page on the 3rd party site, once the user has granted us access the 3rd party site redirects back to a url we've specified. This is a procedure in the database and using the state parameter it passes back information including the APEX session id and the page they were on when the oAuth process kicked in. This enables me to redirect the user back to the page they were previously on and using the same session id.

I've done this before, numerous times. However this time the page they are returning to has SSP enabled and I need to pass a request so I know they've come back from oAuth. The relevant bit of code in the procedure is:

    for i in (select workspace_id from apex_applications where application_id = 100) loop

      v_workspace_id := i.workspace_id;

    end loop;

    wwv_flow_api.set_security_group_id(v_workspace_id);

    apex_application.g_instance := r_state(2);

    apex_application.g_flow_id := 100;

    apex_application.g_flow_step_id := r_state(3);

    wwv_flow.show (

      p_flow_id => apex_application.g_flow_id,

      p_instance => apex_application.g_instance,

      p_request => 'FSP_SHOW_POPUPLOV'

    );

    wwv_flow.g_protected_page_ids(1) := r_state(3);

   

    v_redirect_url := apex_util.prepare_url(p_url=>'f?p=100:'||r_state(3)||':'||r_state(2)||':DUMMY:',p_checksum_type=>'SESSION');

r_state(2) is the users valid session id and r_state(3) is the page I need to get them back to.

Any ideas what's going wrong? My alternative is to redirect them to a different page without SSP enabled which then redirects them on, but that's feels like a bodge to me! And I'm sure I've just made a mistake somewhere...

Many thanks

Sara

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 16 2016
Added on Feb 10 2016
13 comments
3,154 views