- java.lang.Object
-
- org.shredzone.acme4j.AcmeResource
-
- org.shredzone.acme4j.AcmeJsonResource
-
- org.shredzone.acme4j.challenge.Challenge
-
- org.shredzone.acme4j.challenge.TokenChallenge
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
Dns01Challenge
,Http01Challenge
,TlsAlpn01Challenge
public class TokenChallenge extends Challenge
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static String
KEY_TOKEN
-
Fields inherited from class org.shredzone.acme4j.challenge.Challenge
KEY_ERROR, KEY_STATUS, KEY_TYPE, KEY_URL, KEY_VALIDATED
-
-
Constructor Summary
Constructors Constructor Description TokenChallenge(Login login, JSON data)
Creates a new genericTokenChallenge
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAuthorization()
Returns the authorization string.protected String
getToken()
Gets the token.protected String
keyAuthorizationFor(String token)
Computes the key authorization for the given token.-
Methods inherited from class org.shredzone.acme4j.challenge.Challenge
acceptable, getError, getStatus, getType, getValidated, prepareResponse, setJSON, trigger
-
Methods inherited from class org.shredzone.acme4j.AcmeJsonResource
fetch, getJSON, getRetryAfter, invalidate, isValid, setRetryAfter, update
-
Methods inherited from class org.shredzone.acme4j.AcmeResource
finalize, getLocation, getLogin, getSession, rebind
-
-
-
-
Field Detail
-
KEY_TOKEN
protected static final String KEY_TOKEN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TokenChallenge
public TokenChallenge(Login login, JSON data)
Creates a new genericTokenChallenge
object.
-
-
Method Detail
-
keyAuthorizationFor
protected String keyAuthorizationFor(String token)
Computes the key authorization for the given token.The default is
token + '.' + base64url(jwkThumbprint)
. Subclasses may override this method if a different algorithm is used.- Parameters:
token
- Token to be used- Returns:
- Key Authorization string for that token
- Since:
- 2.12
-
getAuthorization
public String getAuthorization()
Returns the authorization string.The default uses
keyAuthorizationFor(String)
to compute the key authorization ofgetToken()
. Subclasses may override this method if a different algorithm is used.
-
-