Module iu.util.crypt
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 TypeMethodDescriptionSets the URI where X.509 certificate associated with this key can be retrieved.cert
(X509Certificate... chain) 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.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
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
Sets the URI where X.509 certificate associated with this key can be retrieved.- Parameters:
chain
- one or moreX509Certificate
s- Returns:
- this
-
x5t
Sets the certificate thumbprint.- Parameters:
certificateThumbprint
- JSON x5t attribute value- Returns:
- this
-
x5t256
Sets the certificate SHA-256 thumbprint.- Parameters:
certificateSha256Thumbprint
- JSON x5t attribute value- Returns:
- this
-
pem
Sets key data from potentially concatenated PEM-encoded input.- Parameters:
pemEncoded
-InputStream
of PEM encoded key data, potentially concatenated- Returns:
- this
-
pem
Sets key data from potentially concatenated PEM-encoded input.- Parameters:
pemEncoded
- potentially concatenated PEM encoded key data- Returns:
- this
-