title: SAPUI5 and Logon Tokens/SSO?
body: <p>I'm getting started with <a href="http://allthatjs.com/2012/02/23/getting-started-with-sapui5/" rel="nofollow">SAP's SAPUI5 framework</a>, 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:</p>
  
  <pre><code>// 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)
  </code></pre>
  
  <p>Even when I look at the ODataModel.js file provided in the <a href="http://www.sdn.sap.com/irj/sdn/sap-technology-innovation?rid=/webcontent/uuid/20a34ae7-762d-2f10-c994-db2e898d5f70" rel="nofollow">SDK</a>, the constructor does not take logon tokens:</p>
  
  <pre><code>/**
   * 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
   */
  </code></pre>
  
  <p>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.</p>