Class PrivateCredentialPermission
java.lang.Object
java.security.Permission
javax.security.auth.PrivateCredentialPermission
- All Implemented Interfaces:
Serializable, Guard
@Deprecated(since="25",
forRemoval=true)
public final class PrivateCredentialPermission
extends Permission
Deprecated, for removal: This API element is subject to removal in a future version.
This permission cannot be used for controlling access to resources
as the Security Manager is no longer supported.
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"}*
- Since:
- 1.4
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionPrivateCredentialPermission(String name, String actions) Deprecated, for removal: This API element is subject to removal in a future version.Creates a newPrivateCredentialPermissionwith the specifiedname. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.Checks twoPrivateCredentialPermissionobjects for equality.Deprecated, for removal: This API element is subject to removal in a future version.Returns the "canonical string representation" of the actions.Deprecated, for removal: This API element is subject to removal in a future version.Returns the Class name of the Credential associated with thisPrivateCredentialPermission.String[][]Deprecated, for removal: This API element is subject to removal in a future version.Returns thePrincipalclasses and names associated with thisPrivateCredentialPermission.inthashCode()Deprecated, for removal: This API element is subject to removal in a future version.Returns the hash code value for this object.booleanDeprecated, for removal: This API element is subject to removal in a future version.Checks if thisPrivateCredentialPermissionimplies the specifiedPermission.Deprecated, for removal: This API element is subject to removal in a future version.Return a homogeneous collection of PrivateCredentialPermissions in aPermissionCollection.Methods declared in class Permission
checkGuard, getName, toString
-
Constructor Details
-
PrivateCredentialPermission
Deprecated, for removal: This API element is subject to removal in a future version.Creates a newPrivateCredentialPermissionwith the specifiedname. Thenamespecifies both a Credential class and aPrincipalSet.- Parameters:
name- the name specifying the Credential class andPrincipalSet.actions- the actions specifying that the Credential can be read.- Throws:
IllegalArgumentException- ifnamedoes not conform to the correct syntax or ifactionsis not "read".
-
-
Method Details
-
getCredentialClass
Deprecated, for removal: This API element is subject to removal in a future version.Returns the Class name of the Credential associated with thisPrivateCredentialPermission.- Returns:
- the Class name of the Credential associated with this
PrivateCredentialPermission.
-
getPrincipals
Deprecated, for removal: This API element is subject to removal in a future version.Returns thePrincipalclasses and names associated with thisPrivateCredentialPermission. The information is returned as a two-dimensional array (array[x][y]). The 'x' value corresponds to the number ofPrincipalclass and name pairs. When (y==0), it corresponds to thePrincipalclass value, and when (y==1), it corresponds to thePrincipalname value. For example, array[0][0] corresponds to the class name of the firstPrincipalin the array. array[0][1] corresponds to thePrincipalname of the firstPrincipalin the array.- Returns:
- the
Principalclass and names associated with thisPrivateCredentialPermission.
-
implies
Deprecated, for removal: This API element is subject to removal in a future version.Checks if thisPrivateCredentialPermissionimplies the specifiedPermission.This method returns true if:
-
pis an instanceof PrivateCredentialPermission and - the target name for
pis implied by this object's target name. For example:[* 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"].
- Specified by:
impliesin classPermission- Parameters:
p- thePermissionto check against.- Returns:
- true if this
PrivateCredentialPermissionimplies the specifiedPermission, false if not.
-
-
equals
Deprecated, for removal: This API element is subject to removal in a future version.Checks twoPrivateCredentialPermissionobjects for equality. Checks thatobjis aPrivateCredentialPermission, 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.- Specified by:
equalsin classPermission- Parameters:
obj- the object we are testing for equality with this object.- Returns:
- true if obj is a
PrivateCredentialPermission, has the same credential class as this object, and has the same Principals as this object. - See Also:
-
hashCode
public int hashCode()Deprecated, for removal: This API element is subject to removal in a future version.Returns the hash code value for this object.- Specified by:
hashCodein classPermission- Returns:
- the hash code value for this object
- See Also:
-
getActions
Deprecated, for removal: This API element is subject to removal in a future version.Returns the "canonical string representation" of the actions. This method always returns the String, "read".- Specified by:
getActionsin classPermission- Returns:
- the actions (always returns "read").
-
newPermissionCollection
Deprecated, for removal: This API element is subject to removal in a future version.Return a homogeneous collection of PrivateCredentialPermissions in aPermissionCollection. No suchPermissionCollectionis defined, so this method always returnsnull.- Overrides:
newPermissionCollectionin classPermission- Returns:
- null in all cases.
-