Pages

Monday, 4 August 2014

Configuring authentication using remote server in ADF Mobile

Usecase:
This usecase shows how basic authentication can be configured using a remote login server in ADF Mobile.

Pre-requisites:
JDeveloper 11.1.2.4.0.
For Jdeveloper 12.1.3.0.0, check Updates section below.

Steps:
1) Create a new ADF Fusion application.
2) Create a jspx page in the ViewController project. Go to the menu item: Application -> Secure -> Configure ADF Security. Select ADF Authentication. Select HTTP Basic Authentication. Keep the defaults and select 'Redirect upon successful authentication' and click 'Generate Default'. Finish the wizard. Deploy the app or run the page in the integrated server and note down the URL.
3) Create a new ADF Mobile application. Create two new features in it. Let us secure one feature, feature1 and leave the other feature, feature2 unsecure. Create AMX pages for this feature with some basic text content such as hello.
In adfmf-feature.xml, select feature1. Go to Security tab. Select 'Enable Feature Security'. Select Credential Authentication as 'remote'.



4) Go to adfmf-application.xml under Application Resources -> Descriptors -> ADF META-INF. Go to the Security tab and add a new Application Login Server. In the dialog for 'Edit ADF Mobile Login Connection', provide the Login URL and Logout URL as the URL generated in step 2. Remember to use IP address instead of localhost. Also, add a cookie 'JSESSIONID'. Test Connection to ensure the connection is fine. Close the wizard.

5) Deploy the app to an emulator/device.
A login screen as shown below will be seen. On entering the user credentials, the feature gets rendered.

References:
http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/security.htm#CDDGDFGJ

Updates:
For 12.1.3.0.0 with MAF, the configuration is a bit different. Follow steps 1 and 2 as mentioned for 11.1.2.4 above. To enable security for a feature in MAF, do the following:



Go to maf-application.xml under Application Resources -> Descriptors -> ADF META-INF. Go to the Security tab and add a new Application Login Server. In the dialog for 'Create MAF Login Connection', select Connection mode as 'Remote' and provide connection name. Uncheck the two checkboxes. In HTTP Basic tab, provide URL of the secured ADF app(use IP address).

                 

Deploy the app.

3 comments:

  1. Thanks , I've just been looking for info about
    this subject for a long time and yours is the greatest I've discovered so
    far. But, what about the bottom line? Are you positive concerning the supply?


    Look into my site :: ssd dedicated server

    ReplyDelete
    Replies
    1. Glad you found it useful. Well, the approach mentioned in this post is one of the many approaches available to secure an app/feature in ADF Mobile.
      I am not sure what you are looking for, but, if you are looking for alternatives, the below link might help: http://docs.oracle.com/cd/E37975_01/doc.111240/e24475/security.htm#ADFMF1024.
      Hope it helps!!

      Delete
  2. Hello, I read your blog regularly. Your writing style is witty, keep doing what you'redoing!


    Feel free to visit my wesite wooden bowls - ,

    ReplyDelete