This content has been marked as final. Show 3 replies
I am also running into the same problem. It's referenced the oracle 10g documentation to use weblogic.security.SubjectUtils but the class does not exist in the weblogic 10.3 directory. I have scanned through the weblogic 10.3 libraries using eclipse and its just not there. It is also not on the Weblogic 10.3 API.
What gives....? What are we supposed to do to get the user group information if we cannot use SubjectUtilis.isUserInGroup()?
instead of import weblogic.security.SubjectUtils; use import weblogic.security.spi.WLSUser; and get the username as below
Set users = subject.getPrincipals(WLSUser.class);
Iterator iter = users.iterator();
userName = ((WLSUser)iter.next()).getName();
this returns you the username