Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 2 Component Reference : Authentication

Authentication
The following are the Authentication components available:
Login - interface for performing application login
Logout - interface for performing application logout
See the following subsections for more information.
Login
The Login component provides an interface for logging into a TIBCO iProcess Objects Server.
This component displays the Login dialog, which accepts the user’s credentials and allows the user to choose a server to log into.
The Login dialog contains the following fields:
User Name - A user must be established on the TIBCO iProcess Objects Server for the user to be able to login.
Password - A password may or may not be required, depending on how the TIBCO iProcess Objects Server has been configured.
Server - This field presents a drop-down list of available TIBCO iProcess Objects Servers. This list is obtained from the application’s config.xml file.
Required Data
None — The Login component does not require that any data be passed to it to be displayed, that is, it does not need to subscribe to an event of another component.
Properties
The Login component contains the following property:
 
Enables / disables the Remember User Id and Server next time I login check box, which allows users to persist their user name (User Id field) and the TIBCO iProcess Objects Server they chose from the Server drop-down list.
Events
The Login component publishes the following event:
 
Logout
The Logout component provides an interface for logging out of a TIBCO iProcess Objects Server.
This component displays a single toolbar button that allows the user to log out of the application / server.
Required Data
The Logout component requires a user name and iProcess Objects Server name to log the user out of the server. This component should subscribe to the “Login Complete” event on the Login component.
Properties
None.
Events
The Logout component publishes the following event:
 
Login / Logout APIs
The Login and Logout components can be directly instantiated without adding the GUI component to an application prototype file.
The following tables show the methods that can be used to provide access to setting names and performing the login and logout actions available with these objects.
 
setName(name)
name <string> - The component name.
name <string> - The component model name.
name <string> - The prototype model name.
 
Table 2 Login Methods
doLogin(app,
                username,
                password,
                servername,
                computername,
                ipaddress,
                tcpport,
                name,
               director)
app <com.tibco.bpm.wcc.Application> - The application instance.
username<string> - The user's ID.
password <string> - The password.
servername <string> - The displayNodeName value to lookup in config.xml that defines the server node nodeCtx values. If null, the remainder of the parameters need to be specified, otherwise, they are optional.
computername <string> - The iProcess Objects Server name. (optional)
ipaddress <string> - The iProcess Objects Server IP address. (optional)
tcpport <string> - The iProcess Objects Server TCP port.
name <string> - The iProcess Objects Server node name.
director <boolean> - Is server a director?
app <com.tibco.bpm.wcc.Application> - The application instance.
Login Example
This example shows how a direct login could be made using the doLogin method. In this example, the wcc.Login instance could have been added using the appMain prototype (with paintable = jsx3.Boolean.FALSE) or created directly as shown. This sample might be added to the postLoadInit() method defined in:

 
// Test doLogin at application load. Timeout call is used to allow
// the appMain prototype to load. If login found in prototype, then
// it is used, else an instance is created.
var app = this;
window.setTimeout(function(){
var login = jsx3.GO('wccLogin');
if (! login) {
login = new com.tibco.bpm.wcc.Login();
// Allow the prototypeModelName to be specified for a
// component so that if it is not added to the DOM, this
// value is directly specified. For example, wcc.Login can
// be instantiated without a GUI component to call doLogin.
// This requires that prototypeModelName is set directly.
login.setPrototypeModelName('wccPrototype');
login.setName('wccLogin');
login.setCompModelName('wccLogin');
}
        else{
           //Set login.paintable=false -- you are performing direct login
        login.paintable=false;
        }
login.doLogin(app, 'username', 'password', 'iProcess Node servername');
}, 100);
 
*/

 
 
Table 3 Logout Method
Logs the current user out of an iProcess Objects Server. It publishes the logoutRequest event before processing the logout request.
Logout Example
To use the Logout component directly as an object and not as a GUI component:
Create the wcc.Logout instance.
Set the app property to the current application instance.
Call the doLogout() method.
Call the postLogoutComplete() method.
Note that no subscription is set up for logoutComplete to call this.

 
var logout = new com.tibco.bpm.wcc.Logout();
var appNameSpace = 'wccAppNew';
var ipcApp = com.tibco.bpm.ipc.apps[appNameSpace];
// Note: The app value needs to be set on logout if used directly.
logout.app = ipcApp;
logout.doLogout();
logout.postLogoutComplete();

 

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved