com.ibm.websphere.security.auth

Class IdentityPrincipal

  • java.lang.Object
    • com.ibm.websphere.security.auth.IdentityPrincipal
  • All Implemented Interfaces:
    java.security.Principal


    public final class IdentityPrincipal
    extends java.lang.Object
    implements java.security.Principal

    Identity Principal class implements the java.security.principal interface. An IdentityPrincipal object represents the user identity to assert to an enterprise information system.

    Version:
    7.0
    See Also:
    javax.resource.spi.security.PasswordCredential
    • Constructor Summary

      Constructors 
      Constructor and Description
      IdentityPrincipal(java.lang.String userName, java.lang.String realm, java.lang.String origUser, byte[] token)
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      boolean equals(java.lang.Object obj)
      equals returns true if and only if the specified IdentityPrincipal object contains the same userName, realm, origUser, and token values.
      javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()
      getManagedConnectionFactory returns a reference of the ManagedConnectionFactory to which the username identity should be used.
      java.lang.String getName()
      getName returns the userName String.
      java.lang.String getOriginalUser()
      getOriginalUser returns origUser which represents the user who originally submits the request.
      java.lang.String getRealm()
      getRealm returns a symbolic name represents the repository or repositories in which userName is defined.
      byte[] getToken()
      getToken returns a serialized form of the security context of userName.
      int hashCode()
      hashCode returns the hash value of userName, realm, origUser, and token.
      void setManagedConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf)
      setManagedConnectionFactory sets the specified ManagedConnectionFactory in the IdentityPrincipal object.
      java.lang.String toString()
      toString returns a String representation of userName, realm, origUser, and token.
      • Methods inherited from class java.lang.Object

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

      • IdentityPrincipal

        public IdentityPrincipal(java.lang.String userName,
                         java.lang.String realm,
                         java.lang.String origUser,
                         byte[] token)

        Parameters:
        userName - String specifies the user identity to be asserted to an enterprise information system.
        realm - String is a logical representation of the user repository in which the userName is defined. The realm is a symbolic name an enterprise information system uses to determine the user repository.
        origUser - String contains an identity that represents the original user who submits the request. origUser may or may not be the same as the userName parameter. userName may be different from the origUser depending on the J2EE Run-As mode and the JCA resource reference identity mapping configuration.
        token - contains a serialized form of the user's security context.
    • Method Detail

      • getName

        public java.lang.String getName()

        getName returns the userName String. This is the user name to be used in identity assertion.

        Specified by:
        getName in interface java.security.Principal
      • getRealm

        public java.lang.String getRealm()

        getRealm returns a symbolic name represents the repository or repositories in which userName is defined.

      • getOriginalUser

        public java.lang.String getOriginalUser()

        getOriginalUser returns origUser which represents the user who originally submits the request.

      • getToken

        public byte[] getToken()

        getToken returns a serialized form of the security context of userName. The token is an opaque object that may be used by security auditing or may be used to reconstruct the security context.

      • getManagedConnectionFactory

        public javax.resource.spi.ManagedConnectionFactory getManagedConnectionFactory()

        getManagedConnectionFactory returns a reference of the ManagedConnectionFactory to which the username identity should be used.

        Returns:
        a ManagedConnectionFactory object.
      • setManagedConnectionFactory

        public void setManagedConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf)

        setManagedConnectionFactory sets the specified ManagedConnectionFactory in the IdentityPrincipal object.

      • equals

        public boolean equals(java.lang.Object obj)

        equals returns true if and only if the specified IdentityPrincipal object contains the same userName, realm, origUser, and token values.

        Specified by:
        equals in interface java.security.Principal
        Overrides:
        equals in class java.lang.Object
        Returns:
        a boolean value.
      • hashCode

        public int hashCode()

        hashCode returns the hash value of userName, realm, origUser, and token.

        Specified by:
        hashCode in interface java.security.Principal
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        an int hash value of the object.
      • toString

        public java.lang.String toString()

        toString returns a String representation of userName, realm, origUser, and token.

        Specified by:
        toString in interface java.security.Principal
        Overrides:
        toString in class java.lang.Object
        Returns:
        a String representation of the object.
IBM WebSphere Application ServerTM
Release 8.5