jQuery in Action, 2nd edition*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "JAAS" Watch "JAAS" New topic
Author

JAAS

Arathi Raj
Ranch Hand

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

Thanks
Arathi
Mrunmai Halbe
Greenhorn

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 ..

http://www.javaworld.com/javaworld/jw-09-2002/jw-0913-jaas_p.html

[ UD: Fixed URL ]
[ May 02, 2006: Message edited by: Ulf Dittmer ]
 
wood burning stoves
 
subject: JAAS
 
Similar Threads
Using JDBC Realm tomcat authentication with java swing client
Implement JAAS in Struts
Auth and Auth using JAAS?
Tutorial
JAAS vs Jpassword