Manage JSDO login sessions
- Last Updated: September 14, 2022
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
The first task in accessing a Data Object resource with a JSDO is to create a
JSDO login session for the web application that provides the Data Object Service and resource
you need. You can create a JSDO login session by calling the getSession( ) method on an instance of one of the following OpenEdge JavaScript
classes:
- progress.data.JSDOSession class — (Recommended)
Supports asynchronous access only to a web server using jQuery Promises that are returned by
JSDOSessionmethods (such asisAuthorized( )) for registering callbacks to handle the results. Each instance of this class enforces access to a single web application that supports Data Object Services using the application's configured web server authentication model, as specified by options passed to the class constructor. This means that once created, a singleJSDOSessioninstance can be used to access only the web application for which it is created. Progress recommends that you use this class because it enforces the most typical web authentication pattern for a client app that accesses a web application. For client web apps, this includes the option to maintain an existing JSDO login session when the user initiates a page refresh on the browser page that is running the app.
Using an instance of the progress.data.JSDOSession class, the getSession( ) method takes any required user credentials as input
and establishes a login session once authenticated on the specified web application. You can
then create a JSDO based on the added catalog..
However, before invoking this login sequence, you need to gather some information, depending on the session class instance, to determine how best to configure and code it. You also might want to manage client app execution based on whether the login session and its connected Data Object Services are online and available over the network (session online status). You can do this for a JSDO login session with the help of a particular set of session events, methods, and properties.