java.lang.Object
org.shredzone.acme4j.AcmeResource
org.shredzone.acme4j.AcmeJsonResource
org.shredzone.acme4j.challenge.Challenge
org.shredzone.acme4j.challenge.DnsPersist01Challenge
- All Implemented Interfaces:
Serializable,PollableResource
Implements the "dns-persist-01" challenge. It requires a specific DNS record for domain
validation. See the acme4j documentation for a detailed explanation.
- Since:
- 5.0.0
- See Also:
- Draft:
- This class is currently based on an RFC draft. It may be changed or removed without notice to reflect future changes to the draft. SemVer rules do not apply here.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringstatic final StringChallenge type name: "dns-persist-01"Fields inherited from class org.shredzone.acme4j.challenge.Challenge
KEY_ERROR, KEY_STATUS, KEY_TYPE, KEY_URL, KEY_VALIDATEDFields inherited from interface org.shredzone.acme4j.PollableResource
DEFAULT_RETRY_AFTER -
Constructor Summary
ConstructorsConstructorDescriptionDnsPersist01Challenge(Login login, JSON data) Creates a new genericDnsPersist01Challengeobject. -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanacceptable(String type) Checks if the type is acceptable to this challenge.Returns a builder for the RDATA value of the DNS TXT record.Returns the Account URI that is expected to request the validation.Returns the list of issuer-domain-names from the CA.getRData()Convenience call to get a standard RDATA without optional tags.Converts a domain identifier to the Resource Record name to be used for the DNS TXT record.getRRName(Identifier identifier) Converts a domain identifier to the Resource Record name to be used for the DNS TXT record.protected voidInvalidates the state of this resource.protected voidSets the JSON representation of the resource data.Methods inherited from class org.shredzone.acme4j.challenge.Challenge
getError, getStatus, getType, getValidated, prepareResponse, trigger, waitForCompletionMethods inherited from class org.shredzone.acme4j.AcmeJsonResource
fetch, getJSON, getRetryAfter, isValid, setRetryAfterMethods inherited from class org.shredzone.acme4j.AcmeResource
finalize, getLocation, getLogin, getSession, rebindMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.shredzone.acme4j.PollableResource
fetch, waitForStatus
-
Field Details
-
TYPE
Challenge type name: "dns-persist-01"- See Also:
-
KEY_ISSUER_DOMAIN_NAMES
- See Also:
-
RECORD_NAME_PREFIX
- See Also:
-
KEY_ACCOUNT_URI
- See Also:
-
-
Constructor Details
-
DnsPersist01Challenge
Creates a new genericDnsPersist01Challengeobject.
-
-
Method Details
-
getIssuerDomainNames
Returns the list of issuer-domain-names from the CA. The list is guaranteed to have at least one element. -
getRRName
Converts a domain identifier to the Resource Record name to be used for the DNS TXT record.- Parameters:
identifier- DomainIdentifierof the domain to be validated- Returns:
- Resource Record name (e.g.
_validation-persist.www.example.org., note the trailing full stop character).
-
getRRName
Converts a domain identifier to the Resource Record name to be used for the DNS TXT record.- Parameters:
domain- Domain name to be validated- Returns:
- Resource Record name (e.g.
_validation-persist.www.example.org., note the trailing full stop character).
-
buildRData
Returns a builder for the RDATA value of the DNS TXT record.- Returns:
- Builder for the RDATA
-
getRData
Convenience call to get a standard RDATA without optional tags.- Returns:
- RRDATA
-
getAccountUrl
Returns the Account URI that is expected to request the validation.- Since:
- 5.1.0
-
invalidate
Description copied from class:AcmeJsonResourceInvalidates the state of this resource. Enforces aAcmeJsonResource.fetch()whenAcmeJsonResource.getJSON()is invoked.Subclasses can override this method to purge internal caches that are based on the JSON structure. Remember to invoke
super.invalidate()!- Overrides:
invalidatein classAcmeJsonResource
-
acceptable
Description copied from class:ChallengeChecks if the type is acceptable to this challenge. This generic class only checks if the type is not blank. Subclasses should instead check if the given type matches expected challenge type.- Overrides:
acceptablein classChallenge- Parameters:
type- Type to check- Returns:
trueif acceptable,falseif not
-
setJSON
Description copied from class:AcmeJsonResourceSets the JSON representation of the resource data.
-