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 TypeMethodDescriptionvoid
addPermissions
(CredentialName name, Permission... permissions) Add permissions to an existing credential.void
deletePermission
(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
- theCredHubOperations
to use for interactions with CredHub
-
-
Method Details
-
getPermissions
Description copied from interface:CredHubPermissionOperations
Get the permissions associated with a credential.- Specified by:
getPermissions
in 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:CredHubPermissionOperations
Add permissions to an existing credential.- Specified by:
addPermissions
in interfaceCredHubPermissionOperations
- Parameters:
name
- the name of the credential; must not be nullpermissions
- a collection of permissions to add
-
deletePermission
Description copied from interface:CredHubPermissionOperations
Delete a permission associated with a credential.- Specified by:
deletePermission
in interfaceCredHubPermissionOperations
- Parameters:
name
- the name of the credential; must not be nullactor
- the actor of the permission; must not be null
-