|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.security.SubjectUtils
This class contains utilities for managing Subjects.
Constructor Summary | |
SubjectUtils()
|
Method Summary | |
static void |
checkSubjectNonNull(java.lang.Object subject)
Throws an IllegalArgumentException if the Subject is null. |
static java.lang.String |
displaySubject(javax.security.auth.Subject subject)
Gives a detailed display of a Subject. |
static javax.security.auth.Subject |
getAnonymousUser()
Returns an unmodifiable Subject that corresponds to an anonymous user. |
static java.security.Principal |
getOnePrincipal(javax.security.auth.Subject subject,
java.lang.Class type)
Quickly return a single Principal of the specified type or return null. |
static java.lang.String |
getUsername(javax.security.auth.Subject s)
Returns a username for the specified Subject. |
static java.security.Principal |
getUserPrincipal(javax.security.auth.Subject s)
Returns a principal for the specified Subject that represents the current user of the Web application. |
static boolean |
isUserAnAdministrator(javax.security.auth.Subject subject)
Returns true if the Subject has Administrator privileges. |
static boolean |
isUserAnonymous(javax.security.auth.Subject subject)
Returns true if and only if the user is the anonymous user. |
static boolean |
isUserInGroup(weblogic.security.acl.internal.AuthenticatedSubject s,
java.lang.String group)
Returns true if the Subject is in the specified group. |
static boolean |
isUserInGroup(javax.security.auth.Subject s,
java.lang.String group)
Returns true if the Subject is in the specified group. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public SubjectUtils()
Method Detail |
public static java.security.Principal getUserPrincipal(javax.security.auth.Subject s)
s
- the Subject to extract the user fromWLSUser
,
WLSGroup
public static java.lang.String getUsername(javax.security.auth.Subject s)
s
- the Subject to extract the user name from.public static java.lang.String displaySubject(javax.security.auth.Subject subject)
subject
- Subject to display.public static java.security.Principal getOnePrincipal(javax.security.auth.Subject subject, java.lang.Class type)
subject
- Subject to searchtype
- Principal type to search forpublic static boolean isUserInGroup(javax.security.auth.Subject s, java.lang.String group)
s
- Subject to determine if the user is in the group.group
- name of group to compare.WLSGroup
public static boolean isUserInGroup(weblogic.security.acl.internal.AuthenticatedSubject s, java.lang.String group)
s
- AuthenticatedSubject to determin if the user is in the groupgroup
- name of group to compareWLSGroup
public static javax.security.auth.Subject getAnonymousUser()
public static boolean isUserAnonymous(javax.security.auth.Subject subject)
subject
- the subject.public static boolean isUserAnAdministrator(javax.security.auth.Subject subject)
subject
- subject to test for Administrator privileges.public static void checkSubjectNonNull(java.lang.Object subject)
subject
- the subject to check.
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |