For Current Version at Authentication
This is Version 5
Your WaveMaker Studio application can include a login page that requires users to sign on in order to gain access to the application. In order to set up user authentication you need set up a data source that stores your user IDs and passwords. You have the following options for storing this data:- You can use any database supported by WaveMaker Studio.
- You can use LDAP (Lightweight Directory Access Protocol).
- How to Set Up a Log In Page
- Using the Demo Data Source for Login Data
- Using a Database for Login Data
- Using LDAP for Login Data
- The Default Login Page
- The Security Service
How to Set Up a Log In Page
To set up a login page for your application, follow these steps:- Set up your data source.
- Run WaveMaker Studio and open your project.
Click the Security icon. The Security Editor appears.
- In the Data Source pull-down menu, select the type of data source you want to use. You can choose Database, LDAP or Demo. When you make your selection, the configuration editor for that data source appears at the bottom of the Security Editor (default is Demo).
- Make the appropriate selections for your data source in the configuration editor. This will depend on what type of data source you are using:
Using a Database for Login Data
Using LDAP for Login Data
Using the Demo Data Source for Login Data - Click to check the Authentication On check box. As you develop your application, you can use this check box to toggle the authentication on and off. That way, when you preview your application, you don't have to log in every time.
- Click the Save Configuration button. When you save a security configuration, WaveMaker Studio adds the security service and a default login page to your project.
- Save the project. The default login page (The Default Login Page) is now listed under Pages in the Dashboard. (You might need to refresh in order to see this page.)
- Preview the application. The default Login page appears. Try logging in.
Using the Demo Data Source for Login Data
The Demo data source provides a great design-time tool for authentication. With this data source you can quickly define a few usernames and passwords to use while creating and testing the login functionality for your application. Before you deploy your application, you should set up a more robust data source for authentication. To set up To set up authentication against a the Demo data source, click the Security tab and choose Demo for the Data Source type. The Demo Data Source configuration editor appears. To add a new user to the Demo data source:- Type the name in the Username field.
- Type the Password in the Password field.
- Click the Add button (plus sign).
- Select the user in the list.
- Click the Delete button (X).
Using a Database for Login Data
If you're using a database to store your authentication data, then you first need to import the database you plan to use. The database must include a table that provides a column for your user names and one for the passwords. The user names and passwords must be stored in the same table in the database. To set up authentication against a database, click the Security tab and choose Database for the Data Source type. You need to provide the following configuration information:| Property | Description |
|---|---|
| Data Model | The Data Model that contains the columns for the for username,password. Choose the Data Model from the pull-down menu. (You have toimport the database first. If you have imported the database and itdoes not appear in this list, try saving the project and refreshing thepage). |
| Entity | Select the table that contains the columns for the user names and passwords. |
| User Name Field | Select the column for the user (login) name. |
| Password Field | Select the column for the password. |
Using LDAP for Login Data
To set up authentication against a database, click the Security tab and choose LDAP for the Data Source type. You need to provide the following configuration information:| Property | Description |
|---|---|
| LDAP URL | This field specifies the host name and port number of the LDAP server. ldap://localhost:389/dc=wavemaker,dc=com |
| Manager DN | The DN for the account that you use to access LDAP. |
| Manager Password | The password for the account that you use to access LDAP. |
| User DN | PatternSets the pattern that WaveMaker Studio uses to create a DN for theuser. The pattern should be the name relative to the root DN. Thepattern argument {0} will contain the username. For example: "cn={0},ou=people" |
The Default Login Page
WaveMaker Studio provides a simple login page for you. Whenever you save an authentication configuration, WaveMaker Studio checks to see if you have a login page in your project. If you don't, WaveMaker Studio will add the default login page to the project. You can customize the login page, but do not rename it. If you do, WaveMaker Studio will not recognize it as the login page.The Security Service
When you create a security configuration for your project, WaveMaker Studio adds a Security Service to your project. The Security Service contains two operations:- getUserName: Use this operation to get the username of the current user. The operation takes no inputs and returns a string containing the userid of the user that is logged in on the current session.
- logout: Use this operation to log a user out. This operation takes no inputs. When you call it, it logs out the current user and terminates the session.
on 27/03/2010 at 15:43


