This discussion is archived
4 Replies Latest reply: Sep 19, 2012 4:31 AM by steph0h RSS

integrate apex login in non-apex site

steph0h Newbie
Currently Being Moderated
Hi,

What are the possibilities to integrate the login to apex into a non-apex web-site?

The company I work for is developing a new web-site (PHP I suppose), and the login to the apex appliciation should be integrated with this site, i.e. on this page there should be a login-region complete with username/password/login-button which forwards to apex. Any ideas?

Thanks,
Stephan
  • 1. Re: integrate apex login in non-apex site
    Hari_639 Guru
    Currently Being Moderated
    Hello Stephan,

    There is a [url http://www.oracle.com/technetwork/developer-tools/apex/apex-ebs-wp-cabot-consulting-169064.pdf]whitepaper explaining integration of APEX & EBS. However, the technique is generic and can be used to integrate APEX with any other system.

    Please check and let me know if you have any specific queries.

    Regards,
    Hari
  • 2. Re: integrate apex login in non-apex site
    steph0h Newbie
    Currently Being Moderated
    Hello Hari,

    Thanks for your feedback!
    As far as I gathered from your whitepaper a change of the authentication scheme would be necessary. Currently I'm using "Application Express Accounts" and I would like to keep it that way, meaning I would like to leave the user management to APEX.
    Another thing mentioned in your whitepaper is passing username and password via a custom cookie. Is it possible to set a cookie to enable automatic login to APEX? How can I achieve this?

    Many thanks,
    Stephan
  • 3. Re: integrate apex login in non-apex site
    Hari_639 Guru
    Currently Being Moderated
    Hello Stephan,

    It's not my whitepaper. It's by Rod West, Cabot Consulting.
    The company I work for is developing a new web-site (PHP I suppose), and the login to the apex appliciation should be integrated with this site, i.e. on this page there should be a >login-region complete with username/password/login-button which forwards to apex. Any ideas?
    Another thing mentioned in your whitepaper is passing username and password via a custom cookie. Is it possible to set a cookie to enable automatic login to APEX? How can I >achieve this?
    When user enters username and password, then these details you can send to APEX via a cookie. You can create custom cookie using [url http://www.dba-oracle.com/t_easy_html_db_owa_cookie.htm]OWA_COOKIE package. And make sure you [url http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_crypto.htm#i1002112]Encrypt both the username and password.
    Currently I'm using "Application Express Accounts" and I would like to keep it that way, meaning I would like to leave the user management to APEX.
    You can still use APEX Authentication Scheme. The moment user clicks on login page in your php application.. then

    <li> Write encrypted username and password into custom cookie
    <li> Redirect to APEX log-in page
    <li> In APEX login page, create a "On Load Before Header" Process which will do the following
    /* This is psuedo code */
    :P101_USERNAME := get_decrypted_username_from_cookie;
    IF :P101_USERNAME IS NOT NULL THEN -- coming from PHP application
     :P101_PASSWORD := get_decrypted_password_from_cookie;
     /* Call APEX Log-in Procedure */
    APEX_CUSTOM_AUTH.login(
    P_UNAME => :P101_USERNAME,
    P_PASSWORD => :P101_PASSWORD,
    P_SESSION_ID => v('APP_SESSION'),
    P_APP_PAGE => :APP_ID||':1'
    );
    END IF;
    I have not tested this. But this should work. Please update how it goes.

    Regards,
    Hari
  • 4. Re: integrate apex login in non-apex site
    steph0h Newbie
    Currently Being Moderated
    Hello,

    Sorry, I thought, you were the author ;-)

    Well thank you, this seems to be a viable way to achieve what I want. I'll keep you updated on the progress of this.

    kind regards,
    Stephan

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points