Class AcmeAccount
java.lang.Object
org.wildfly.security.x500.cert.acme.AcmeAccount
A class that represents an Automatic Certificate
Management Environment (ACME) account.
- Since:
- 1.5.0
- Author:
- Farah Juma
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionstatic AcmeAccount.Builderbuilder()Construct a new builder instance.voidchangeCertificateAndPrivateKey(X509Certificate certificate, PrivateKey privateKey) Change the certificate and private key associated with this account.Return the account location URL ornullif this account has not yet been successfully registered with the ACME server.Get the JWS "alg" header parameter value for this account.Get the X.509 certificate that contains the account public key.String[]Get the account contact URLs.getDn()Get the DN from the X.509 certificate that contains the account public key.Get the key algorithm name.intGet the key size.byte[]getNonce()Get the current nonce for this account.Get the account private key.Get the account public key.getResourceUrl(AcmeResource resource, boolean staging) Get the URL for the given ACME resource.getResourceUrls(boolean staging) Get the ACME resource URLs.Get the ACME server URL.getServerUrl(boolean staging) Get the ACME server URL.Get a signature instance for this account.Get the ACME staging server URL.booleanReturn whether or not the ACME server's terms of service have been agreed to.voidsetAccountUrl(String accountUrl) Set the account location URL provided by the ACME server.voidsetContactUrls(String[] contactUrls) Set the account contact URLs.voidsetNonce(byte[] nonce) Set the new nonce for this account.voidsetTermsOfServiceAgreed(boolean termsOfServiceAgreed) Set whether the terms of services have been agreed to.
-
Method Details
-
getContactUrls
Get the account contact URLs.- Returns:
- the contact URLs
-
setContactUrls
Set the account contact URLs.- Parameters:
contactUrls- the contact URLs (must not benull)
-
isTermsOfServiceAgreed
public boolean isTermsOfServiceAgreed()Return whether or not the ACME server's terms of service have been agreed to.- Returns:
- whether or not the ACME server's terms of service have been agreed to
-
setTermsOfServiceAgreed
public void setTermsOfServiceAgreed(boolean termsOfServiceAgreed) Set whether the terms of services have been agreed to.- Parameters:
termsOfServiceAgreed- whether or not the ACME server's terms of service have been agreed to
-
getServerUrl
Get the ACME server URL.- Returns:
- the ACME server URL
-
getServerUrl
Get the ACME server URL.- Parameters:
staging- whether or not the ACME staging server should be returned- Returns:
- the ACME server URL
-
getStagingServerUrl
Get the ACME staging server URL.- Returns:
- the ACME staging server URL
-
getPrivateKey
Get the account private key.- Returns:
- the account private key
-
getPublicKey
Get the account public key.- Returns:
- the account public key
-
getCertificate
Get the X.509 certificate that contains the account public key.- Returns:
- the X.509 certificate that contains the account public key
-
getDn
Get the DN from the X.509 certificate that contains the account public key. -
getAlgHeader
Get the JWS "alg" header parameter value for this account.- Returns:
- the JWS "alg" header parameter value for this account
-
getSignature
Get a signature instance for this account.- Returns:
- a signature instance for this account
-
getKeySize
public int getKeySize()Get the key size.- Returns:
- the key size
-
getKeyAlgorithmName
Get the key algorithm name.- Returns:
- the key algorithm name
-
getAccountUrl
Return the account location URL ornullif this account has not yet been successfully registered with the ACME server.- Returns:
- the account location URL or
nullif this account has not yet been successfully registered with the ACME server
-
setAccountUrl
Set the account location URL provided by the ACME server.- Parameters:
accountUrl- the account location URL (must not benull)
-
getResourceUrl
Get the URL for the given ACME resource.- Parameters:
resource- the ACME resource (must not benull)staging- whether or not the ACME staging server should be used- Returns:
- the URL for the given ACME resource
-
getResourceUrls
Get the ACME resource URLs.- Parameters:
staging- whether or not the ACME staging server should be used- Returns:
- the ACME resource URLs
-
getNonce
public byte[] getNonce()Get the current nonce for this account.- Returns:
- the current nonce for this account
-
setNonce
public void setNonce(byte[] nonce) Set the new nonce for this account.- Parameters:
nonce- the new nonce for this account (must not benull)
-
changeCertificateAndPrivateKey
Change the certificate and private key associated with this account.- Parameters:
certificate- the new certificate (must not benull)privateKey- the new private key (must not benull)
-
builder
Construct a new builder instance.- Returns:
- the new builder instance
-