com.filenet.api.authentication

Class SubjectCredentials



  • public class SubjectCredentials
    extends Credentials
    This class is a type of Credentials object which holds an a JAAS Subject representing the authenticated user.

    Use of this class supersedes the Subject-related methods in the UserContext class.

    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 specified Subject
    • Method Summary

      All 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 Subject held by this object.
      boolean equals(java.lang.Object other) 
      javax.security.auth.Subject getSubject()
      Returns the Subject held by this object.
      int hashCode() 
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • SubjectCredentials

        public SubjectCredentials(javax.security.auth.Subject subject)
        Constructs an instance holding the specified Subject
        Parameters:
        subject - The Subject to be held.
    • Method Detail

      • getSubject

        public javax.security.auth.Subject getSubject()
        Returns the Subject held by this object.
        Returns:
        The Subject.
      • doAs

        public <T> T doAs(java.security.PrivilegedExceptionAction<T> pea)
        Executes the PrivilegedExceptionAction in the security context authenticated by the Subject held 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 the Subject into the ambient JAAS context, so it will be in effect for all software, not just the CE API.

        Overrides:
        doAs in class Credentials
        Parameters:
        pea - The action to execute
        Returns:
        The value returned by the PrivilegedExceptionAction.run() method.
      • equals

        public boolean equals(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

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