public class CredHubTemplate extends Object implements CredHubOperations
Constructor and Description |
---|
CredHubTemplate(CredHubProperties properties,
ClientHttpRequestFactory clientHttpRequestFactory)
Create a new
CredHubTemplate using the provided connection properties and
ClientHttpRequestFactory . |
CredHubTemplate(CredHubProperties properties,
ClientHttpRequestFactory clientHttpRequestFactory,
org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository,
org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager clientManager)
Create a new
CredHubTemplate using the provided connection properties,
ClientHttpRequestFactory , and OAuth2 support. |
CredHubTemplate(CredHubProperties properties,
ClientHttpRequestFactory clientHttpRequestFactory,
org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository,
org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository authorizedClientRepository)
Create a new
CredHubTemplate using the provided connection properties,
ClientHttpRequestFactory , and OAuth2 support. |
CredHubTemplate(RestTemplate restTemplate)
Create a new
CredHubTemplate using the provided RestTemplate . |
Modifier and Type | Method and Description |
---|---|
CredHubCertificateOperations |
certificates()
Get the operations for retrieving, regenerating, and updating certificates.
|
CredHubCredentialOperations |
credentials()
Get the operations for saving, retrieving, and deleting credentials.
|
<T> T |
doWithRest(RestOperationsCallback<T> callback)
Allow interaction with the configured
RestTemplate not provided by other
methods. |
CredHubInfoOperations |
info()
Get the operations for retrieving CredHub server information.
|
CredHubInterpolationOperations |
interpolation()
Get the operations for interpolating service binding credentials.
|
boolean |
isUsingOAuth2() |
CredHubPermissionOperations |
permissions()
Get the operations for adding, retrieving, and deleting permissions from a
credential.
|
CredHubPermissionV2Operations |
permissionsV2()
Get the operations for adding, retrieving, and deleting permissions from a
credential.
|
public CredHubTemplate(RestTemplate restTemplate)
CredHubTemplate
using the provided RestTemplate
.
Intended for internal testing only.restTemplate
- the RestTemplate
to use for interactions with CredHubpublic CredHubTemplate(CredHubProperties properties, ClientHttpRequestFactory clientHttpRequestFactory)
CredHubTemplate
using the provided connection properties and
ClientHttpRequestFactory
.properties
- the CredHub connection properties; must not be nullclientHttpRequestFactory
- the ClientHttpRequestFactory
to use when
creating new connectionspublic CredHubTemplate(CredHubProperties properties, ClientHttpRequestFactory clientHttpRequestFactory, org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, org.springframework.security.oauth2.client.web.OAuth2AuthorizedClientRepository authorizedClientRepository)
CredHubTemplate
using the provided connection properties,
ClientHttpRequestFactory
, and OAuth2 support.properties
- the CredHub connection properties; must not be nullclientHttpRequestFactory
- the ClientHttpRequestFactory
to use when
creating new connectionsclientRegistrationRepository
- a repository of OAuth2 client registrationsauthorizedClientRepository
- a repository of authorized OAuth2 clientspublic CredHubTemplate(CredHubProperties properties, ClientHttpRequestFactory clientHttpRequestFactory, org.springframework.security.oauth2.client.registration.ClientRegistrationRepository clientRegistrationRepository, org.springframework.security.oauth2.client.OAuth2AuthorizedClientManager clientManager)
CredHubTemplate
using the provided connection properties,
ClientHttpRequestFactory
, and OAuth2 support.properties
- the CredHub connection properties; must not be nullclientHttpRequestFactory
- the ClientHttpRequestFactory
to use when
creating new connectionsclientRegistrationRepository
- a repository of OAuth2 client registrationsclientManager
- an OAuth2 authorization client managerpublic CredHubCredentialOperations credentials()
credentials
in interface CredHubOperations
public CredHubPermissionOperations permissions()
permissions
in interface CredHubOperations
public CredHubPermissionV2Operations permissionsV2()
permissionsV2
in interface CredHubOperations
public CredHubCertificateOperations certificates()
certificates
in interface CredHubOperations
public CredHubInterpolationOperations interpolation()
interpolation
in interface CredHubOperations
public CredHubInfoOperations info()
info
in interface CredHubOperations
public <T> T doWithRest(RestOperationsCallback<T> callback)
RestTemplate
not provided by other
methods.doWithRest
in interface CredHubOperations
T
- the credential implementation typecallback
- wrapper for the callback methodpublic boolean isUsingOAuth2()