Jose, thanks for your reply.
we would actually like to use the ProgrammaticLogin (as described in
http://blogbysud.blogspot.com/2007/10/programmatic-login-to-authenticate.html)
, but instead of supplying the VM argument
-Djava.security.auth.login.config=/appclientlogin.conf and the
appclientlogin.conf as a separate file, we would like to supply the
information contained in the config file from within our Java code.
how does ProgrammaticLogin get the information contained in
appclientlogin.conf and how could that information be supplied from
within java code?
Kind regards,
- Andreas Kozma
www.ansis.com
On Jun 4, 2009, at 11:18 , Jose Alvarez de Lara wrote:
> 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>
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.