Class Permission.CredentialPermissionBuilder

java.lang.Object
org.springframework.credhub.support.permissions.Permission.CredentialPermissionBuilder
Enclosing class:
Permission

public static class Permission.CredentialPermissionBuilder extends Object
A builder that provides a fluent API for constructing Permission instances.
  • Method Details

    • app

      Set the ID of an application that will be assigned permissions on a credential. This will often be a Cloud Foundry application GUID.
      Parameters:
      appId - application ID; must not be null
      Returns:
      the builder
    • user

      Set the ID of a user that will be assigned permissions on a credential. This is typically a GUID generated by UAA when a user account is created.
      Parameters:
      userId - user ID; must not be null
      Returns:
      the builder
    • user

      public Permission.CredentialPermissionBuilder user(String zoneId, String userId)
      Set the ID of a user that will be assigned permissions on a credential. This is typically a GUID generated by UAA when a user account is created.
      Parameters:
      zoneId - zone ID; must not be null
      userId - user ID; must not be null
      Returns:
      the builder
    • client

      Set the ID of an OAuth2 client that will be assigned permissions on a credential.
      Parameters:
      clientId - an OAuth2 client ID; must not be null
      Returns:
      the builder
    • client

      public Permission.CredentialPermissionBuilder client(String zoneId, String clientId)
      Set the ID of an OAuth2 client that will be assigned permissions on a credential.
      Parameters:
      zoneId - zone ID; must not be null
      clientId - an OAuth2 client ID; must not be null
      Returns:
      the builder
    • operation

      public Permission.CredentialPermissionBuilder operation(Operation operation)
      Set an Operation that the actor will be allowed to perform on the credential. Multiple operations can be provided with consecutive calls to this method.
      Parameters:
      operation - the Operation
      Returns:
      the builder
    • operations

      public Permission.CredentialPermissionBuilder operations(Operation... operations)
      Specify a set of Operations that the actor will be allowed to perform on the credential.
      Parameters:
      operations - the Operations
      Returns:
      the builder
    • build

      public Permission build()
      Construct a Permission with the provided values.
      Returns:
      a Permission