Package com.oracle.bmc.auth
Class URLBasedX509CertificateSupplier
- java.lang.Object
- 
- com.oracle.bmc.auth.URLBasedX509CertificateSupplier
 
- 
- All Implemented Interfaces:
- X509CertificateSupplier,- Refreshable
 
 public class URLBasedX509CertificateSupplier extends Object implements X509CertificateSupplier, Refreshable X509CertificateSupplierimplementation that reads both certificate and private key off of URL.This class also provides a way to manually refresh the certificate and private key at any point. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classURLBasedX509CertificateSupplier.ResourceDetails- 
Nested classes/interfaces inherited from interface com.oracle.bmc.auth.X509CertificateSupplierX509CertificateSupplier.CertificateAndPrivateKeyPair
 
- 
 - 
Field SummaryFields Modifier and Type Field Description protected static StringCERTIFICATE_URL_CONNECTION_READ_TIMEOUT_IN_MILLISSet the environment variables to configure read timeout and connection timeout (in milliseconds) for URL Connectionprotected static StringCERTIFICATE_URL_CONNECTION_TIMEOUT_IN_MILLIS
 - 
Constructor SummaryConstructors Constructor Description URLBasedX509CertificateSupplier(URLBasedX509CertificateSupplier.ResourceDetails certificateResourceDetails, URLBasedX509CertificateSupplier.ResourceDetails privateKeyResourceDetails, char[] privateKeyPassphraseCharacters)Constructor.URLBasedX509CertificateSupplier(URL certificateUrl, URL privateKeyUrl, char[] privateKeyPassphraseCharacters)Constructor.URLBasedX509CertificateSupplier(URL certificateUrl, URL privateKeyUrl, String privateKeyPassphrase)Deprecated.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description X509CertificategetCertificate()Deprecated.X509CertificateSupplier.CertificateAndPrivateKeyPairgetCertificateAndKeyPair()Returns the X509 certificate and private key.RSAPrivateKeygetPrivateKey()Deprecated.booleanisCurrent()So far we don’t care whether the certificate is current or not.voidrefresh()A method to refresh the X509 certificate.
 
- 
- 
- 
Field Detail- 
CERTIFICATE_URL_CONNECTION_READ_TIMEOUT_IN_MILLISprotected static final String CERTIFICATE_URL_CONNECTION_READ_TIMEOUT_IN_MILLIS Set the environment variables to configure read timeout and connection timeout (in milliseconds) for URL Connection
 - 
CERTIFICATE_URL_CONNECTION_TIMEOUT_IN_MILLISprotected static final String CERTIFICATE_URL_CONNECTION_TIMEOUT_IN_MILLIS 
 
- 
 - 
Constructor Detail- 
URLBasedX509CertificateSupplierpublic URLBasedX509CertificateSupplier(URLBasedX509CertificateSupplier.ResourceDetails certificateResourceDetails, URLBasedX509CertificateSupplier.ResourceDetails privateKeyResourceDetails, char[] privateKeyPassphraseCharacters) Constructor.- Parameters:
- certificateResourceDetails- The certificate resource details
- privateKeyResourceDetails- The private key resource details, may be null for intermediate certificates
- privateKeyPassphraseCharacters- The private key passphrase, may be null for unencrypted private keys
 
 - 
URLBasedX509CertificateSupplierpublic URLBasedX509CertificateSupplier(URL certificateUrl, URL privateKeyUrl, char[] privateKeyPassphraseCharacters) Constructor.- Parameters:
- certificateUrl- The certificate url
- privateKeyUrl- The private key url, may be null for intermediate certificates
- privateKeyPassphraseCharacters- The private key passphrase, may be null for unencrypted private keys
 
 - 
URLBasedX509CertificateSupplier@Deprecated public URLBasedX509CertificateSupplier(URL certificateUrl, URL privateKeyUrl, String privateKeyPassphrase) Deprecated.Constructor.- Parameters:
- certificateUrl- The certificate url
- privateKeyUrl- The private key url, may be null for intermediate certificates
- privateKeyPassphrase- The private key passphrase, may be null for unencrypted private keys
 
 
- 
 - 
Method Detail- 
getCertificate@Deprecated public X509Certificate getCertificate() Deprecated.Gets the certificate- Specified by:
- getCertificatein interface- X509CertificateSupplier
- Returns:
- The certificate, must not be null
 
 - 
refreshpublic void refresh() A method to refresh the X509 certificate.- Specified by:
- refreshin interface- Refreshable
 
 - 
isCurrentpublic boolean isCurrent() So far we don’t care whether the certificate is current or not.- Specified by:
- isCurrentin interface- Refreshable
- Returns:
- false always.
 
 - 
getPrivateKey@Deprecated public RSAPrivateKey getPrivateKey() Deprecated.Corresponding private key of the certificate.You must implement this method for leaf certificates (to sign the request made to the auth service to get a security token). For intermediate certificates, you can return null. - Specified by:
- getPrivateKeyin interface- X509CertificateSupplier
- Returns:
- The private key
 
 - 
getCertificateAndKeyPairpublic X509CertificateSupplier.CertificateAndPrivateKeyPair getCertificateAndKeyPair() Returns the X509 certificate and private key.The X509 certificate will always be valid. The private key may be null for intermediate certificates. For leaf certificates, the private key will always be valid. - Specified by:
- getCertificateAndKeyPairin interface- X509CertificateSupplier
- Returns:
- The certificate and private key pair.
 
 
- 
 
-