Class CredentialDetails<T>

java.lang.Object
org.springframework.credhub.support.CredentialSummary
org.springframework.credhub.support.CredentialDetails<T>
Type Parameters:
T - the type of CredHub credential
Direct Known Subclasses:
CertificateCredentialDetails

public class CredentialDetails<T> extends CredentialSummary
The details of a credential that has been written to CredHub. Clients don't typically instantiate objects of this type, but will receive them in response to write and retrieve requests. The id and name fields can be used in subsequent requests.
Author:
Scott Frederick
  • Constructor Details

    • CredentialDetails

      public CredentialDetails()
    • CredentialDetails

      public CredentialDetails(String id, CredentialName name, CredentialType credentialType, T value)
      Create a CredentialDetails from the provided parameters. Intended for internal use. Clients will get CredentialDetails objects populated from CredHub responses.
      Parameters:
      id - the CredHub-generated unique ID of the credential
      name - the client-provided name of the credential
      credentialType - the CredentialType of the credential
      value - the client-provided value for the credential created
  • Method Details

    • getId

      public String getId()
      Get the the CredHub-generated unique ID of the credential.
      Returns:
      the credential ID
    • getCredentialType

      public CredentialType getCredentialType()
      Get the client-provided CredentialType of the credential.
      Returns:
      the credential type
    • getValue

      public T getValue()
      Get the client-provided value for the credential.
      Returns:
      the credential value
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class CredentialSummary
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class CredentialSummary
    • toString

      public String toString()
      Overrides:
      toString in class CredentialSummary