java.lang.Object
org.springframework.credhub.support.permissions.Actor

public final class Actor extends Object
Identifies an entity that is authorized to perform operations on a CredHub credential.
Author:
Scott Frederick
  • Method Details

    • app

      public static Actor app(String appId)
      Create an application identifier. An application is identified by a GUID generated by Cloud Foundry when the application is created.
      Parameters:
      appId - the Cloud Foundry application GUID
      Returns:
      the created Actor
    • user

      public static Actor user(String userId)
      Create a user identifier. A user is identified by a GUID generated by UAA when a user account is created.
      Parameters:
      userId - the UAA user GUID
      Returns:
      the created Actor
    • user

      public static Actor user(String zoneId, String userId)
      Create a user identifier. A user is identified by a GUID generated by UAA when a user account is created and the ID of the identity zone the user was created in.
      Parameters:
      zoneId - the UAA identity zone ID
      userId - the UAA user GUID
      Returns:
      the created Actor
    • client

      public static Actor client(String clientId)
      Create an OAuth2 client identifier. A client identified by user-provided identifier.
      Parameters:
      clientId - the UAA client ID
      Returns:
      the created Actor
    • client

      public static Actor client(String zoneId, String clientId)
      Create an OAuth2 client identifier. A client identified by user-provided identifier and the ID of the identity zone the client was created in.
      Parameters:
      zoneId - the UAA identity zone ID
      clientId - the UAA client ID
      Returns:
      the created Actor
    • getAuthType

      public ActorType getAuthType()
      Get the type of the authorized entity.
      Returns:
      the entity type
    • getPrimaryIdentifier

      public String getPrimaryIdentifier()
      Get the identity of the authorized entity.
      Returns:
      the identifier
    • getIdentity

      public String getIdentity()
      Get the full identifier for the authorized entity, which is a combination of the type and identity.
      Returns:
      the full identifier
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object