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.
The moose likes Security and the fly likes JAAS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Engineering » Security
Bookmark "JAAS" Watch "JAAS" New topic


Arathi Raj
Ranch Hand

Joined: Nov 22, 2002
Posts: 90
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.

Mrunmai Halbe

Joined: Apr 24, 2006
Posts: 4
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 ..

[ UD: Fixed URL ]
[ May 02, 2006: Message edited by: Ulf Dittmer ]
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: JAAS
It's not a secret anymore!