- Alle implementierten Schnittstellen:
Serializable,PollableResource
- Bekannte direkte Unterklassen:
TokenChallenge
Subclasses must override acceptable(String) so it only accepts its
own type. prepareResponse(JSONBuilder) can be overridden to put all
required data to the challenge response.
- Siehe auch:
-
Feldübersicht
FelderModifizierer und TypFeldBeschreibungprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringVon Schnittstelle geerbte Felder org.shredzone.acme4j.PollableResource
DEFAULT_RETRY_AFTER -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungprotected booleanacceptable(String type) Checks if the type is acceptable to this challenge.getError()Returns a reason why the challenge has failed in the past, if returned by the server.Returns the current status of the challenge.getType()Returns the challenge type by name (e.g.Returns the validation date, if returned by the server.protected voidprepareResponse(JSONBuilder response) Prepares the response message for triggering the challenge.protected voidSets the JSON representation of the resource data.voidtrigger()Triggers thisChallenge.waitForCompletion(Duration timeout) Waits until the challenge is completed.Von Klasse geerbte Methoden org.shredzone.acme4j.AcmeJsonResource
fetch, getJSON, getRetryAfter, invalidate, isValid, setRetryAfter, updateVon Klasse geerbte Methoden org.shredzone.acme4j.AcmeResource
finalize, getLocation, getLogin, getSession, rebindVon Klasse geerbte Methoden java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.shredzone.acme4j.PollableResource
fetch, waitForStatus
-
Felddetails
-
KEY_TYPE
- Siehe auch:
-
KEY_URL
- Siehe auch:
-
KEY_STATUS
- Siehe auch:
-
KEY_VALIDATED
- Siehe auch:
-
KEY_ERROR
- Siehe auch:
-
-
Konstruktordetails
-
Methodendetails
-
getType
Returns the challenge type by name (e.g. "http-01"). -
getStatus
Returns the current status of the challenge.Possible values are:
Status.PENDING,Status.PROCESSING,Status.VALID,Status.INVALID.A challenge is only completed when it reaches either status
Status.VALIDorStatus.INVALID.- Angegeben von:
getStatusin SchnittstellePollableResource
-
getValidated
Returns the validation date, if returned by the server. -
getError
Returns a reason why the challenge has failed in the past, if returned by the server. If there are multiple errors, they can be found inProblem.getSubProblems(). -
prepareResponse
Prepares the response message for triggering the challenge. Subclasses can add fields to theJSONBuilderas required by the challenge. Implementations of subclasses should make sure thatprepareResponse(JSONBuilder)of the superclass is invoked.- Parameter:
response-JSONBuilderto write the response to
-
acceptable
Checks 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.- Parameter:
type- Type to check- Gibt zurück:
trueif acceptable,falseif not
-
setJSON
Beschreibung aus Klasse kopiert:AcmeJsonResourceSets the JSON representation of the resource data.- Setzt außer Kraft:
setJSONin KlasseAcmeJsonResource- Parameter:
json- NewJSONdata, must not benull.
-
trigger
Triggers thisChallenge. The ACME server is requested to validate the response. Note that the validation is performed asynchronously by the ACME server.After a challenge is triggered, it changes to
Status.PENDING. As soon as validation takes place, it changes toStatus.PROCESSING. After validation the status changes toStatus.VALIDorStatus.INVALID, depending on the outcome of the validation.If the challenge requires a resource to be set on your side (e.g. a DNS record or an HTTP file), it must be reachable from public before
trigger()is invoked, and must not be taken down until the challenge has reachedStatus.VALIDorStatus.INVALID.If this method is invoked a second time, the ACME server is requested to retry the validation. This can be useful if the client state has changed, for example after a firewall rule has been updated.
- Löst aus:
AcmeException- Siehe auch:
-
waitForCompletion
Waits until the challenge is completed.Is is completed if it reaches either
Status.VALIDorStatus.INVALID.This method is synchronous and blocks the current thread.
- Parameter:
timeout- Timeout until a terminal status must have been reached- Gibt zurück:
- Status that was reached
- Löst aus:
AcmeExceptionInterruptedException- Seit:
- 3.4.0
-