Package com.auth0.jwk
Class JwksHttpResponse
java.lang.Object
com.auth0.jwk.JwksHttpResponse
Represents the HTTP response from a JWKS endpoint.
Contains both the JSON body and the response headers.
-
Constructor Summary
ConstructorsConstructorDescriptionJwksHttpResponse(String body) Creates a new response with body only (no headers).Creates a new response with body and headers. -
Method Summary
Modifier and TypeMethodDescriptiongetBody()Returns the response body as a string (the JWKS JSON).Returns all response headers.getHeaderValue(String name) Returns the first value of a response header (case-insensitive lookup).
-
Constructor Details
-
JwksHttpResponse
Creates a new response with body and headers.- Parameters:
body- the response body (JWKS JSON)headers- the response headers (e.g., Cache-Control)
-
JwksHttpResponse
Creates a new response with body only (no headers).- Parameters:
body- the response body (JWKS JSON)
-
-
Method Details
-
getBody
Returns the response body as a string (the JWKS JSON).- Returns:
- the response body
-
getHeaders
Returns all response headers.- Returns:
- an unmodifiable map of header names to their values
-
getHeaderValue
Returns the first value of a response header (case-insensitive lookup).Example usage:
String cacheControl = response.getHeaderValue("Cache-Control");- Parameters:
name- the header name (case-insensitive)- Returns:
- the first header value, or null if not present
-