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.Object
    This 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> T doAs(java.security.PrivilegedExceptionAction<T> pea)
      Executes the PrivilegedExceptionAction in the security context authenticated by the credentials provided in this object.
      static Credentials getCurrent()
      Returns the current effective Credentials for the calling thread.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Credentials

        public Credentials()
    • Method Detail

      • doAs

        public <T> T doAs(java.security.PrivilegedExceptionAction<T> pea)
        Executes the PrivilegedExceptionAction in 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 Credentials object in effect for the current thread or null if no credentials have been established.

© Copyright IBM Corporation 2006, 2019. All rights reserved.