Dear All,

Objective: This blog gives an understanding about how can an SMP HWC based app can be authenticated with SAP username and password.

Tools Required: SUP 2.2.x, SMP 2.3.x

Procedure:

SCC Configuration:


  1. Open SAP Control Center (Sybase Control Center), Create a new security profile
    • Security>New>Give some name

      

               secHWCAuth.PNG

2.   Expand Security tab in the left hand side and select new created security profile name “HWCAuth”

    • Go to Authentication tab. Click “New
    • Select Authentication provider as HTTPAuthenticationLoginModule
    • Make Control flag as Required
    • Add the URL of SAP system (You can check this blog to know how to check URL: How to check SAP system URL?)
    • SSO cookie name: MYSAPSSO2

               secSettings.PNG


    • Press OK
    • Delete NoSecLoginModule from the list
    • Similarly delete NoSecAuthorizer from Authorization tab and NoSecAttributer from Attribution tab
    • General tab > Apply


3.   If you want to create a new domain, you can do so. Domains>New>Give some name

    • Add newly created Sec configuration to this domain
    • Finish it

          Domain.PNG


4. Registering a user in SCC:


  • Make sure you select the settings as mentioned in the screen:

  

          SCCRegistration.PNG



MBO Modeling and Deploying to SMP server:


5. Assuming you have successfully made SAP and SUP connection profiles in the mobile workspace.

6. While creating an MBO ,select Runtime Data Source Credential and Connection properties

7. From the drop down, select username and password (as shown in the diagram)

Some points for Runtime Data Source Credential and Connection properties :

  • Here user name and password will act as runtime inputs to the MBO.
  • Does not support MBO’s that belong to a cache group that uses a Scheduled cache policy.

                         RuntimeCredentials.PNG

  8.  Deploy MBO to newly created domain and sec configuration.

   

               DeployingDomain.PNG

Creating UI screen:

9. Right click project> New>hybrid App designer> give some name

10. Select Starting points as mentioned in below diagram

               HybridAppDesigner.PNG

11. This is how Flow Design look like. If you open Credential Request screen, you will find two inputs already been defined as username and password.

FlowDesign.PNG

12. For easy UI development, i have dragged and dropped MBO to create 2 more screens. BAPIMBO, BAPIMBODetail

          screens.PNG

13. Go to start screen, add a new input field and add a menu to retrieve the data from backend.

     UILogic.PNG

14. Assign the workflow app to user from workspace.


          AssigningUser.PNG



Simulator settings and screen flow:


15. Make sure you have provided all settings in HWC container and user has been registered successfully.

          HWCsettings.PNG



16. This is how the application home page looks like:


     screens.PNG



Note: If you enter wrong credentials and press “SAVE” and call mbo, it will not move to next screen and you will see credentials screen again and again until you pass correct id and password.


I hope this write-up will help you to understand how to use HTTPAuthenticationLoginModule in SMP HWC based apps.

Your comments/suggestions are most welcome.


Rgrds,

Jitendra

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

  1. Abdul Basit

    Hi,

    I am using a webservice for user Authentication that return Success/Error. I have followed these steps but still not get any output.

    Appreciate your help and support.

    (0) 

Leave a Reply