### *** This class provides Binary Compatibility only, not Source Compatibility ***

Package com.sas.services.user

# Class CredentialPermission

java.lang.Object
java.security.Permission
java.security.BasicPermission
com.sas.services.user.CredentialPermission

All Implemented Interfaces:
  `Serializable`, `Guard`

@SASScope("ALL") @BinaryCompatibilityOnly public class CredentialPermission extends BasicPermission
This class is used to protect the retrieval of credential information from the UserIdentity class. In order to perform the getCredential method in a UserIdentity class, the CredentialPermission "readCredential" must be granted.

    grant {
         permission com.sas.services.user.CredentialPermission "readCredential";
     };

Since:
  1.0
See Also:
  - Serialized Form

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CredentialPermission()`
  Constructs a default credential permission.
  `CredentialPermission(String name)`
  Constructs a credential permission using the specified name.
  `CredentialPermission(String name, String actions)`
  Constructs a credential permission using the specified name and actions.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `boolean`
  `equals(Object obj)`
  Determines whether or not the specified object is a permission collection.
  `String`
  `getActions()`
  Gets actions.
  `int`
  `hashCode()`
  Gets ths collection's hash code.
  `boolean`
  `implies(Permission permission)`
  Determines whether or not the specified permission implies a credential permission.
  `PermissionCollection`
  `newPermissionCollection()`
  Creates a new permission collection.

  ### 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 Details

  - ### CredentialPermission

    public CredentialPermission()
    Constructs a default credential permission.

  - ### CredentialPermission

    public CredentialPermission(String name)
    Constructs a credential permission using the specified name.
    Parameters:
      `name` - Permission's name.

  - ### CredentialPermission

    public CredentialPermission(String name, String actions)
    Constructs a credential permission using the specified name and actions.
    Parameters:
      `name` - Permission's name.
      `actions` - Permission's actions.

- ## Method Details

  - ### implies

    public boolean implies(Permission permission)
    Determines whether or not the specified permission implies a credential permission.
    Overrides:
      `implies` in class `BasicPermission`
    Parameters:
      `permission` - Permission
    Returns:
      `true` if the permission is a credential permission.

  - ### equals

    public boolean equals(Object obj)
    Determines whether or not the specified object is a permission collection.
    Overrides:
      `equals` in class `BasicPermission`
    Parameters:
      `obj` - Object to be compared for equality.
    Returns:
      `true` if the specified object is a credential permission.

  - ### hashCode

    public int hashCode()
    Gets ths collection's hash code.
    Overrides:
      `hashCode` in class `BasicPermission`
    Returns:
      Collection's hash code.

  - ### getActions

    public String getActions()
    Gets actions.
    Overrides:
      `getActions` in class `BasicPermission`
    Returns:
      Read credential.

  - ### newPermissionCollection

    public PermissionCollection newPermissionCollection()
    Creates a new permission collection.
    Overrides:
      `newPermissionCollection` in class `BasicPermission`
    Returns:
      New permission collection.