Class CredHubPermissionTemplate
java.lang.Object
org.springframework.credhub.core.permission.CredHubPermissionTemplate
- All Implemented Interfaces:
CredHubPermissionOperations
Implements the main interaction with CredHub to add, retrieve, and delete permissions.
- Author:
- Scott Frederick
-
Constructor Summary
ConstructorsConstructorDescriptionCredHubPermissionTemplate(CredHubOperations credHubOperations) Create a newCredHubPermissionTemplate. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPermissions(CredentialName name, Permission... permissions) Add permissions to an existing credential.voiddeletePermission(CredentialName name, Actor actor) Delete a permission associated with a credential.getPermissions(CredentialName name) Get the permissions associated with a credential.
-
Constructor Details
-
CredHubPermissionTemplate
Create a newCredHubPermissionTemplate.- Parameters:
credHubOperations- theCredHubOperationsto use for interactions with CredHub
-
-
Method Details
-
getPermissions
Description copied from interface:CredHubPermissionOperationsGet the permissions associated with a credential.- Specified by:
getPermissionsin interfaceCredHubPermissionOperations- Parameters:
name- the name of the credential; must not be null- Returns:
- the collection of permissions associated with the credential
-
addPermissions
Description copied from interface:CredHubPermissionOperationsAdd permissions to an existing credential.- Specified by:
addPermissionsin interfaceCredHubPermissionOperations- Parameters:
name- the name of the credential; must not be nullpermissions- a collection of permissions to add
-
deletePermission
Description copied from interface:CredHubPermissionOperationsDelete a permission associated with a credential.- Specified by:
deletePermissionin interfaceCredHubPermissionOperations- Parameters:
name- the name of the credential; must not be nullactor- the actor of the permission; must not be null
-