Name

Identity

Synopsis

This deprecated class was used in Java 1.1 to represent an entity or Principal with an associated PublicKey object. In Java 1.1, the public key for a named entity could be retrieved from the system keystore with a line like the following:

IdentityScope.getSystemScope( ).getIdentity(name).getPublicKey( )

As of Java 1.2, the Identity class and the related IdentityScope and Signer classes have been deprecated in favor of KeyStore and java.security.cert.Certificate.

java.security.Identity

Figure 14-12. java.security.Identity

public abstract class Identity implements Principal, Serializable {
// Public Constructors
     public Identity(String name);  
     public Identity(String name, IdentityScope scope) 
        throws KeyManagementException;  
// Protected Constructors
     protected Identity( );  
// Public Instance Methods
     public void addCertificate(java.security.Certificate certificate) 
        throws KeyManagementException;  
     public java.security.Certificate[ ] certificates( );  
     public String getInfo( );  
     public PublicKey getPublicKey( );  
     public final IdentityScope getScope( );  
     public void removeCertificate(java.security.Certificate certificate) 
        throws KeyManagementException;  
     public void setInfo(String info);  
     public void setPublicKey(PublicKey key) throws KeyManagementException;  
     public String toString(boolean detailed);  
// Methods Implementing Principal
     public final boolean equals(Object identity);  
     public final String getName ...

Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.