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()?
SubjectUtils class is part of “com.bea.core.weblogic.security.identity_18.104.22.168.jar” which should be under the BEAhome\modules directory.
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