Home » openjdk-7 » java » security » [javadoc | source]
java.security
abstract public class: Identity [javadoc | source]
java.lang.Object
   java.security.Identity

All Implemented Interfaces:
    Principal, Serializable

Direct Known Subclasses:
    IdentityScope, Signer

Deprecated! This - class is no longer used. Its functionality has been replaced by java.security.KeyStore, the java.security.cert package, and java.security.Principal.

This class represents identities: real-world objects such as people, companies or organizations whose identities can be authenticated using their public keys. Identities may also be more abstract (or concrete) constructs, such as daemon threads or smart cards.

All Identity objects have a name and a public key. Names are immutable. Identities may also be scoped. That is, if an Identity is specified to have a particular scope, then the name and public key of the Identity are unique within that scope.

An Identity also has a set of certificates (all certifying its own public key). The Principal names specified in these certificates need not be the same, only the key.

An Identity can be subclassed, to include postal and email addresses, telephone numbers, images of faces and logos, and so on.

Field Summary
 String info    Generic, descriptive information about the identity.
    serial:
 
 IdentityScope scope    The scope of the identity.
    serial:
 
 Vector<Certificate> certificates    The certificates for this identity.
    serial:
 
Constructor:
 protected Identity() 
 public Identity(String name) 
    Constructs an identity with the specified name and no scope.
    Parameters:
    name - the identity name.
 public Identity(String name,
    IdentityScope scope) throws KeyManagementException 
    Constructs an identity with the specified name and scope.
    Parameters:
    name - the identity name.
    scope - the scope of the identity.
    Throws:
    KeyManagementException - if there is already an identity with the same name in the scope.
    exception: KeyManagementException - if there is already an identity with the same name in the scope.
Method from java.security.Identity Summary:
addCertificate,   certificates,   equals,   fullName,   getInfo,   getName,   getPublicKey,   getScope,   hashCode,   identityEquals,   printCertificates,   printKeys,   removeCertificate,   setInfo,   setPublicKey,   toString,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from java.security.Identity Detail:
 public  void addCertificate(Certificate certificate) throws KeyManagementException 
      Deprecated!
    Adds a certificate for this identity. If the identity has a public key, the public key in the certificate must be the same, and if the identity does not have a public key, the identity's public key is set to be that specified in the certificate.

    First, if there is a security manager, its checkSecurityAccess method is called with "addIdentityCertificate" as its argument to see if it's ok to add a certificate.

 public Certificate[] certificates() 
      Deprecated!
    Returns a copy of all the certificates for this identity.
 public final boolean equals(Object identity) 
      Deprecated!
    Tests for equality between the specified object and this identity. This first tests to see if the entities actually refer to the same object, in which case it returns true. Next, it checks to see if the entities have the same name and the same scope. If they do, the method returns true. Otherwise, it calls identityEquals , which subclasses should override.
 String fullName() 
      Deprecated!
    Returns a parsable name for identity: identityName.scopeName
 public String getInfo() 
      Deprecated!
    Returns general information previously specified for this identity.
 public final String getName() 
      Deprecated!
    Returns this identity's name.
 public PublicKey getPublicKey() 
      Deprecated!
    Returns this identity's public key.
 public final IdentityScope getScope() 
      Deprecated!
    Returns this identity's scope.
 public int hashCode() 
      Deprecated!
    Returns a hashcode for this identity.
 protected boolean identityEquals(Identity identity) 
      Deprecated!
    Tests for equality between the specified identity and this identity. This method should be overriden by subclasses to test for equality. The default behavior is to return true if the names and public keys are equal.
 String printCertificates() 
      Deprecated!
 String printKeys() 
      Deprecated!
 public  void removeCertificate(Certificate certificate) throws KeyManagementException 
      Deprecated!
    Removes a certificate from this identity.

    First, if there is a security manager, its checkSecurityAccess method is called with "removeIdentityCertificate" as its argument to see if it's ok to remove a certificate.

 public  void setInfo(String info) 
      Deprecated!
    Specifies a general information string for this identity.

    First, if there is a security manager, its checkSecurityAccess method is called with "setIdentityInfo" as its argument to see if it's ok to specify the information string.

 public  void setPublicKey(PublicKey key) throws KeyManagementException 
      Deprecated!
    Sets this identity's public key. The old key and all of this identity's certificates are removed by this operation.

    First, if there is a security manager, its checkSecurityAccess method is called with "setIdentityPublicKey" as its argument to see if it's ok to set the public key.

 public String toString() 
      Deprecated!
    Returns a short string describing this identity, telling its name and its scope (if any).

    First, if there is a security manager, its checkSecurityAccess method is called with "printIdentity" as its argument to see if it's ok to return the string.

 public String toString(boolean detailed) 
      Deprecated!
    Returns a string representation of this identity, with optionally more details than that provided by the toString method without any arguments.

    First, if there is a security manager, its checkSecurityAccess method is called with "printIdentity" as its argument to see if it's ok to return the string.