You need to create a new key pair and set it via useKeyPair(KeyPair). Your
 account will be identified by the public part of that key pair, so make sure to store
 it safely! There is no automatic way to regain access to your account if the key pair
 is lost.
 
Depending on the CA you register with, you might need to give additional information.
- You might need to agree to the terms of service via
     agreeToTermsOfService().
- You might need to give at least one contact URI.
- You might need to provide a key identifier (e.g. your customer number) and
     a shared secret via withKeyIdentifier(String, SecretKey).
 It is not possible to modify an existing account with the AccountBuilder. To
 modify an existing account, use Account.modify() and
 Account.changeKey(KeyPair).
- 
KonstruktorübersichtKonstruktoren
- 
MethodenübersichtModifizierer und TypMethodeBeschreibungaddContact(String contact) Add a contact address to the list of contacts.addContact(URI contact) Add a contact URI to the list of contacts.Add an email address to the list of contacts.Documents that the user has agreed to the terms of service.Creates a new account.createLogin(Session session) Creates a new account.Signals that only an existing account should be returned.useKeyPair(KeyPair keyPair) Sets theKeyPairto be used for this account.withKeyIdentifier(String kid, String encodedMacKey) Sets a Key Identifier and MAC key provided by the CA.withKeyIdentifier(String kid, SecretKey macKey) Sets a Key Identifier and MAC key provided by the CA.withMacAlgorithm(String macAlgorithm) Sets the MAC key algorithm that is provided by the CA.
- 
Konstruktordetails- 
AccountBuilderpublic AccountBuilder()
 
- 
- 
Methodendetails- 
addContactAdd a contact URI to the list of contacts.A contact URI may be e.g. an email address or a phone number. It depends on the CA what kind of contact URIs are accepted, and how many must be provided as minimum. - Parameter:
- contact- Contact URI
- Gibt zurück:
- itself
 
- 
addContactAdd a contact address to the list of contacts.This is a convenience call for addContact(URI).- Parameter:
- contact- Contact URI as string
- Gibt zurück:
- itself
- Löst aus:
- IllegalArgumentException- if there is a syntax error in the URI string
 
- 
addEmailAdd an email address to the list of contacts.This is a convenience call for addContact(String)that doesn't require to prepend the "mailto" scheme to an email address.- Parameter:
- email- Contact email without "mailto" scheme (e.g. test@gmail.com)
- Gibt zurück:
- itself
- Löst aus:
- IllegalArgumentException- if there is a syntax error in the URI string
 
- 
agreeToTermsOfServiceDocuments that the user has agreed to the terms of service.If the CA requires the user to agree to the terms of service, it is your responsibility to present them to the user, and actively ask for their agreement. A link to the terms of service is provided via session.getMetadata().getTermsOfService().- Gibt zurück:
- itself
 
- 
onlyExistingSignals that only an existing account should be returned. The server will not create a new account if the key is not known.If you have lost your account's location URL, but still have your account's key pair, you can register your account again with the same key, and use onlyExisting()to make sure that your existing account is returned. If your key is unknown to the server, an error is thrown once the account is to be created.- Gibt zurück:
- itself
 
- 
useKeyPairSets theKeyPairto be used for this account.Only the public key of the pair is sent to the server for registration. acme4j will never send the private key part. Make sure to store your key pair safely after registration! There is no automatic way to regain access to your account if the key pair is lost. - Parameter:
- keyPair- Account's- KeyPair
- Gibt zurück:
- itself
 
- 
withKeyIdentifierSets a Key Identifier and MAC key provided by the CA. Use this if your CA requires an individual account identification (e.g. your customer number) and a shared secret for registration. See the documentation of your CA about how to retrieve the key identifier and MAC key.- Parameter:
- kid- Key Identifier
- macKey- MAC key
- Gibt zurück:
- itself
- Siehe auch:
 
- 
withKeyIdentifierSets a Key Identifier and MAC key provided by the CA. Use this if your CA requires an individual account identification (e.g. your customer number) and a shared secret for registration. See the documentation of your CA about how to retrieve the key identifier and MAC key.This is a convenience call of withKeyIdentifier(String, SecretKey)that accepts a base64url encoded MAC key, so both parameters can be passed in as strings.- Parameter:
- kid- Key Identifier
- encodedMacKey- Base64url encoded MAC key.
- Gibt zurück:
- itself
- Siehe auch:
 
- 
withMacAlgorithmSets the MAC key algorithm that is provided by the CA. To be used in combination with key identifier. By default, the algorithm is deduced from the size of the MAC key. If a different size is needed, it can be set using this method.- Parameter:
- macAlgorithm- the algorithm to be set in the- algfield, e.g.- "HS512".
- Gibt zurück:
- itself
- Seit:
- 3.1.0
 
- 
createCreates a new account.Use this method to finally create your account with the given parameters. Do not use the AccountBuilderafter invoking this method.- Parameter:
- session-- Sessionto be used for registration
- Gibt zurück:
- Accountreferring to the new account
- Löst aus:
- AcmeException
- Siehe auch:
 
- 
createLoginCreates a new account.This method is identical to create(Session), but returns aLoginthat is ready to be used.- Parameter:
- session-- Sessionto be used for registration
- Gibt zurück:
- Loginreferring to the new account
- Löst aus:
- AcmeException
 
 
-