com.filenet.api.authentication
Class Credentials
- java.lang.Object
-
- com.filenet.api.authentication.Credentials
-
- Direct Known Subclasses:
- OpenTokenCredentials, SubjectCredentials, UsernameCredentials
public abstract class Credentials extends java.lang.ObjectThis class acts as a base for several subclasses which convey authentication credentials of various kinds to the Content Engine, and provides a method to execute a specified action (using the CE API) in the security context authenticated by those credentials.Note: The EJB transport supports only the SubjectCredentials subclass. Any of the subclasses may be used with the WSI transport.
- Since:
- Version 5.5.9.
-
-
Constructor Summary
Constructors Constructor and Description Credentials()
-
Method Summary
All Methods Static 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 the credentials provided in this object.static CredentialsgetCurrent()Returns the current effective Credentials for the calling thread.
-
-
-
Method Detail
-
doAs
public <T> T doAs(java.security.PrivilegedExceptionAction<T> pea)
Executes thePrivilegedExceptionActionin the security context authenticated by the credentials provided in this object.This method saves the currently active credentials (see
getCurrent()) and makes the target object active for the duration of the action execution.- Parameters:
pea- The action to execute- Returns:
- The value returned by the
PrivilegedExceptionAction.run()method.
-
getCurrent
public static Credentials getCurrent()
Returns the current effective Credentials for the calling thread.- Returns:
- The
Credentialsobject in effect for the current thread or null if no credentials have been established.
-
-