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

JAAS- "No LoginModule found for ur jaas_configinfo!"  RSS feed

 
Mrunmai Halbe
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
PLZ help me out...
I have implemented an authentication code using JAAS.The login form is written as .JSP and have used MySQL as database.
The problem is when I run the code I get an error "No LoginModule found for jaas_configinfo" were "jaas_configinfo" is the module written in my configuration file which is as follows...

jaas_configinfo {
com.user.jaas_rdbms.authenticate.MyLoginModule Required debug="true" url= "jdbc:mysql://localhost:3306/userinfo?user=root&password=mrunmai" driver="com.mysql.jdbc.Driver";
};



and my JSP page is accepting the username and password from user and the related code is as follows...


try {
// Get the form's username & password fields
//
LoginContext lc= null;
String user = request.getParameter("username_text");
String pass = request.getParameter("password_text");

// Using the username/password to initialize the
// callback handler and then do the authentication.
//

MyCallbackhandler mcbh= new MyCallbackhandler(user,pass);
lc = new LoginContext("jaas_configinfo", mcbh);
lc.login();
.
.
.
when it comes to the line "lc=new LoginContext("jaas_congiginfo",mcbh);"
the exception "No LoginModule found for ur jaas_configinfo!" is generated..

I am using WSAD as the app. server and passing
"-Djava.security.auth.login.config=jaas_rdbms.config" as
Java VM arguments in the Environment Options of the Web-Server.

Don't understand whats wrong with that..
Plz help me out..

Thanks in advance ,
Mrunmai
 
Awais Bajwa
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mrunmai,
Where did you place your jaas configuration file? make sure that it is in the WebSphere runtime's classpath.

Regards
Awais Bajwa
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!