Re: Callback (JAAS)

2006-02-06 Thread Franck Borel

 According to the Tomcat User Guide, only two callbacks are supported:
 NameCallback and PasswordCallback. I have an app that has to have
 another call back: ClientCallback. In other words my login window looks
 like this: 
 
 Clietn : ||
 User:||
 Password:||

We had some similar problems and found out two possibilities to resolve
this problem:

1)Simple: Add your Clientnumber to the username like:
[EMAIL PROTECTED] You can split this string in your LoginModule --
username = ((NameCallbacl) callbacks[0].getName();

2)Complicate: Add functionalities to the JAASRealm. The only point we
found to put or to get information through JAAS is in the
JAASRealm-class. So we write our own JAASRealm.class by extending it. To
use your own JAASRealm-class change the entry in your server.xml--
Realm className = Path to your new JAASRealm. Though our problem was
a bit different, I think it can work for you to (try it :-)).

Hope this will help


--Franck





 I am hoping to use CMA and JAAS with my own custom LoginModule. 
 
 Can I configure Tomcat to support a thrid callback and still use CMA? 
 
 Stefan Baramov 
 Software Developer 
 TRX 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Callback (JAAS)

2006-02-03 Thread Stefan Baramov
According to the Tomcat User Guide, only two callbacks are supported:
NameCallback and PasswordCallback. I have an app that has to have
another call back: ClientCallback. In other words my login window looks
like this: 

Clietn : ||
User:||
Password:||

I am hoping to use CMA and JAAS with my own custom LoginModule. 

Can I configure Tomcat to support a thrid callback and still use CMA? 

Stefan Baramov 
Software Developer 
TRX 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]