Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
IBM Worklight Mobile Application Development Essentials

You're reading from  IBM Worklight Mobile Application Development Essentials

Product type Book
Published in Feb 2014
Publisher
ISBN-13 9781782177609
Pages 144 pages
Edition 1st Edition
Languages

Form-based authentication


Form-based authentication is similar to a web application in which the users have to fill out a login form in order to access a secured or protected resource. Worklight provides a similar authentication mechanism in which the server returns the HTML of a login form whenever an application tries to access a protected resource.

The Worklight application that uses form-based authentication must use a login module to validate the received credentials.

Security realm

Declare the security realm with the name myFormBasedAppRealm as follows:

<realm name="myFormBasedAppRealm" loginModule="myFormBasedAppLoginModule">
  <className>com.worklight.core.auth.ext.FormBasedAuthenticator</className>
</realm>

The login module

Now define the login module with the name myFormBasedAppLoginModule as we used the same for the loginModule attribute value to define the realm:

<loginModule name="myFormBasedAppLoginModule">
  <className>com.worklight.core.auth...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}