Module iu.util.crypt.impl
Package iu.crypt
Class CertificateReferenceBuilder<B extends CertificateReferenceBuilder<B>>
java.lang.Object
edu.iu.client.IuJsonBuilder<B>
iu.crypt.CertificateReferenceBuilder<B>
- Type Parameters:
B- builder type
- All Implemented Interfaces:
WebCertificateReference.Builder<B>
- Direct Known Subclasses:
KeyReferenceBuilder
class CertificateReferenceBuilder<B extends CertificateReferenceBuilder<B>>
extends IuJsonBuilder<B>
implements WebCertificateReference.Builder<B>
Common base class for JSON web security object builders.
-
Constructor Summary
Constructors -
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.Methods inherited from class edu.iu.client.IuJsonBuilder
build, copy, param, param, param, paramNames, toJson
-
Constructor Details
-
CertificateReferenceBuilder
public CertificateReferenceBuilder()Default constructor.
-
-
Method Details
-
cert
Description copied from interface:WebCertificateReference.BuilderSets 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
WebCertificateReference.Builder.cert(X509Certificate...)instead of this method for critical initialization in production environments.- Specified by:
certin interfaceWebCertificateReference.Builder<B extends CertificateReferenceBuilder<B>>- Parameters:
uri-URI- Returns:
- this
-
cert
Description copied from interface:WebCertificateReference.BuilderSets the URI where X.509 certificate associated with this key can be retrieved.- Specified by:
certin interfaceWebCertificateReference.Builder<B extends CertificateReferenceBuilder<B>>- Parameters:
chain- one or moreX509Certificates- Returns:
- this
-
x5t
Description copied from interface:WebCertificateReference.BuilderSets the certificate thumbprint.- Specified by:
x5tin interfaceWebCertificateReference.Builder<B extends CertificateReferenceBuilder<B>>- Parameters:
certificateThumbprint- JSON x5t attribute value- Returns:
- this
-
x5t256
Description copied from interface:WebCertificateReference.BuilderSets the certificate SHA-256 thumbprint.- Specified by:
x5t256in interfaceWebCertificateReference.Builder<B extends CertificateReferenceBuilder<B>>- Parameters:
certificateSha256Thumbprint- JSON x5t attribute value- Returns:
- this
-
pem
Description copied from interface:WebCertificateReference.BuilderSets key data from potentially concatenated PEM-encoded input.- Specified by:
pemin interfaceWebCertificateReference.Builder<B extends CertificateReferenceBuilder<B>>- Parameters:
pemEncoded-InputStreamof PEM encoded key data, potentially concatenated- Returns:
- this
-
pem
Description copied from interface:WebCertificateReference.BuilderSets key data from potentially concatenated PEM-encoded input.- Specified by:
pemin interfaceWebCertificateReference.Builder<B extends CertificateReferenceBuilder<B>>- Parameters:
pemEncoded- potentially concatenated PEM encoded key data- Returns:
- this
-