- All Implemented Interfaces:
Serializable
,Principal
- Direct Known Subclasses:
IdentityScope
,Signer
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.
- Since:
- 1.1
- See Also:
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
Identity()
Deprecated, for removal: This API element is subject to removal in a future version.Constructor for serialization only.Deprecated, for removal: This API element is subject to removal in a future version.Constructs an identity with the specified name and no scope.Identity
(String name, IdentityScope scope) Deprecated, for removal: This API element is subject to removal in a future version.Constructs an identity with the specified name and scope. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCertificate
(Certificate certificate) Deprecated, for removal: This API element is subject to removal in a future version.Adds a certificate for this identity.Deprecated, for removal: This API element is subject to removal in a future version.Returns a copy of all the certificates for this identity.final boolean
Deprecated, for removal: This API element is subject to removal in a future version.Tests for equality between the specified object and this identity.getInfo()
Deprecated, for removal: This API element is subject to removal in a future version.Returns general information previously specified for this identity.final String
getName()
Deprecated, for removal: This API element is subject to removal in a future version.Returns this identity's name.Deprecated, for removal: This API element is subject to removal in a future version.Returns this identity's public key.final IdentityScope
getScope()
Deprecated, for removal: This API element is subject to removal in a future version.Returns this identity's scope.int
hashCode()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a hashcode for this identity.protected boolean
identityEquals
(Identity identity) Deprecated, for removal: This API element is subject to removal in a future version.Tests for equality between the specified identity and this identity.void
removeCertificate
(Certificate certificate) Deprecated, for removal: This API element is subject to removal in a future version.Removes a certificate from this identity.void
Deprecated, for removal: This API element is subject to removal in a future version.Specifies a general information string for this identity.void
setPublicKey
(PublicKey key) Deprecated, for removal: This API element is subject to removal in a future version.Sets this identity's public key.toString()
Deprecated, for removal: This API element is subject to removal in a future version.Returns a short string describing this identity, telling its name and its scope (if any).toString
(boolean detailed) Deprecated, for removal: This API element is subject to removal in a future version.Returns a string representation of this identity, with optionally more details than that provided by thetoString
method without any arguments.
-
Constructor Details
-
Identity
protected Identity()Deprecated, for removal: This API element is subject to removal in a future version.Constructor for serialization only. -
Identity
Deprecated, for removal: This API element is subject to removal in a future version.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.
-
Identity
Deprecated, for removal: This API element is subject to removal in a future version.Constructs an identity with the specified name and no scope.- Parameters:
name
- the identity name.
-
-
Method Details
-
getName
Deprecated, for removal: This API element is subject to removal in a future version.Returns this identity's name. -
getScope
Deprecated, for removal: This API element is subject to removal in a future version.Returns this identity's scope.- Returns:
- the scope of this identity.
-
getPublicKey
Deprecated, for removal: This API element is subject to removal in a future version.Returns this identity's public key.- Returns:
- the public key for this identity.
- See Also:
-
setPublicKey
-
java.security.KeyStore
, thejava.security.cert
package, andjava.security.Principal
.