Hi,
I can tell u how we set it up in our rich client environment. I dont know if
that is directly applicable for u, but I guess its better than nothing.
First of all, on the client side, u have to create a LoginContext, and login:
CallbackHandler cbhdl = new XXXCallbackHandler();
| LoginContext lctx = new LoginContext("JBossClientLogin", callbackHandler);
| try{
| lctx.login();
| }catch(LoginException exc){
| //...
| }
"JBossClientLogin" refers to an entry in a login configuration file. This file
has to be specified as a parameter to the jvm, at least in our case:
-Djava.security.auth.login.config="${workspace_loc:your_proj}\login.config"
Thats the argument string to the jvm, as we use it in eclipse.
The file itself looks like this:
JBossClientLogin {
| org.jboss.security.ClientLoginModule required;
| };
The callbackhandler referred to in the first excerpt, is the component, which
gathers the login information. This can be achieved by a dialog, or by cfg, or
whatever. JAAS supplies you with a bunch of ready-to-use callbackhandlers,
which should be sufficent for most scenarios.
(see javadoc of jaas, or:
http://java.sun.com/j2se/1.5.0/docs/guide/security/jaas/JAASRefGuide.html)
When login is called, the callbackhandler collects the needed information, an
provides them to the LoginModule defined in the login.config file. The JBoss
ClientLoginModule then simply copies the information to the application server,
where u are able to access it using getCallerPrincipal(), for example.
To enable authentification on the application server, until now no
authentication has been done, you have to define a security domain for your
enterprise beans. But thats another story.
hope I could help,
regards, milan wölke
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3928201#3928201
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3928201
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user