This content has been marked as final.
Show 1 reply
-
1. Re: Changing the name of a Principal
blueknight May 29, 2003 2:24 PM (in response to blueknight)Puzzled and frustrated :-(
I managed in changing the principal by overriding the method getUsernameAndPassword().
protected String[] getUsernameAndPassword()
throws LoginException
{
String[] s = super.getUsernameAndPassword();
s[0] = getChangedPrincipalName(s[0]);
return s;
}
It *seemed* to work because the getIdentity() method now returns what I want.
protected Principal getIdentity()
{
Principal p = super.getIdentity();
log.info("********* " + p);
return p;
}
But both in servlets and ejbs the Principal is still "johnsmith". What am I doing wrong? :(