Class CredHubTemplate

java.lang.Object
org.springframework.credhub.core.CredHubTemplate
All Implemented Interfaces:
CredHubOperations

public class CredHubTemplate extends Object implements CredHubOperations
Implements the main interaction with CredHub.
Author:
Scott Frederick
  • Constructor Details

    • CredHubTemplate

      public CredHubTemplate(RestTemplate restTemplate)
      Create a new CredHubTemplate using the provided RestTemplate. Intended for internal testing only.
      Parameters:
      restTemplate - the RestTemplate to use for interactions with CredHub
    • CredHubTemplate

      public CredHubTemplate(CredHubProperties properties, ClientHttpRequestFactory clientHttpRequestFactory)
      Create a new CredHubTemplate using the provided connection properties and ClientHttpRequestFactory.
      Parameters:
      properties - the CredHub connection properties; must not be null
      clientHttpRequestFactory - the ClientHttpRequestFactory to use when creating new connections
    • CredHubTemplate

      public 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.
      Parameters:
      properties - the CredHub connection properties; must not be null
      clientHttpRequestFactory - the ClientHttpRequestFactory to use when creating new connections
      clientRegistrationRepository - a repository of OAuth2 client registrations
      authorizedClientRepository - a repository of authorized OAuth2 clients
    • CredHubTemplate

      public 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.
      Parameters:
      properties - the CredHub connection properties; must not be null
      clientHttpRequestFactory - the ClientHttpRequestFactory to use when creating new connections
      clientRegistrationRepository - a repository of OAuth2 client registrations
      clientManager - an OAuth2 authorization client manager
  • Method Details