Hello Everybody,
I'm a JavaEE newbie and I've just begun studying authentication
mechanisms for securing EJBs. I'm trying the container-based security,
and I followed what is described in the article that can be found at
http://www.packtpub.com/article/ejb-3-security.
In the section "Authenticating an EJB Application Client" it is
reported that if in the file sun-ejb-jar.xml it is specified
<as-context>
<auth-method>USERNAME_PASSWORD</auth-method>
....
</as-context>
when an InitialContext.lookup() is invoked a "basic" default login
frame is displayed, so that the user can insert username and password.
Ok, it works (of course!). But I'd like to obtain a different
behaviour: I assume that I already have username and password when I
call the lookup (i.e., because user as already inserted these data
before through my "beautiful" login form :)) so I don't want the
default login form to be displayed.
I'd like to send username and password from the code, may be through
the Context.
I tried to set the context properties (SECURITY_PRINCIPAL <- username,
SECURITY_CREDENTIALS <- password) but the default login frame is still
diplayed
What do I need to do?
Thanks in advance for your precious suggestions.
Kind regards,
Max

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Java 
EE (J2EE) Programming with Passion!" group.
To post to this group, send email to 
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to 
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to