| Modifier and Type | Field and Description |
|---|---|
protected Instant |
directoryCacheExpiry |
| Constructor and Description |
|---|
Session(String serverUri,
KeyPair keyPair)
Creates a new
Session. |
Session(URI serverUri,
KeyPair keyPair)
Creates a new
Session. |
| Modifier and Type | Method and Description |
|---|---|
Challenge |
createChallenge(JSON data)
Creates a
Challenge instance for the given challenge data. |
KeyPair |
getKeyPair()
Gets the
KeyPair of the ACME account. |
Locale |
getLocale()
Gets the current locale of this session.
|
Metadata |
getMetadata()
Gets the metadata of the provider's directory.
|
byte[] |
getNonce()
Gets the last nonce, or
null if the session is new. |
URI |
getServerUri()
Gets the ACME server
URI of this session. |
AcmeProvider |
provider()
Returns the
AcmeProvider that is used for this session. |
URL |
resourceUrl(Resource resource)
|
void |
setKeyPair(KeyPair keyPair)
Sets a different
KeyPair. |
void |
setLocale(Locale locale)
Sets the locale used in this session.
|
void |
setNonce(byte[] nonce)
Sets the nonce received by the server.
|
protected Instant directoryCacheExpiry
public Session(String serverUri, KeyPair keyPair)
Session.serverUri - URI string of the ACME serverkeyPair - KeyPair of the ACME accountpublic URI getServerUri()
URI of this session.public KeyPair getKeyPair()
KeyPair of the ACME account.public void setKeyPair(KeyPair keyPair)
KeyPair.public byte[] getNonce()
null if the session is new.public void setNonce(byte[] nonce)
public void setLocale(Locale locale)
public AcmeProvider provider()
AcmeProvider that is used for this session.AcmeProviderpublic Challenge createChallenge(JSON data)
Challenge instance for the given challenge data.data - Challenge JSON dataChallenge instancepublic URL resourceUrl(Resource resource) throws AcmeException
URL of the given Resource. This may involve connecting to
the server and getting a directory. The result is cached.resource - Resource to get the URL ofURL, or null if the server does not offer that resourceAcmeExceptionpublic Metadata getMetadata() throws AcmeException
Metadata. May contain no data, but is never null.AcmeExceptionCopyright © 2015–2019. All rights reserved.