com.ibm.websphere.security.auth
Class IdentityPrincipal
- java.lang.Object
com.ibm.websphere.security.auth.IdentityPrincipal
- 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.
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 |
---|---|
|
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.
|
|
getManagedConnectionFactory()
getManagedConnectionFactory returns a reference of the
ManagedConnectionFactory to which the username identity should be used.
|
|
getName()
getName returns the userName String.
|
|
getOriginalUser()
getOriginalUser returns origUser which represents the user who originally submits
the request.
|
|
getRealm()
getRealm returns a symbolic name represents the repository or repositories in which
userName is defined.
|
|
getToken()
getToken returns a serialized form of the security context of userName.
|
|
hashCode()
hashCode returns the hash value of userName, realm, origUser, and token.
|
|
setManagedConnectionFactory(javax.resource.spi.ManagedConnectionFactory mcf)
setManagedConnectionFactory sets the specified
ManagedConnectionFactory in the IdentityPrincipal object.
|
|
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)
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.
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.
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.
equals
in interface java.security.Principal
equals
in class java.lang.Object
hashCode
- public int hashCode()
hashCode
returns the hash value of userName, realm, origUser, and token.
hashCode
in interface java.security.Principal
hashCode
in class java.lang.Object
toString
- public java.lang.String toString( )
toString
returns a String representation of userName, realm, origUser, and token.
toString
in interface java.security.Principal
toString
in class java.lang.Object