Hello All,
I'm using JNDIRealm to authenticate users and it's working well. In my java code, I need to retrieve roles associated with the authenticated user. Here is a sample of this code :
Subject s = Subject.getSubject((AccessControlContext)System.getSecurityManager().getSecurityContext()); Principal p = (Principal)s.getPrincipals().toArray()[0];
The API only allows me to retrieve, on the Principal, the name (with the getName accessor) of the user, not associated roles. Nevertheless, when running the code in a debugger, the state of the Principal object seems containing all needed informations (name, password, realm, roles).
Is there a (standard) way to retrieve these additional information ? Or should I develop my own LDAP Realm (JAAS module) and extend the Principal interface to add role notions ?
Any help would be appreciated...
RP
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]