java.lang.Objectjava.security.Permission
javax.security.auth.PrivateCredentialPermission
public final class PrivateCredentialPermission
This class is used to protect access to private Credentials
belonging to a particular Subject. The Subject
is represented by a Set of Principals.
The target name of this Permission specifies
a Credential class name, and a Set of Principals.
The only valid value for this Permission's actions is, "read".
The target name must abide by the following syntax:
CredentialClass {PrincipalClass "PrincipalName"}*
grant { "com.sun.PrivateCredential com.sun.Principal \"duke\"", "read"; };
Subject.
If "PrincipalName" is "*", then access is granted to the
specified Credential owned by any Subject that has the
specified Principal (the actual PrincipalName doesn't matter).
For example, the following grants access to the
a.b.Credential owned by any Subject that has
an a.b.Principal.
grant { "a.b.Credential a.b.Principal "*"", "read"; };
Subject.
In addition, the PrincipalClass/PrincipalName pairing may be repeated:
grant { "a.b.Credential a.b.Principal "duke" c.d.Principal "dukette"", "read"; };
Subject with at least two associated Principals:
"a.b.Principal" with the name, "duke", and "c.d.Principal", with the name,
"dukette".
| Constructor Summary | |
|---|---|
PrivateCredentialPermission(String name,
String actions)
Creates a new PrivateCredentialPermission
with the specified name. |
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Checks two PrivateCredentialPermission objects for
equality. |
String |
getActions()
Returns the "canonical string representation" of the actions. |
String |
getCredentialClass()
Returns the Class name of the Credential associated with this PrivateCredentialPermission. |
String[][] |
getPrincipals()
Returns the Principal classes and names
associated with this PrivateCredentialPermission. |
int |
hashCode()
Returns the hash code value for this object. |
boolean |
implies(Permission p)
Checks if this PrivateCredentialPermission implies
the specified Permission. |
PermissionCollection |
newPermissionCollection()
Return a homogeneous collection of PrivateCredentialPermissions in a PermissionCollection. |
| Methods inherited from class java.security.Permission |
|---|
checkGuard, getName, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public PrivateCredentialPermission(String name, String actions)
PrivateCredentialPermission
with the specified name. The name
specifies both a Credential class and a Principal Set.
name - the name specifying the Credential class and
Principal Set. actions - the actions specifying that the Credential can be read.
IllegalArgumentException - if name does not conform
to the correct syntax or if actions is not "read".| Method Detail |
|---|
public String getCredentialClass()
PrivateCredentialPermission.
PrivateCredentialPermission.public String[][] getPrincipals()
Principal classes and names
associated with this PrivateCredentialPermission.
The information is returned as a two-dimensional array (array[x][y]).
The 'x' value corresponds to the number of Principal
class and name pairs. When (y==0), it corresponds to
the Principal class value, and when (y==1),
it corresponds to the Principal name value.
For example, array[0][0] corresponds to the class name of
the first Principal in the array. array[0][1]
corresponds to the Principal name of the
first Principal in the array.
Principal class and names associated
with this PrivateCredentialPermission.public boolean implies(Permission p)
PrivateCredentialPermission implies
the specified Permission.
This method returns true if:
[* P1 "duke"] implies [a.b.Credential P1 "duke"]. [C1 P1 "duke"] implies [C1 P1 "duke" P2 "dukette"]. [C1 P2 "dukette"] implies [C1 P1 "duke" P2 "dukette"].
implies in class Permissionp - the Permission to check against.
PrivateCredentialPermission implies
the specified Permission, false if not.public boolean equals(Object obj)
PrivateCredentialPermission objects for
equality. Checks that obj is a
PrivateCredentialPermission,
and has the same credential class as this object,
as well as the same Principals as this object.
The order of the Principals in the respective Permission's
target names is not relevant.
equals in class Permissionobj - the object we are testing for equality with this object.
PrivateCredentialPermission,
has the same credential class as this object,
and has the same Principals as this object.Object.hashCode(),
Hashtablepublic int hashCode()
hashCode in class PermissionObject.equals(java.lang.Object),
Hashtablepublic String getActions()
getActions in class Permissionpublic PermissionCollection newPermissionCollection()
PermissionCollection.
No such PermissionCollection is defined,
so this method always returns null.
newPermissionCollection in class PermissionCes 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.
7 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)