Package com.yubico.fido.metadata
Class FidoMetadataDownloader.FidoMetadataDownloaderBuilder
- java.lang.Object
-
- com.yubico.fido.metadata.FidoMetadataDownloader.FidoMetadataDownloaderBuilder
-
- Enclosing class:
- FidoMetadataDownloader
public static class FidoMetadataDownloader.FidoMetadataDownloaderBuilder extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FidoMetadataDownloader.FidoMetadataDownloaderBuilder.Step1
Step 1: Set the legal header to expect from the FIDO Metadata Service.static class
FidoMetadataDownloader.FidoMetadataDownloaderBuilder.Step2
Step 2: Configure how to retrieve the FIDO Metadata Service trust root certificate when necessary.static class
FidoMetadataDownloader.FidoMetadataDownloaderBuilder.Step3
Step 3: Configure how to cache the trust root certificate.static class
FidoMetadataDownloader.FidoMetadataDownloaderBuilder.Step4
Step 4: Configure how to fetch the FIDO Metadata Service metadata BLOB.static class
FidoMetadataDownloader.FidoMetadataDownloaderBuilder.Step5
Step 5: Configure how to cache the metadata BLOB.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FidoMetadataDownloader
build()
FidoMetadataDownloader.FidoMetadataDownloaderBuilder
clock(@NonNull java.time.Clock clock)
Useclock
as the source of the current time for some application-level logic.FidoMetadataDownloader.FidoMetadataDownloaderBuilder
trustHttpsCerts(@NonNull java.security.cert.X509Certificate... certificates)
Use the providedX509Certificate
s as trust roots for HTTPS downloads.FidoMetadataDownloader.FidoMetadataDownloaderBuilder
useCrls(@NonNull java.util.Collection<java.security.cert.CRL> crls)
Use the provided CRLs.FidoMetadataDownloader.FidoMetadataDownloaderBuilder
useCrls(java.security.cert.CertStore certStore)
Use CRLs in the providedCertStore
.
-
-
-
Method Detail
-
build
public FidoMetadataDownloader build()
-
clock
public FidoMetadataDownloader.FidoMetadataDownloaderBuilder clock(@NonNull @NonNull java.time.Clock clock)
Useclock
as the source of the current time for some application-level logic.This is primarily intended for testing.
The default is
Clock.systemUTC()
.- Parameters:
clock
- aClock
which the finishedFidoMetadataDownloader
will use to tell the time.
-
useCrls
public FidoMetadataDownloader.FidoMetadataDownloaderBuilder useCrls(@NonNull @NonNull java.util.Collection<java.security.cert.CRL> crls) throws java.security.InvalidAlgorithmParameterException, java.security.NoSuchAlgorithmException
Use the provided CRLs.CRLs will also be downloaded from distribution points if the
com.sun.security.enableCRLDP
system property is set totrue
(assuming the use of theCertPathValidator
implementation from the SUN provider).- Throws:
java.security.InvalidAlgorithmParameterException
- ifCertStore.getInstance(String, CertStoreParameters)
does.java.security.NoSuchAlgorithmException
- if a"Collection"
typeCertStore
provider is not available.- See Also:
useCrls(CertStore)
-
useCrls
public FidoMetadataDownloader.FidoMetadataDownloaderBuilder useCrls(java.security.cert.CertStore certStore)
Use CRLs in the providedCertStore
.CRLs will also be downloaded from distribution points if the
com.sun.security.enableCRLDP
system property is set totrue
(assuming the use of theCertPathValidator
implementation from the SUN provider).- See Also:
useCrls(Collection)
-
trustHttpsCerts
public FidoMetadataDownloader.FidoMetadataDownloaderBuilder trustHttpsCerts(@NonNull @NonNull java.security.cert.X509Certificate... certificates)
Use the providedX509Certificate
s as trust roots for HTTPS downloads.This is primarily useful when setting
downloadTrustRoot
and/ordownloadBlob
to download from custom servers instead of the defaults.If provided, these will be used for downloading
- the trust root certificate for the BLOB signature chain, and
- the metadata BLOB.
-
-