com.filenet.api.authentication
Class SubjectCredentials
- java.lang.Object
-
- com.filenet.api.authentication.Credentials
-
- com.filenet.api.authentication.SubjectCredentials
-
public class SubjectCredentials extends Credentials
This class is a type ofCredentialsobject which holds an a JAASSubjectrepresenting the authenticated user.Use of this class supersedes the Subject-related methods in the
UserContextclass.This is the only form of credentials that can be used with the EJB transport. It may also be used with the WSI transport.
- Since:
- Version 5.5.9.
-
-
Constructor Summary
Constructors Constructor and Description SubjectCredentials(javax.security.auth.Subject subject)Constructs an instance holding the specifiedSubject
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description <T> TdoAs(java.security.PrivilegedExceptionAction<T> pea)Executes thePrivilegedExceptionActionin the security context authenticated by theSubjectheld by this object.booleanequals(java.lang.Object other)javax.security.auth.SubjectgetSubject()Returns theSubjectheld by this object.inthashCode()java.lang.StringtoString()-
Methods inherited from class com.filenet.api.authentication.Credentials
getCurrent
-
-
-
-
Constructor Detail
-
SubjectCredentials
public SubjectCredentials(javax.security.auth.Subject subject)
Constructs an instance holding the specifiedSubject- Parameters:
subject- TheSubjectto be held.
-
-
Method Detail
-
getSubject
public javax.security.auth.Subject getSubject()
Returns theSubjectheld by this object.- Returns:
- The
Subject.
-
doAs
public <T> T doAs(java.security.PrivilegedExceptionAction<T> pea)
Executes thePrivilegedExceptionActionin the security context authenticated by theSubjectheld by this object.This method saves the currently active credentials (see
Credentials.getCurrent()) and makes the target object active for the duration of the action execution. It also places theSubjectinto the ambient JAAS context, so it will be in effect for all software, not just the CE API.- Overrides:
doAsin classCredentials- Parameters:
pea- The action to execute- Returns:
- The value returned by the
PrivilegedExceptionAction.run()method.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-