I'm getting started with SAP's SAPUI5 framework, and I am trying to get single sign on to work with logon tokens (MYSAPSSO2), but I don't see anywhere that I can fetch a token or attach a token to an OData HTTP request. The example in the blog post I linked to above employs username/password but doesn't use a token:
// Specify the SAP Gateway SalesOrder service as an OData model
var salesOrderService =
"https://gw.esworkplace.sap.com/sap/opu/sdata/IWFND/SALESORDER",
// The SalesOrder service requires authentication
// get the username/password from the SDN page.
username = "[username]",
password = "[password]",
// SAP Gateway only supports XML, so don't use JSON
asJson = false,
salesOrderModel = new ODataModel(salesOrderService, asJson, username, password)
Even when I look at the ODataModel.js file provided in the SDK, the constructor does not take logon tokens:
/**
* Constructor for a new ODataModel.
*
* @param {string} sServiceUrl required - base uri of the service to request data from
* @param {string} [bJSON] (optional) true to request data as JSON
* @param {string} [sUser] (optional) user
* @param {string} [sPassword] (optional) password
*
* @class
* Model implementation for oData format
*
* @extends sap.ui.model.Model
*
* @author SAP AG
* @version 1.2.0
*
* @constructor
* @public
*/
I'm curious (though since it's new, I wouldn't be surprised if nobody had even heard of this yet) if anyone has any experience with SSO/MYSAPSSO2 logon tokens with SAPUI5.