Once you have retrieved the user name from the Subject
you're going to have to issue an LDAP query to get the extra information. It will look something like the following:
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
properties.put(Context.PROVIDER_URL, "LDAP://yourldap:389");
properties.put(Context.SECURITY_PRINCIPAL, ldapqueryuser + "@yourldap");
properties.put(Context.SECURITY_CREDENTIALS, ldapqueryuserpassword);
// initializing active directory LDAP connection
dirContext = new InitialDirContext(properties);
dirContext.search(name, filter, cons)
These examples are pretty thorough:
http://docs.oracle.com/javase/jndi/tutorial/getStarted/examples/directory.html http://myjeeva.com/querying-active-directory-using-java.html
The java doc for InitialDirContext is here:
http://docs.oracle.com/javase/7/docs/api/javax/naming/directory/InitialDirContext.html