Package edu.iu.crypt

Interface WebCertificateReference.Builder<B extends WebCertificateReference.Builder<B>>

Type Parameters:
B - builder type
All Known Subinterfaces:
WebKey.Builder<B>, WebKeyReference.Builder<B>
All Known Implementing Classes:
CertificateReferenceBuilder, JoseBuilder, JweRecipientBuilder, JweRecipientBuilder.EncryptedKeyBuilder, JwkBuilder, KeyReferenceBuilder
Enclosing interface:
WebCertificateReference

public static interface WebCertificateReference.Builder<B extends WebCertificateReference.Builder<B>>
Builder interface for creating WebCertificateReference instances.
  • Method Summary

    Modifier and Type
    Method
    Description
    cert(URI uri)
    Sets the URI where X.509 certificate associated with this key can be retrieved.
    Sets the URI where X.509 certificate associated with this key can be retrieved.
    pem(InputStream pemEncoded)
    Sets key data from potentially concatenated PEM-encoded input.
    pem(String pemEncoded)
    Sets key data from potentially concatenated PEM-encoded input.
    x5t(byte[] certificateThumbprint)
    Sets the certificate thumbprint.
    x5t256(byte[] certificateSha256Thumbprint)
    Sets the certificate SHA-256 thumbprint.
  • Method Details

    • cert

      B cert(URI uri)
      Sets the URI where X.509 certificate associated with this key can be retrieved.

      The URI will be validated and resolved when this method is invoked. To ensure dependency on a remote URI won't impact application startup, always store certificates locally and use cert(X509Certificate...) instead of this method for critical initialization in production environments.

      Parameters:
      uri - URI
      Returns:
      this
    • cert

      B cert(X509Certificate... chain)
      Sets the URI where X.509 certificate associated with this key can be retrieved.
      Parameters:
      chain - one or more X509Certificates
      Returns:
      this
    • x5t

      B x5t(byte[] certificateThumbprint)
      Sets the certificate thumbprint.
      Parameters:
      certificateThumbprint - JSON x5t attribute value
      Returns:
      this
    • x5t256

      B x5t256(byte[] certificateSha256Thumbprint)
      Sets the certificate SHA-256 thumbprint.
      Parameters:
      certificateSha256Thumbprint - JSON x5t attribute value
      Returns:
      this
    • pem

      B pem(InputStream pemEncoded)
      Sets key data from potentially concatenated PEM-encoded input.
      Parameters:
      pemEncoded - InputStream of PEM encoded key data, potentially concatenated
      Returns:
      this
    • pem

      B pem(String pemEncoded)
      Sets key data from potentially concatenated PEM-encoded input.
      Parameters:
      pemEncoded - potentially concatenated PEM encoded key data
      Returns:
      this