Class OpenIdHelper
java.lang.Object
uk.co.spudsoft.jwtvalidatorvertx.impl.OpenIdHelper
Helper class for performing OpenID Discovery and JWKS requests.
- Author:
- njt
-
Constructor Summary
ConstructorsConstructorDescriptionOpenIdHelper
(io.vertx.ext.web.client.WebClient webClient, long defaultCacheDurationS) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionio.vertx.core.Future
<AsyncLoadingCache.TimedObject<io.vertx.core.json.JsonObject>> Get a JsonObject from a URL and return it as Future with an expiry time.
-
Constructor Details
-
OpenIdHelper
public OpenIdHelper(io.vertx.ext.web.client.WebClient webClient, long defaultCacheDurationS) Constructor.- Parameters:
webClient
- The Vert.x WebClient to use for making HTTP requests.defaultCacheDurationS
- The default time that the caller should cache results.
-
-
Method Details
-
get
public io.vertx.core.Future<AsyncLoadingCache.TimedObject<io.vertx.core.json.JsonObject>> get(String url) Get a JsonObject from a URL and return it as Future with an expiry time.- Parameters:
url
- The URL to be got.- Returns:
- A TimedObject containing JSON from the URL and an expiry time based on the Cache-Control max-age header.
-