on 01-13-2014 3:23 PM
Hi Experts,
I am building a SAPUI5 application that will need to call several oData services, these services require to authenticate. I'm well aware that SAPUI5 provides a way to call this services with something like:
var oModel = new sap.ui.model.odata.ODataModel("http://myserver.com",true,"john","doe768.9");
However I do not want to hard code the user and pass in the js files.
Is there any way to call an oData Servlet from a servlet ? perhaps something similar to a Web Service client?
Thanks in advance.
True that you would never hardcode passwords in any production code.
Right way to authenticate is to use SSO, SAML or various authentication methods.
If you do not pass password, a pop-up would be thrown for the user to enter credentials and based on your settings you can get logon tickets as well for further calls.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Yalan,
I'm totally agree with Krishna. Only standard mechanism like SSO (Ticket, SAML, etc) or UWP (Us&Pwd) are standard scenarios. There's an option if you publish your SAPUI5 under SAP NW Portal, you could use User Mapping Mechanism & SSO with SAP Logon ticket.
You could also develop a custom token mechanism (Software token - Wikipedia, the free encyclopedia).
Kind regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Angel, Krishna thanx for replying,
User Mapping seems like a good idea since I want to allow multiple users to consume the oDatas without having to create X number of them in the gateway, so yeah I guess ill go with that. Just one more question my sapui5 app will be stored in portal and will need to call the odatas from gw do you guys know how to achieve that?
Hi again,
You could publish your Portal and GW under a web proxy like Web Dispatcher. If your portal and gateway shares the same domain, SSO Cookie, SAP Logon Ticket will be attached as a request cookie in GW calls.
Kind regards!
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.