Class ReactiveCredHubPermissionTemplate
java.lang.Object
org.springframework.credhub.core.permission.ReactiveCredHubPermissionTemplate
- All Implemented Interfaces:
ReactiveCredHubPermissionOperations
public class ReactiveCredHubPermissionTemplate
extends Object
implements ReactiveCredHubPermissionOperations
Implements the main interaction with CredHub to add, retrieve, and delete permissions.
- Author:
- Scott Frederick
-
Constructor Summary
ConstructorsConstructorDescriptionReactiveCredHubPermissionTemplate
(ReactiveCredHubOperations credHubOperations) Create a newReactiveCredHubPermissionTemplate
. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<Void>
addPermissions
(CredentialName name, Permission... permissions) Add permissions to an existing credential.reactor.core.publisher.Mono<Void>
deletePermission
(CredentialName name, Actor actor) Delete a permission associated with a credential.reactor.core.publisher.Flux<Permission>
getPermissions
(CredentialName name) Get the permissions associated with a credential.
-
Constructor Details
-
ReactiveCredHubPermissionTemplate
Create a newReactiveCredHubPermissionTemplate
.- Parameters:
credHubOperations
- theReactiveCredHubOperations
to use for interactions with CredHub
-
-
Method Details
-
getPermissions
Description copied from interface:ReactiveCredHubPermissionOperations
Get the permissions associated with a credential.- Specified by:
getPermissions
in interfaceReactiveCredHubPermissionOperations
- Parameters:
name
- the name of the credential; must not be null- Returns:
- the collection of permissions associated with the credential
-
addPermissions
public reactor.core.publisher.Mono<Void> addPermissions(CredentialName name, Permission... permissions) Description copied from interface:ReactiveCredHubPermissionOperations
Add permissions to an existing credential.- Specified by:
addPermissions
in interfaceReactiveCredHubPermissionOperations
- Parameters:
name
- the name of the credential; must not be nullpermissions
- a collection of permissions to add- Returns:
- an empty
Mono
-
deletePermission
Description copied from interface:ReactiveCredHubPermissionOperations
Delete a permission associated with a credential.- Specified by:
deletePermission
in interfaceReactiveCredHubPermissionOperations
- Parameters:
name
- the name of the credential; must not be nullactor
- the actor of the permission; must not be null- Returns:
- an empty
Mono
-