Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAAS

 
Arathi Raj
Ranch Hand
Posts: 90
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic