OpenEdge Development: Mobile Applications - Product ...
OpenEdge Development: Mobile Applications - Product ...
OpenEdge Development: Mobile Applications - Product ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Managing user login sessions<br />
Managing user login sessions<br />
The first task in accessing a <strong>Mobile</strong> resource with a JSDO is to create a user login<br />
session for the <strong>Mobile</strong> Web application that provides the <strong>Mobile</strong> service and resource<br />
you need. This might require user authentication prior to calling the login( ) method<br />
on an instance of the <strong>OpenEdge</strong> JavaScript class, progress.data.Session. Once<br />
user authorization is obtained, you must then call the addCatalog( ) method on this<br />
Session object to load the JSDO catalog for the service into your <strong>Mobile</strong> App. You can<br />
then create a JSDO for a <strong>Mobile</strong> resource defined in the catalog.<br />
However, you need to gather some information to determine how best to configure and<br />
code the user login sequence.<br />
Requirements for creating a user login session<br />
You need to identify the following information to configure and code a user login<br />
session:<br />
• The Web server authentication model that the <strong>Mobile</strong> Web application will<br />
use:<br />
Web servers support a number of authentication models to manage client access<br />
to Web resources. <strong>OpenEdge</strong> <strong>Mobile</strong> supports the following authentication<br />
models:<br />
– Anonymous — No authentication is required. This is the default value.<br />
– HTTP Basic Authentication — The <strong>Mobile</strong> Web application requires a valid<br />
user ID and password, but does not provide a page containing a login form<br />
(credentials are typically entered in a generic login dialog provided by either<br />
the <strong>Mobile</strong> App, the Web browser, or the native device container in which the<br />
App is running).<br />
– HTTP Forms Authentication — The <strong>Mobile</strong> Web application requires a valid<br />
user ID and password and provides a page containing a login form.<br />
The exact user login sequence depends on the Web server authentication model,<br />
the <strong>Mobile</strong> App type and platform, and how <strong>Mobile</strong> Web application resources are<br />
protected on the Web server. Because of this, differences in platform behavior can<br />
cause problems with reliable access to <strong>Mobile</strong> resources. To minimize the<br />
chances of such access problems, you must know the Web server authentication<br />
model to be configured for the <strong>Mobile</strong> Web application and set the<br />
authenticationModel property on the Session object accordingly. For more<br />
information on Web server authentication models and <strong>OpenEdge</strong> <strong>Mobile</strong>, see the<br />
sections on security considerations in Chapter 5, “Deploying <strong>Mobile</strong> <strong>Applications</strong>.”<br />
<strong>OpenEdge</strong> ® <strong>Development</strong>: <strong>Mobile</strong> <strong>Applications</strong> 117