Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |
java.lang.Object | +----java.security.Identity
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.
Constructor Summary | |
Identity()
|
|
Identity(String name,
IdentityScope scope)
|
|
Identity(String name)
|
|
Identity(String name,
String info,
Certificate[] certificates,
PublicKey publicKey)
|
Method Summary | |
void | addCertificate(Certificate certificate)
|
void | addCertificate(Certificate certificate)
|
Certificate[] | certificates()
|
boolean | equals(Object identity)
|
Certificate[] | getCertificates()
|
String | getInfo()
|
String | getName()
|
PublicKey | getPublicKey()
|
IdentityScope | getScope()
|
int | hashCode()
|
boolean | identityEquals(Identity identity)
|
void | removeCertificate(Certificate certificate)
|
void | removeCertificate(Certificate certificate)
|
void | setInfo(String info)
|
void | setPublicKey(PublicKey key)
|
String | toString()
|
String | toString(boolean detailed)
toString method without any arguments.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected Identity()
public Identity(String name, IdentityScope scope) throws KeyManagementException
name
- the identity name.
scope
- the scope of the identity.
public Identity(String name)
name
- the identity name.
public Identity(String name, String info, Certificate[] certificates, PublicKey publicKey)
name
- the identity name.
info
- the information string.
publicKey
- the public key for this identity.
certificates
- the certificates to be added.
Method Detail |
public final String getName()
public final IdentityScope getScope()
public PublicKey getPublicKey()
public void setPublicKey(PublicKey key) throws KeyManagementException
key
- the public key for this identity.
public void setInfo(String info)
info
- the information string.
public String getInfo()
public void addCertificate(Certificate certificate) throws KeyManagementException
certificate
- the certificate to be added.
public void addCertificate(Certificate certificate) throws KeyManagementException
certificate
- the certificate to be added.
public void removeCertificate(Certificate certificate) throws KeyManagementException
certificate
- the certificate to be removed.
public void removeCertificate(Certificate certificate) throws KeyManagementException
certificate
- the certificate to be removed.
public Certificate[] certificates()
public Certificate[] getCertificates()
public final boolean equals(Object identity)
identity
- the object to test for equality with this identity.
protected boolean identityEquals(Identity identity)
identity
- the identity to test for equality with this identity.
public String toString()
public String toString(boolean detailed)
toString
method without any arguments.
detailed
- whether or not to provide detailed information.
detailed
is true, then this method returns more information than that
provided by the toString
method without any arguments.public int hashCode()
Contents | Package | Class | Tree | Deprecated | Index | Help | Java 1.2 Beta 3 | ||
PREV | NEXT | SHOW LISTS | HIDE LISTS |