IBM Worklight v5.0.5 > Develop IBM Worklight applications > Authentication configuration

Database login module

The database login module verifies the user name and password by executing an SQL query.


Class Name


Parameters

Parameter Description
dsJndiName JNDI name of the data source.
principalsQuery SQL query text...

    SELECT UserID, Password, DisplayName FROM UsersTable WHERE UserID=?

<loginModule name="MyDatabase" 
             canBeResourceLogin="true" 
             isIdentityAssociationKey="true">

    <className> com.worklight.core.auth.ext.RDBMSLoginModule </className>

    <parameter name="dsJndiName" value="java:/MyDS"/>
    
    <parameter name="principalsQuery">
        SELECT userid, 
               password, 
               concat(firstName, ' ', lastName) as display_name 
               FROM users 
               WHERE userid=?
    </parameter>
    
    </loginModule>


Parent Authentication configuration