java.lang.Objectjava.security.Identity
java.security.KeyStore, the
java.security.cert package, and
java.security.Principal.
@Deprecated public abstract class 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.
IdentityScope,
Signer,
Principal,
Serialized Form| Constructor Summary | |
|---|---|
protected |
Identity()
Deprecated. Constructor for serialization only. |
|
Identity(String name)
Deprecated. Constructs an identity with the specified name and no scope. |
|
Identity(String name,
IdentityScope scope)
Deprecated. Constructs an identity with the specified name and scope. |
| Method Summary | |
|---|---|
void |
addCertificate(Certificate certificate)
Deprecated. Adds a certificate for this identity. |
Certificate[] |
certificates()
Deprecated. Returns a copy of all the certificates for this identity. |
boolean |
equals(Object identity)
Deprecated. Tests for equality between the specified object and this identity. |
String |
getInfo()
Deprecated. Returns general information previously specified for this identity. |
String |
getName()
Deprecated. Returns this identity's name. |
PublicKey |
getPublicKey()
Deprecated. Returns this identity's public key. |
IdentityScope |
getScope()
Deprecated. Returns this identity's scope. |
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. |
void |
removeCertificate(Certificate certificate)
Deprecated. Removes a certificate from this identity. |
void |
setInfo(String info)
Deprecated. Specifies a general information string for this identity. |
void |
setPublicKey(PublicKey key)
Deprecated. Sets this identity's public key. |
String |
toString()
Deprecated. Returns a short string describing this identity, telling its name and its scope (if any). |
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, 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.
KeyManagementException - if there is already an identity
with the same name in the scope.public Identity(String name)
name - the identity name.| Method Detail |
|---|
public final String getName()
public final IdentityScope getScope()
public PublicKey getPublicKey()
setPublicKey(java.security.PublicKey)public void setPublicKey(PublicKey key) throws KeyManagementException
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.
key - the public key for this identity.
KeyManagementException - if another identity in the
identity's scope has the same public key, or if another exception occurs.
SecurityException - if a security manager exists and its
checkSecurityAccess method doesn't allow
setting the public key.getPublicKey(),
SecurityManager.checkSecurityAccess(java.lang.String)public void setInfo(String info)
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.
info - the information string.
SecurityException - if a security manager exists and its
checkSecurityAccess method doesn't allow
setting the information string.getInfo(),
SecurityManager.checkSecurityAccess(java.lang.String)public String getInfo()
setInfo(java.lang.String)public void addCertificate(Certificate certificate) throws KeyManagementException
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.
certificate - the certificate to be added.
KeyManagementException - if the certificate is not valid,
if the public key in the certificate being added conflicts with
this identity's public key, or if another exception occurs.
SecurityException - if a security manager exists and its
checkSecurityAccess method doesn't allow
adding a certificate.SecurityManager.checkSecurityAccess(java.lang.String)public void removeCertificate(Certificate certificate) throws KeyManagementException
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.
certificate - the certificate to be removed.
KeyManagementException - if the certificate is
missing, or if another exception occurs.
SecurityException - if a security manager exists and its
checkSecurityAccess method doesn't allow
removing a certificate.SecurityManager.checkSecurityAccess(java.lang.String)public Certificate[] certificates()
public final boolean equals(Object identity)
identityEquals, which subclasses should
override.
identity - the object to test for equality with this identity.
identityEquals(java.security.Identity)protected boolean identityEquals(Identity identity)
identity - the identity to test for equality with this identity.
equals(java.lang.Object)public String toString()
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.
SecurityException - if a security manager exists and its
checkSecurityAccess method doesn't allow
returning a string describing this identity.SecurityManager.checkSecurityAccess(java.lang.String)public String toString(boolean detailed)
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.
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.
SecurityException - if a security manager exists and its
checkSecurityAccess method doesn't allow
returning a string describing this identity.toString(),
SecurityManager.checkSecurityAccess(java.lang.String)public int hashCode()
Object.equals(java.lang.Object),
HashtableCes informations proviennent du site de http://java.sun.com
Le contenu de cette page provient du site de Sun, et est généré depuis un cache sur l'infobrol après certains traitements automatisés. La présentation peut donc différer du document original, mais le contenu aussi. Vous pouvez utiliser ce bouton pour afficher la page originale du site de Sun :
Maintenir les pages en cache sur différents sites peut offrir plus de disponibilité.
Chaque page est indexée dans la base de donnée, ce qui permet de retrouver facilement les informations, au moyen des sommaires, du moteur de recherche interne, etc.
Des facilités sont mises en place pour que les membres de l'infobrol puissent effectuer des traductions en français des différents documents. Ceci devrait permettre aux débutants en programmation Java de consulter les API en français s'ils maîtrisent moins bien la langue de Shakespeare. Dans le cas où une traduction a été soumise, elle est disponible au moyen d'un lien en bas de page. Si la traduction a été validée, la page s'affiche par défaut en français, et un lien en bas de page permet d'atteindre la version en anglais.
Le code sur l'infobrol est automatiquement coloré selon la syntaxe, et les différents mots clés sont transformés en liens pour accéder rapidement aux informations.
Vous avez la possibilité de partager vos expériences en proposant vos propres extraits de code en utilisant le bouton "ajouter un commentaire" en bas de page. Si vous visitez simplement l'infobrol, vous avez déjà accès à cette fonction, mais si vous étes membre du brol, vous pouvez en plus utiliser des boutons supplémentaires de mise en forme, dont la coloration automatique de vos extraits de codes.
Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher les interactions avec les réseaux sociaux sur ces pages.
6 mots clés dont 0 définis manuellement (plus d'information...).
Avertissement
Cette page ne possède pas encore de mots clés manuels, ceci est donc un exemple automatique (les niveaux de pertinence sont fictifs, mais les liens sont valables). Pour tester le nuage avec une page qui contient des mots définis manuellement, vous pouvez cliquer ici.Vous pouvez modifier vos préférences dans votre profil pour ne plus afficher le nuage de mots clés.
Recherche (afficher)
Utilisateur (masquer)
Navigation (masquer)
Apparence (afficher)
Stats (afficher)
Citation (masquer)