This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I want know how to check username/password combination belongs to a valid user or not against a DB(using JAAS) . If, on the other hand, different users have different roles, and the different roles enable access to different functionalities in the application, then how does JAAS help. Can anybody tell him the outline of how to write program for the above.
Hi , For authenticating the user u need to write "Callbackhandler" which will actually accept the username and password from user ,"LoginModule" which will comprise the actual authentication logic where u will establish the connection with the DB and authenticate the user against it. "configuration file" which will state the loginmodule u are using ,the DB root name, password, the path of driver for DB ... and so on.. U will also have a "LoginContext"... Actually its lots of stuff to explain which cannot be typed...
just go through this link and download the code... it will give u some idea ..