com.ibm.websphere.security.auth

Class IdentityPrincipal

  1. java.lang.Object
  2. extended bycom.ibm.websphere.security.auth.IdentityPrincipal
All implemented interfaces:
java.security.Principal

  1. public final class IdentityPrincipal
  2. extends java.lang.Object
  3. 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

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

Method Summary

Modifier and Type Method and Description
  1. 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.
  1. javax.resource.spi.ManagedConnectionFactory
getManagedConnectionFactory()
getManagedConnectionFactory returns a reference of the ManagedConnectionFactory to which the username identity should be used.
  1. java.lang.String
getName()
getName returns the userName String.
  1. java.lang.String
getOriginalUser()
getOriginalUser returns origUser which represents the user who originally submits the request.
  1. java.lang.String
getRealm()
getRealm returns a symbolic name represents the repository or repositories in which userName is defined.
  1. byte[]
getToken()
getToken returns a serialized form of the security context of userName.
  1. int
hashCode()
hashCode returns the hash value of userName, realm, origUser, and token.
  1. void
setManagedConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf)
setManagedConnectionFactory sets the specified ManagedConnectionFactory in the IdentityPrincipal object.
  1. 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

  1. public IdentityPrincipal(java.lang.String userName,
  2. java.lang.String realm,
  3. java.lang.String origUser,
  4. 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

  1. 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

  1. public java.lang.String getRealm( )

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


getOriginalUser

  1. public java.lang.String getOriginalUser( )

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


getToken

  1. 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

  1. 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

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

setManagedConnectionFactory sets the specified ManagedConnectionFactory in the IdentityPrincipal object.


equals

  1. 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

  1. 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

  1. 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.