I've found some posts about problems with getPrincipal() that returns null, but none of them seems to submit my problem.
Here is a description:
I'm using on client side: client.java with auth.conf
On Jboss side: an EBJ with "FEP" realm with jboss.xml
The authentication is successful if I enter the right user/password but what is I get:
In other words no principal is returned.
I have implemented my own ServerLoginModule in order to add some debug informations in commit() method, indeed I see that principal set is populated (on server side), but on client side the principal is also empty.
Any idea? (additionnal tests make me feel that Subject on client side and subject on server side are really two differents object). Am'i wrong?
Whatever I need to get principals and public credentials on client side for further processing.
JBoss 3.2.1 + Tomcat
Java HotSpot(TM) Server VM 1.4.1_01-b01,Sun
System: Windows 2000 5.0,x86
Thanks for help.
It seems that credentials and principals are not
sent from server to client.
You must authenticate on client side if you want such data, and you must authenticate on the server side if you want to use server protected resources.
In my *very special* case, only client authentication was required.