java.lang.Object
org.shredzone.acme4j.AcmeResource
org.shredzone.acme4j.AcmeJsonResource
org.shredzone.acme4j.Authorization
- All Implemented Interfaces:
Serializable,PollableResource
Represents an authorization request at the ACME server.
- See Also:
-
Field Summary
Fields inherited from interface org.shredzone.acme4j.PollableResource
DEFAULT_RETRY_AFTER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidPermanently deactivates theAuthorization.findChallenge(Class<T> type) Finds aChallengeof the given class type.findChallenge(String type) Finds aChallengeof the given type.Gets a list of all challenges offered by the server, in no specific order.Gets the expiry date of the authorization, if set by the server.Gets theIdentifierto be authorized.Gets the authorization status.booleanReturnstrueif certificates for subdomains can be issued according to RFC9444.booleanwaitForCompletion(Duration timeout) Waits until the authorization is completed.Methods inherited from class org.shredzone.acme4j.AcmeJsonResource
fetch, getJSON, getRetryAfter, invalidate, isValid, setJSON, 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
-
Constructor Details
-
Authorization
-
-
Method Details
-
getIdentifier
Gets theIdentifierto be authorized.For wildcard domain orders, the domain itself (without wildcard prefix) is returned here. To find out if this
Authorizationis related to a wildcard domain order, check theisWildcard()method.- Since:
- 2.3
-
getStatus
Gets the authorization status.Possible values are:
Status.PENDING,Status.VALID,Status.INVALID,Status.DEACTIVATED,Status.EXPIRED,Status.REVOKED.- Specified by:
getStatusin interfacePollableResource
-
getExpires
Gets the expiry date of the authorization, if set by the server. -
isWildcard
-
isSubdomainAuthAllowed
Returnstrueif certificates for subdomains can be issued according to RFC9444.- Since:
- 3.3.0
-
getChallenges
Gets a list of all challenges offered by the server, in no specific order. -
findChallenge
Finds aChallengeof the given type. Responding to thisChallengeis sufficient for authorization.findChallenge(Class)should be preferred, as this variant is not type safe.- Parameters:
type- Challenge name (e.g. "http-01")- Returns:
Challengematching that name, or empty if there is no such challenge, or if the challenge alone is not sufficient for authorization.- Throws:
ClassCastException- if the type does not match the expected Challenge class type
-
findChallenge
Finds aChallengeof the given class type. Responding to thisChallengeis sufficient for authorization.- Parameters:
type- Challenge type (e.g. "Http01Challenge.class")- Returns:
Challengeof that type, or empty if there is no such challenge, or if the challenge alone is not sufficient for authorization.- Since:
- 2.8
-
waitForCompletion
Waits until the authorization is completed.It is completed if it reaches either
Status.VALIDorStatus.INVALID.This method is synchronous and blocks the current thread.
- Parameters:
timeout- Timeout until a terminal status must have been reached- Returns:
- Status that was reached
- Throws:
AcmeExceptionInterruptedException- Since:
- 3.4.0
-
deactivate
Permanently deactivates theAuthorization.- Throws:
AcmeException
-