Class Permission.CredentialPermissionBuilder
java.lang.Object
org.springframework.credhub.support.permissions.Permission.CredentialPermissionBuilder
- Enclosing class:
- Permission
A builder that provides a fluent API for constructing
Permission
instances.-
Method Summary
Modifier and TypeMethodDescriptionSet the ID of an application that will be assigned permissions on a credential.build()
Construct aPermission
with the provided values.Set the ID of an OAuth2 client that will be assigned permissions on a credential.Set the ID of an OAuth2 client that will be assigned permissions on a credential.Set anOperation
that the actor will be allowed to perform on the credential.operations
(Operation... operations) Specify a set ofOperation
s that the actor will be allowed to perform on the credential.Set the ID of a user that will be assigned permissions on a credential.Set the ID of a user that will be assigned permissions on a credential.
-
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
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 nulluserId
- 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
Set the ID of an OAuth2 client that will be assigned permissions on a credential.- Parameters:
zoneId
- zone ID; must not be nullclientId
- an OAuth2 client ID; must not be null- Returns:
- the builder
-
operation
Set anOperation
that the actor will be allowed to perform on the credential. Multiple operations can be provided with consecutive calls to this method.- Parameters:
operation
- theOperation
- Returns:
- the builder
-
operations
Specify a set ofOperation
s that the actor will be allowed to perform on the credential.- Parameters:
operations
- theOperation
s- Returns:
- the builder
-
build
Construct aPermission
with the provided values.- Returns:
- a
Permission
-