public class Registration extends AcmeResource
| Modifier and Type | Class and Description |
|---|---|
class |
Registration.EditableRegistration
Editable
Registration. |
| Modifier | Constructor and Description |
|---|---|
protected |
Registration(Session session,
URL location) |
protected |
Registration(Session session,
URL location,
URI agreement) |
| Modifier and Type | Method and Description |
|---|---|
Authorization |
authorizeDomain(String domain)
Authorizes a domain.
|
static Registration |
bind(Session session,
URL location)
Creates a new instance of
Registration and binds it to the Session. |
void |
changeKey(KeyPair newKeyPair)
Changes the
KeyPair associated with the registration. |
void |
deactivate()
Permanently deactivates an account.
|
URI |
getAgreement()
Returns the URI of the agreement document the user is required to accept.
|
Iterator<Authorization> |
getAuthorizations()
|
Iterator<Certificate> |
getCertificates()
|
List<URI> |
getContacts()
List of contact addresses (emails, phone numbers etc).
|
Status |
getStatus()
Returns the current status of the registration.
|
protected void |
load()
Lazily updates the object's state when one of the getters is invoked.
|
Registration.EditableRegistration |
modify()
Modifies the registration data of the account.
|
Certificate |
requestCertificate(byte[] csr)
Requests a certificate for the given CSR.
|
Certificate |
requestCertificate(byte[] csr,
Instant notBefore,
Instant notAfter)
Requests a certificate for the given CSR.
|
void |
update()
Updates the registration to the current account status.
|
getLocation, getSession, rebind, setLocation, setSessionprotected Registration(Session session, URL location)
protected Registration(Session session, URL location, URI agreement)
public static Registration bind(Session session, URL location)
Registration and binds it to the Session.session - Session to be usedlocation - Location URL of the registrationRegistration bound to the session and locationpublic URI getAgreement()
public List<URI> getContacts()
public Iterator<Authorization> getAuthorizations() throws AcmeException
Iterator of all Authorization belonging to this
Registration.
Using the iterator will initiate one or more requests to the ACME server.
Iterator instance that returns Authorization objects.
Iterator.hasNext() and Iterator.next() may throw
AcmeProtocolException if a batch of authorization URIs could not be
fetched from the server.AcmeExceptionpublic Iterator<Certificate> getCertificates() throws AcmeException
Iterator of all Certificate belonging to this
Registration.
Using the iterator will initiate one or more requests to the ACME server.
Iterator instance that returns Certificate objects.
Iterator.hasNext() and Iterator.next() may throw
AcmeProtocolException if a batch of certificate URIs could not be
fetched from the server.AcmeExceptionpublic void update() throws AcmeException
AcmeExceptionpublic Authorization authorizeDomain(String domain) throws AcmeException
IDN domain names will be ACE encoded automatically.
domain - Domain name to be authorizedAuthorization object for this domainAcmeExceptionpublic Certificate requestCertificate(byte[] csr) throws AcmeException
All domains given in the CSR must be authorized before.
csr - PKCS#10 Certificate Signing Request to be sent to the serverCertificateAcmeExceptionpublic Certificate requestCertificate(byte[] csr, Instant notBefore, Instant notAfter) throws AcmeException
All domains given in the CSR must be authorized before.
csr - PKCS#10 Certificate Signing Request to be sent to the servernotBefore - requested value of the notBefore field in the certificate, null
for default. May be ignored by the server.notAfter - requested value of the notAfter field in the certificate, null
for default. May be ignored by the server.CertificateAcmeExceptionpublic void changeKey(KeyPair newKeyPair) throws AcmeException
KeyPair associated with the registration.
After a successful call, the new key pair is used in the bound Session,
and the old key pair can be disposed of.
newKeyPair - new KeyPair to be used for identifying this accountAcmeExceptionpublic void deactivate() throws AcmeException
A deactivated account cannot be reactivated!
AcmeExceptionprotected void load()
public Registration.EditableRegistration modify()
Registration.EditableRegistration where the account can be modifiedCopyright © 2015–2019. All rights reserved.