01.06.2013 Views

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

OpenEdge Development: Mobile Applications - Product ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

login( ) method<br />

username<br />

A string expression containing a user ID for the method to send to the Web server<br />

for authentication.<br />

password<br />

Note: The userName property returns the most recent value passed to this<br />

method for the current Session object.<br />

A string expression containing a password for the method to send to the Web<br />

server to authenticate the specified user.<br />

login-target<br />

A string expression that when appended to service-uri specifies a <strong>Mobile</strong> Web<br />

application resource against which the specified user is authenticated. If you do<br />

not specify a value for login-target, the value is set to "/static/home.html"<br />

by default.<br />

Note: The value returned by the loginTarget property of the Session object is<br />

either the value of the login-target parameter or the default<br />

("/static/home.html").<br />

When the method completes, it returns one of the following numeric constants to<br />

indicate the result:<br />

• progress.data.Session.SUCCESS — User login session started successfully.<br />

After you have downloaded JSDO catalogs using the addCatalog( ) method for<br />

supported <strong>Mobile</strong> services, you can create JSDOs for each <strong>Mobile</strong> resource<br />

provided by these services.<br />

• progress.data.Session.AUTHENTICATION_FAILURE — User login failed<br />

because of invalid user credentials (username or password).<br />

• progress.data.Session.GENERAL_FAILURE — User login failed because of a<br />

non-authentication failure.<br />

You can also return the result for the most recent login attempt on the current Session<br />

object by reading the loginResult property. For a more specific status code returned<br />

in the HTTP response, you can check the value of the loginHttpStatus property.<br />

The general Web server interaction with and response to this method depends on the<br />

authentication model that the Web server uses and how resources are accessed and<br />

protected. You configure the authentication model for each <strong>Mobile</strong> Web application<br />

deployed to the Apache Tomcat.<br />

228 <strong>OpenEdge</strong> ® <strong>Development</strong>: <strong>Mobile</strong> <strong>Applications</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!