ejb@glassfish.java.net

Re: ProgrammaticLogin without login configuration file - how can it be done programmatically?

From: Jose Alvarez de Lara <dakhla.0563_at_hotmail.com>
Date: Thu, 4 Jun 2009 11:18:09 +0200

I am not sure about what you are meaning, but there is a way to save users and roles. Just create two tables in your database, USER and ROLE and relate the tables. You can log in by testing user and pass exist in your table USER and try the corresponding role in the table ROLE. Later maintain a session with a JavaBean. This is another way to do it avoiding the needed of a your appclientloging.conf and you leave the server without that heavy work.

 

Best Regards,
Jose Alvarez de Lara


From: Andreas Kozma
Sent: Thursday, June 04, 2009 10:47 AM
To: ejb_at_glassfish.dev.java.net
Subject: ProgrammaticLogin without login configuration file - how can it be done programmatically?


Hi!


We have a java standalone client that successfully connects to EJBs on our Glassfish v2.1 server using ProgrammaticLogin.

However, having to specify


-Djava.security.auth.login.config=...path.../glassfish/lib/appclient/appclientlogin.conf


is very tedious, as we need to do it manually for every unit test we run (we have many). Is there a way to supply the login configuration contained in appclientlogin.conf in our java code?


We have found posts on how to do it LoginContext, but we didn't find a way to add it to ProgrammaticLogin.




Thanks for your help!



Kind regards,


- Andreas Kozma
www.ansis.com

 







ansis_logo.gif
(image/gif attachment: ansis_logo.gif)