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

Form-based authenticator

The form-based authenticator presents a login form to the user. The login form must contain fields named j_username and j_password, and the submit action must be j_security_check. If the login fails, the user is redirected to an error page.


Class Name


Parameters

Parameter Description
login-page Path to the login page, relative to the web application context under the conf directory. A sample login.html file is provided under this directory when creating a Worklight project in the Worklight Studio.

The authenticator passes to the login page error messages. To display the error message, use the placeholder ${errorMessage} within the login page.

auth-redirect If the login form is not stored locally in the web application, provide a URL to the login page in this parameter. WL server uses redirect to pass the login to the external domain. This parameter cannot be used together with the login-page parameter.

<realm name="AppAuthRealm" 
       loginModule="DatabaseLoginModule">

    <className> com.worklight.core.auth.ext.FormBasedAuthenticator </className>
    <parameter name="login-page" value="login.html" />

</realm>


Parent Authentication configuration





+

Search Tips   |   Advanced Search